This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91532 - Unrecognized Windows Sockets error: 10106: create
Summary: Unrecognized Windows Sockets error: 10106: create
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Execution (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
: 91695 (view as bug list)
Depends on:
Blocks: 91682
  Show dependency tree
 
Reported: 2006-12-24 13:56 UTC by kirillkh
Modified: 2016-11-29 04:42 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: socket Exception


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kirillkh 2006-12-24 13:56:15 UTC
I made a clean install of b1568 from Hudson and removed my user-dir. Then I
connected to the development UC and installed the "Bundled Tomcat" module from
there. On any attempt to start Tomcat (without any user apps deployed), I am
getting the following error. The same happens with b1526, but b1495 works fine.
Both JDK 1.6.0 and 1.4.2_10 are affected. I also tried to install Tomcat module
globally with similar results. The exception comes up several times throughout
the log and, finally, "Starting of Tomcat failed" message appears.



Dec 24, 2006 3:51:15 PM org.apache.coyote.http11.Http11BaseProtocol init
SEVERE: Error initializing endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
        at java.net.ServerSocket.createImpl(ServerSocket.java:255)
        at java.net.ServerSocket.getImpl(ServerSocket.java:205)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:141)
        at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
        at
org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
        at
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
        at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Comment 1 Sherold Dev 2007-01-02 09:24:48 UTC
This does not seem like a NetBeans issue, please check the following link

http://forum.java.sun.com/thread.jspa?threadID=329241&messageID=2459095
Comment 2 kirillkh 2007-01-02 09:49:53 UTC
sherold,

I have seen that thread before reporting the issue and changed my environment
variables to define SystemRoot in accordance. It didn't help. Please note that
the issue *doesn't appear* in former builds of NetBeans. E.g., b1495 works fine.
Actually, I have never seen this issue in any circumstances, but with recent
NetBeans builds. That's why I still tend to think this is a NetBeans issue.
Comment 3 Sherold Dev 2007-01-02 10:30:32 UTC
OK. Can you please try to start the bundled Tomcat without the IDE to check
whether the problem is in the bundled Tomcat installation itself or somewhere
else in NetBeans?

Please do not forget to set the CATALINA_HOME and CATALINA_BASE environment
variables  according to values used by the IDE, you can see these values in the
Server Manager.
Comment 4 kirillkh 2007-01-02 11:15:03 UTC
I have just tried that with Tomcat installation in
<user_dir>/apache-tomcat-5.5.17. I have set the CATALINA_HOME and CATALINA_BASE
to the same values as in the IDE. The server started normally without any
errors. Then I stopped the server from the command line and attempted to start
it from NetBeans b1568 - this failed with the same exception.
Comment 5 Sherold Dev 2007-01-02 15:02:02 UTC
Did you or can you also try to start some other server, JBoss for example? I
would like to find out whether this is just a Tomcat module specific issue or
whether it is more general issue.
Comment 6 kirillkh 2007-01-02 15:08:40 UTC
I'll try it with JBoss and get back here with the results.
Comment 7 kirillkh 2007-01-02 16:18:31 UTC
Well, I wasn't able to start JBoss 4.0.5 from IDE at all, as it failed with
message "Could not locate .\\run.jar. Please check that you are in the bin
directory when running this script." It does run fine outside of IDE, however.

I then tried Glassfish with more luck and can confirm that it happily runs from
NetBeans.
Comment 8 Sherold Dev 2007-01-02 18:04:11 UTC
OK, thanks. Can you please send me a link where to get the exact same build
which does not work for you? I've just tested the latest build and I cannot
reproduce this issue.
Comment 9 kirillkh 2007-01-02 18:36:10 UTC
I have no idea, where to get it now. Looks like Hudson repository only holds 20
last builds and removes older ones. I guess you could grab the daily build from
that or close date - 24.12.06. But I have just tried the latest build (1591),
and it is still affected by the same issue.

By the way, the reason I use Hudson and not the daily builds is that the daily
builds page lacks changelogs since netbeans.org site redesign.
Comment 10 Sherold Dev 2007-01-03 16:12:58 UTC
Removing the INCOMPLETE keyword since I was able to reproduce the issue also
with the latest daily build.

The problem is that the IDE does not passes the system environment variables to
the Tomcat process started using NbProcessDescriptor, reassign to the
openide/execution for evaluation.

As a work-around you can set the 'SystemRoot' environment variable in the
catalina.bat startup script.
Comment 11 kirillkh 2007-01-03 17:23:03 UTC
Confirming workaround.
Adding "set SystemRoot=c:\windows" in the beginning of catalina.bat solved the
issue for me.
Comment 12 Petr Nejedly 2007-01-04 10:05:14 UTC
Which version of NbProcessDescriptor.exec method do you use?
There is one that allows both replacing the environment wholesale or appending
more variables to the IDE's environment.
Comment 13 Sherold Dev 2007-01-04 10:33:49 UTC
The one with 4 parameters and the passed value of the 'appendEnv' parameter is
'true'.

Please note that this used to work before and there was no change in the Tomcat
module in the related code since the time it was working.
Comment 14 Petr Nejedly 2007-01-04 10:51:35 UTC
There were no changes in executors either. The other thing that may affect this
would be e.g. removal of our "Env-" properties, which we used prior JDK1.5 as a
replacement for unimplemented System.getEnv, but I'm not aware of any such change...
Comment 15 kirillkh 2007-01-04 11:23:50 UTC
The last build I tried, in which this worked, was b1495 from 18.12.06. Build
1526, in which this was already broken, was built on 20.12.06. HTH.
Comment 16 Petr Nejedly 2007-01-04 14:20:42 UTC
OK, thanks for the cooperation, I have found a commit by Radim, which
(intentionally) breaks the Env- passing.
Comment 17 Petr Nejedly 2007-01-06 20:24:05 UTC
Should be fixed now:
openide/execution/nbproject/project.properties,v1.10
openide/execution/src/org/openide/execution/NbProcessDescriptor.java,v1.14

Please check.
Comment 18 kirillkh 2007-01-07 16:40:00 UTC
Looks like it's fixed.
Comment 19 Dan Kolar 2007-01-08 12:08:21 UTC
*** Issue 91695 has been marked as a duplicate of this issue. ***
Comment 20 Dan Kolar 2007-01-08 12:12:38 UTC
v. build 200701071900 for JBoss 4.0.4