5 Replies Latest reply on Jul 15, 2009 12:09 PM by zyadamec

    Failed shutdown attempt

    david.l.small

      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]]]
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.jboss.Shutdown.main(Shutdown.java:214)
      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]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
      ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Address already in use]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
      ... 5 more
      Caused by: java.net.SocketException: Address already in use
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      at java.net.Socket.connect(Socket.java:519)
      at java.net.Socket.connect(Socket.java:469)
      at java.net.Socket.(Socket.java:366)
      at java.net.Socket.(Socket.java:267)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
      ... 5 more

        • 1. Re: Failed shutdown attempt
          jaikiran

          What command are you using to shutdown the server?

          • 2. Re: Failed shutdown attempt
            david.l.small

            We use the shutdown.sh -S command with Java 1.6.11. Thanks.

            • 3. Re: Failed shutdown attempt
              peterj

              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?)

              • 4. Re: Failed shutdown attempt
                david.l.small

                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.

                • 5. Re: Failed shutdown attempt
                  zyadamec

                  I know this is kind of an older topic, but I am having a similar issue.

                  OS: Win 2k3
                  JDK: 1.5.0_16

                  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.