Does anyone have any idea what would have caused the following error when trying to shutdown? We are using jboss 4.0.4 on Solaris 10 (Intel).
Any help would be appreciated. Thanks.
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Address already in use]]]
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Address already in use]]
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Address already in use]
... 5 more
Caused by: java.net.SocketException: Address already in use
at java.net.PlainSocketImpl.socketConnect(Native Method)
... 5 more
What command are you using to shutdown the server?
We use the shutdown.sh -S command with Java 1.6.11. Thanks.
I have never seen an "Address already in use" error when attempting to connect to a port as a client (as a server, yes, but never as a client). Use netstat to determine if the port is open. Also try running:
telnet localhost 1099
that should give you some gibberish as the output, but the key information is the hostname in that output - it could point to an issue in /etc/hosts. (I know there are several posts that discuss using telnet to debug this, but search doesn't yield any of them, so I can't point one out. So, could you post the telnet output and /etc/hosts file?)
I wish we could test something like this, but it's only happened a couple of times. And it's only happened since we moved from Java 1.5 to 1.6. We'd like to solve it because it can be disruptive to our scheduled restarts. I had hoped that perhaps this was a known issue.
I know this is kind of an older topic, but I am having a similar issue.
OS: Win 2k3
When attempting a shutdown using 'shutdown -s' or using jopr's shutdown command. The think i have noticed is that the actual 'java.exe' process does not seem to fully exit holding on to the ports. We are looking into a solution on our end, but for now we have to kill the java process manually before restarting jboss.