Bug 35854 - Unexpected java.net.SocketException
Unexpected java.net.SocketException
Status: RESOLVED INVALID
Product: serverplugins
Classification: Unclassified
Component: Tomcat
3.x
PC Windows ME/2000
: P1 (vote)
: 4.x
Assigned To: Milan Kuchtiak
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-01 10:25 UTC by rowd
Modified: 2009-11-07 13:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
ide log file (84.61 KB, text/plain)
2003-09-01 10:27 UTC, rowd
Details
netstat -a (before starting server) (1.24 KB, text/plain)
2003-09-02 01:06 UTC, rowd
Details
netstat -a (after starting server) (1.04 KB, text/plain)
2003-09-02 01:07 UTC, rowd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rowd 2003-09-01 10:25:21 UTC
I can't start a Tomcat server (either the internal one or 
my installed server). I receive an 'unexpected 
java.net.SocketException'. It has worked correctly in the 
past. The only change I've made recently that I can think 
of is that I have installed the lastest windows update 
(patch). 

Details of exception:
java.net.SocketException: Network is down: connect
	at java.net.PlainSocketImpl.socketConnect(Native 
Method)
	at java.net.PlainSocketImpl.doConnect
(PlainSocketImpl.java:305)
	at java.net.PlainSocketImpl.connectToAddress
(PlainSocketImpl.java:171)
	at java.net.PlainSocketImpl.connect
(PlainSocketImpl.java:158)
	at java.net.Socket.connect(Socket.java:426)
	at java.net.Socket.connect(Socket.java:376)
	at java.net.Socket.<init>(Socket.java:291)
	at java.net.Socket.<init>(Socket.java:119)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Installation.te
stPortAvailability(Tomcat40Installation.java:755)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Installation.cr
eateNewTomcatProcess(Tomcat40Installation.java:919)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Installation.st
artServerInExecMode(Tomcat40Installation.java:905)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Installation.sy
nchronizeStart(Tomcat40Installation.java:1053)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Installation.in
crementalDeploy(Tomcat40Installation.java:689)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40Instance.deploy
(Tomcat40Instance.java:273)
	at 
org.netbeans.modules.j2ee.impl.DefaultServerInstanceManager.
doDeploy(DefaultServerInstanceManager.java:120)
	at 
org.netbeans.modules.j2ee.impl.DefaultServerInstanceManager.
startExecution(DefaultServerInstanceManager.java:140)
	at 
org.netbeans.modules.j2ee.impl.DefaultServerInstanceManager.
serverInstanceStartExecution
(DefaultServerInstanceManager.java:85)
	at 
org.netbeans.modules.j2ee.impl.DefaultExecPerformer.startExe
cution(DefaultExecPerformer.java:67)
	at 
org.netbeans.modules.web.execution.WebDefaultExecPerformer.s
tartExecution(WebDefaultExecPerformer.java:238)
	at 
org.netbeans.modules.j2ee.impl.ServerExecutor.execute
(ServerExecutor.java:69)
	at 
org.netbeans.modules.tomcat.tomcat40.Tomcat40DataObject.star
t(Tomcat40DataObject.java:692)
	at org.openide.actions.ExecuteAction.execute
(ExecuteAction.java:140)
	at org.openide.actions.ExecuteAction.execute
(ExecuteAction.java:217)
	at org.openide.actions.ExecuteAction.performAction
(ExecuteAction.java:102)
	at 
org.openide.util.actions.NodeAction$DelegateAction.actionPer
formed(NodeAction.java:431)
	at org.netbeans.core.ModuleActions$1.run
(ModuleActions.java:97)
	at org.openide.util.Task.run(Task.java:136)
	at org.openide.util.RequestProcessor$Task.run
(RequestProcessor.java:328)
[catch] at org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:670)
Comment 1 rowd 2003-09-01 10:27:36 UTC
Created attachment 11475 [details]
ide log file
Comment 2 Milan Kuchtiak 2003-09-01 12:53:42 UTC
There is a testPortAvailability() method called before Tomcet server
is started.
This metod checks whether the port on localhost(or other host) is
available.

Please try to check the port using the :

netstat -a

command.

If the port is available the Tomcat server isn't started.
The warning message should appear then. If it doesn't thats a bug.

If the port 8080(8081) is available - try to stop the old tomcat
process (using task manager).

Does this help ?
Comment 3 rowd 2003-09-02 01:06:46 UTC
Created attachment 11481 [details]
netstat -a (before starting server)
Comment 4 rowd 2003-09-02 01:07:30 UTC
Created attachment 11482 [details]
netstat -a (after starting server)
Comment 5 rowd 2003-09-02 01:19:00 UTC
I tried checking the ports before and after attempting to start the 
server and have posted the results here (before.txt and 
afterStartingTomcat.txt). I still get the same 'Unexpected 
java.net.SocketException' consistently. I entered this issue here 
because that was what the error message directed me to do, but it is 
also very possible that I'm doing something incorrectly. I just don't 
understand how it could work up until a week ago, and not once since 
then.
Comment 6 Milan Kuchtiak 2003-09-02 07:58:15 UTC
It's evident that the internal Tomcat hasn't been started. However,
the port 8081 should be available. It seems that there is a problem in
your network configuration (see the message Network is down).

Please try to start Tomcat IDE internal server outside the IDE - using
the command :

e:\jdk1.4\jre\bin\java -classpath
"E:\IDE_NETBEANS1\tomcat406\bin\bootstrap.jar";"e:\jdk1.4\lib\tools.jar"
-Dcatalina.home="E:\IDE_NETBEANS1\tomcat406"
-Dcatalina.base="e:\mydir\tomcat406_base"
org.apache.catalina.startup.Bootstrap "start" 

Here is the case when NETBEANS_HOME="E:\IDE_NETBEANS1" and
USERDIR="e:\mydir". You can also copy this command from the Netbeans
output window - the command is created when a web module is executed
(from the WEB-INF node).

Then check whether the server is running - 
check the URL http://localhost:8081/ in your browser.

Or, try to install some version of Tomcat4.1 server from
http://jakarta.apache.org and start the server. I am interested if
this is working.
Comment 7 rowd 2003-09-02 18:13:03 UTC
I tried to start the IDE internal server as you suggested, without 
success. It couldn't find the java environment at the location you 
mentioned (logical, as I don't have one there) and wouldn't take a 
reference to my java location (c:\Java). 

I've got another version of the Tomcat4.1 server which I can startup, 
but gives me a HTTP status 404 - "The requested resource (/) is not 
available" error when I check the localhost:8080 URL. That's why I've 
always used the IDE internal server, which has worked without any 
problems up until now.

I've now uninstalled the NetBeans IDE and reinstalled it, and the 
internal server works again. I have no idea what the problem was, but 
thankyou for all your help :) I can now get on with programming, 
something I know a bit more about than servers :(



By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo