2 Replies Latest reply on Mar 31, 2008 2:10 AM by Vishal K

    Error while shutting down JBoss

    Vishal K Newbie

      Hello members,

      I am using JBoss eap 4.3 and am starting JBoss using

      ./run.sh -c default -b 0.0.0.0

      The server starts without any issues, But when I try to shutdown JBoss I get the following error:

      # ./shutdown.sh -S

      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.ConnectException: Connection refused]]]
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1416)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       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.ConnectException: Connection refused]]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1387)
       ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
       ... 5 more
      Caused by: java.net.ConnectException: Connection refused
       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:520)
       at java.net.Socket.connect(Socket.java:470)
       at java.net.Socket.<init>(Socket.java:367)
       at java.net.Socket.<init>(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

      Can somebody explain why is this happening?

      Thank you
      Vishal




        • 1. Re: Error while shutting down JBoss
          Frank Henry Novice

          IIRC 1099 is the RMI connection port and maybe you have some elements communicating with each other via this port?

          When Jboss goes down it will emit a shutdown message to it's listeners.
          That would be a good point for your 'clients' to release their connections and prepare to shut down.

          • 2. Re: Error while shutting down JBoss
            Vishal K Newbie

            Thanks Frank for your response..

            But there is nobody using the port 1099 because when I kill my Jboss nobody is using that port and when I start my Jboss what I can see is that the 1099 is used by the same IP which Jboss is running on.. I mean my current machine IP..

            It looks very weird to me . I checked the configuration file - jboss-service.xml file also to check any port conflict.. but there was none..

            Regards,
            Vishal