5 Replies Latest reply on Jul 25, 2008 2:35 PM by Peter Johnson

    Unable to stop jboss server

    James Billa Newbie


      I have JBOSS 4.0.5 installed on Linux. I am able to start the server. But when I try to stop the server using /jboss stop it is throwing an exception shown below. Any idea what could the problem?

      Stopping JBoss .Exception in thread "main" javax.naming.NameNotFoundException: jmx not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      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:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
      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:625)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.Shutdown.main(Shutdown.java:214)

        • 1. Re: Unable to stop jboss server
          Peter Johnson Master

          What Linux distro? I do not recognize the command you mentioned: "/jboss stop"

          The typical mechanism to stop the app server (assuming it is running on the same box and is using the default JNDI port)is:

          ./shutdown.sh -S

          Also do this. Open the jmx-console, go to the jboss:service=JNDIView mbean and invoke the "list" operation and post the results. It would appear that either JNDI is messed up, or perhaps JNDI is not using the default port (1099).

          • 2. Re: Unable to stop jboss server
            James Billa Newbie

            I started the server using sudo /etc/init.d/jboss start. It showed a message server started. Then tried stoping using /etc/init.d/jboss stop. Thatz when i got the exception. Even i tried ./shutdown.sh - S and still got the same exception.

            Also when i tried opening the jms-console it says page not found. servername:8080/jmx-console is the link i tried.

            unix version redhat relese 4,

            • 3. Re: Unable to stop jboss server
              Peter Johnson Master

              Let's first determine if the app server is really starting. Based on what you have posted, I do not think it is. Either that, or you are not waiting long enough for the app server to initialize before trying to stop it.

              I assume you used the bin/jboss_init_redhhat.sh script as the basis for /etc/init.d/jboss. Did you make any changes to that file? If so, what changes?

              Did you set JBOSS_CONSOLE? If you did, please post the contents of the log. If not, then jboss_init_redhhat.sh redirects the console log to /dev/nul. In which case you could look for the logs at server/default/log. But don't post them - they are too big. Instead, look in server.log for a message that says "started in xxx second".

              You did create a "jboss" account, right? Have you tried logging in as that account and running the app server using bin/run.sh? You reall need to do that first before attempting to start it the way you did. This way any problems will be apparent in the console log.

              • 4. Re: Unable to stop jboss server
                James Billa Newbie

                Thanks a lot for your help.

                When I did run.sh It says the server Started in 9s:386ms

                But i see error messages

                log4j:ERROR Parsing error on line 409 and column 23
                log4j:ERROR The content of element type "log4j:configuration" must match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)".
                log4j:ERROR Parsing error on line 409 and column 23
                log4j:ERROR An element with the identifier "ORI" must appear in the document.
                log4j:ERROR No appender named [ORI] could be found.
                13:12:41,219 WARN [XMLLoginConfigImpl] End loadConfig, failed to load config: file:/usr/local/jboss-4.0.5.GA/server/default/conf/login-config.xml
                org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, column 1.
                Was expecting one of:

                < EOF >
                < IDENTIFIER > ...

                at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.java:395)
                at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:333)
                at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.java:98)
                at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.java:57)
                at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser.java:79)
                13:12:42,696 WARN [URLDeploymentScanner] Scan URL, caught java.io.FileNotFoundException: Not pointing to a directory, url: file:/data/web/resources/
                13:12:43,256 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 9s:386ms
                13:12:47,702 WARN [URLDeploymentScanner] Scan URL, caught java.io.FileNotFoundException: Not pointing to a directory, url: file:/data/web/resources/

                and the last warning line is repeated continuously. With this when i try to get to servername:8080/jmx-console i get page not found.

                • 5. Re: Unable to stop jboss server
                  Peter Johnson Master

                  OK, jbossas is not starting. Or actually, none of the services that matter, such as HTTP, started (is what I am guessing). Please post the entire console output after you enter ./run.sh.

                  What configuration changes did you make? I know you changed the log4j.xml file because there is no ORI appender in the file that comes with JBossAS. Also, did you change the login-config.xml file? It would appear that whatever editor you used to change it added unicode byte ordering characters to the start of the file (that is the most common reason for the error you are getting).

                  Please post any configuration files you changed (posting only the lines you added or changed is sufficient). Remember to enclose your XML text in UBBCode "code" tags - you can do this by selecting the XML text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.