5 Replies Latest reply on May 26, 2011 11:05 AM by Wolf-Dieter Fink

    Not able to shutdown the binded server

    Sushmita Mishra Newbie

      Hi,

         I tried to bind a remote IP to my server.Itworked fine. But now when I am trying to shutdown my server it is not getting shutdown.

      I user the following command to run my server :

       

      [user@localhost bin]$./run.sh -b <IP>

       

      this is working perfectly fine and the remote access is also established but when I execute the command to shutdown my server then the following message is comming :

       

      [user@localhost bin]$ ./shutdown.sh  -S
      Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 172.18.227.179 [Root exception is javax.naming.CommunicationException: Failed to connect to server /172.18.227.179:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /172.18.227.179:1099 [Root exception is java.net.ConnectException: Connection refused]]]
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
              at javax.naming.InitialContext.lookup(InitialContext.java:409)
              at org.jboss.Shutdown.main(Shutdown.java:219)
      Caused by: javax.naming.CommunicationException: Failed to connect to server /172.18.227.179:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /172.18.227.179:1099 [Root exception is java.net.ConnectException: Connection refused]]
              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
              ... 4 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /172.18.227.179:1099 [Root exception is java.net.ConnectException: Connection refused]
              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
              ... 5 more
      Caused by: java.net.ConnectException: Connection refused
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
              at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:381)
              at java.net.Socket.connect(Socket.java:537)
              at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
              at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
              ... 5 more

       

      I have also tried to execute

       

      [openuser@o1hw185906 bin]$ ./shutdown.sh -s <IP> -S

       

      Still the same issue persists.

       

      Whenever I am trying to shutdown my server ,the system is trying to shut down the unbinded server if I run the default server and then try to stop it.

      Please somebody help me to stop my binded server.

        • 1. Re: Not able to shutdown the binded server
          Zemian Deng Apprentice

          The shutdown.sh -s option format is <JNDI_SERVER_URL>, which can be like this: 'jnp://<IP>:<PORT>'. A default JNDI server port is 1099, so try:

           

          shutdown.sh -s 'jnp://<IP>:1099' -S
          
          • 2. Re: Not able to shutdown the binded server
            rberger Newbie

            Hy guys!

             

            That does not work for me! I started the JBoss-Server with ./run.sh -b "IPofTheServer". That works fine.

             

            But now I want to stop the server with the shutdown script: ./shutdown.sh -s "IPofTheServer" -S

             

            But system says: "Shutting down JBoss application server: Unrecognized option: -s"

            And in the next line: "Could not create the Java virtual machine."

             

            Thank you for your support!

            • 3. Re: Not able to shutdown the binded server
              Wolf-Dieter Fink Master

              As written before, you should have to use the JNP address which is "IPofTheServer" and the JNP portnumber (by default 1099)

              • 4. Re: Not able to shutdown the binded server
                rberger Newbie

                Okay, thank you! That works for me, if I run the shutdown.sh directly from the bin folder. I think I have another problem:

                 

                I just create with the "jboss_init_suse"-script the script for the automatic system start (you can find that in the bin folder, too) in different runlevels. The server starts on system startup without problems!

                 

                Also, I can start the server manually with: "/etc/init.d/jboss_init_suse start". The system says: "Starting JBoss application server: done.

                 

                But if I try "/etc/init.d/jboss_init_suse stop" the system says:  "Shutting down JBoss application server: Unrecognized option: -s"

                And in the next line: "Could not create the Java virtual machine."

                 

                I modified the jboss_init_suse script, so that he runs with the run.sh script (./run.sh -b "IpofTheServer")

                Now I just modified the shtudown method in the script, as you say with "shutdown.sh -s 'jnp://<IP>:1099' -S", but now it does not work ...

                • 5. Re: Not able to shutdown the binded server
                  Wolf-Dieter Fink Master

                  "Could not create the Java virtual machine." looks like illegal JAVA start options.

                  You should set the shell to debug "set -x" and read the output, maybe here you will see a hint.