4 Replies Latest reply on Nov 11, 2005 12:43 PM by Jay Taylor

    I can't get Jboss to restart

    Jay Taylor Newbie

      I just started at a company (first job out of school) and the guy that was administering Jboss left the week before I started. No one else wanted the job of maintaining it, so it fell to me. I've never used Jboss before, but I've been doing pretty well so far. Until today that is...
      I tried to restart Jboss using a script the guy before me had written. It basically just called the shutdown.sh and then run.sh from jboss/bin. This wasn't the first time I had used this script, and in the past it worked fine. This time however, it gave me this error during the shutdown part:

      Exception in thread "main" javax.naming.NameNotFoundException: jmx not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      at sun.rmi.transport.Transport$1.run(Transport.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:595)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.Shutdown.main(Shutdown.java:182)

      After reading all over the net, I haven't been able to find anything that explains why this happens. Not only that, but then when it tried to start it gave a million error messages. The one message that really stuck out was that the port 4444 was in use and there was a conflict. Does this mean that there is still a JBoss instance running? If there is, how could I end it? And if i end it, will it fix the problem? I've got JBoss running on Sun 5.8.
      Any help would be unbelievably great. Thanks.

        • 1. Re: I can't get Jboss to restart
          Jay Taylor Newbie

          I was trying to recreate my problem on my windows box, where I have JBoss running so I can develop on it. I started JBoss and then started it again. The second instance threw up all kinds of errors and just generally threw a fit. I shut both instances down (I could use the MBean inspercot to shut the original one down, but I had to alt+ctrl+del the second one), and then JBoss started displaying the same simptoms on my Windows Machine as it has been on the Sun server. Every time I would try to start it after that it would give me that error about the port being in use (not always the same port, strangely enough). So I restarted my computer and it has gone back to working fine. I would guess that this would probably fix my problems on the Sun side too, but there is no way I can shut the server down because there are many other things running on it. Does anyone have any suggestions? I was thinking that there might be some instances of it still running, so I did a ps -e. There was nothing called JBoss in the list, but I don't know what JBoss' name would be. Is it "java"? because there were a few instances of that, and as far as I know, JBoss is the only Java related thing running on that server.

          • 2. Re: I can't get Jboss to restart
            Elmar Fasel Newbie

            Try a
            ps -ef | grep jboss | grep -v grep
            and see if it lists any running jboss instances.
            If there are some jboss processes and you're sure that these are your processes, you may kill them to be able to restart jboss.

            • 3. Re: I can't get Jboss to restart
              Adam Pritz Newbie

              On your Windows machine, you can also try installing and running a program called Active Ports (search Google). It is one of many free programs that allow you to see which process is attached to which port on your machine. You can also kill any process listed. This will allow you to avoid a restart on Windows at least.

              Hope this helps.

              • 4. Re: I can't get Jboss to restart
                Jay Taylor Newbie

                Thanks for the replys. I wound up doing a ps -e | grep jboss, but nothing showed up. I then did ps -e and I noticed that there were several instances of "java". So I tried starting jboss again, and sure enough another instance of Java showed up. I killed all of the Javas that were there and tried restarting JBoss again, and it worked fine. I think that when I used the restart script that was provided to me, something happened during the shutdown, but rather than stopping the script, it just tried starting JBoss, assuming that it had shut down. At that point I had two instances of JBoss running, and it just didn't want to do anything at that point. After killing the processes, I was able to turn it back on and everything worked just fine. Thanks agian.