8 Replies Latest reply on Aug 5, 2010 4:14 AM by javim

    JBoss On - Starting rhq-server.sh

    javim

      Hi

       

      When I try to start rhq-server.sh I got the next message (using a sh trace)

       

       

      + check_status starting
      + '[' -f  /home/myhome/jon-server-2.3.1.GA/bin/rhq-server.pid ']'
      ++ cat  /home/myhome/jon-server-2.3.1.GA/bin/rhq-server.pid
      +  _SERVER_PID=6520
      + '[' -n 6520 ']'
      + kill -0 6520
      +  _SERVER_STATUS='RHQ Server (pid 6520) is NOT running'
      +  _SERVER_RUNNING=0
      + '[' -f  /home/myhome/jon-server-2.3.1.GA/bin/rhq-jvm.pid ']'
      ++ cat  /home/myhome/jon-server-2.3.1.GA/bin/rhq-jvm.pid
      + _JVM_PID=6530
      +  '[' -n 6530 ']'
      + kill -0 6530
      + _JVM_STATUS='JBossAS Java VM  child process (pid 6530) is NOT running'
      + _JVM_RUNNING=0
      + echo  'RHQ Server (pid 6520) is NOT running'
      RHQ Server (pid 6520) is NOT  running
      + '[' 0 = 1 ']'
      + echo 'Failed to start - make sure the  RHQ Server is fully configured properly'
      Failed to start - make sure  the RHQ Server is fully configured properly
      + exit 1

       

       

      Does someone know what process I need to run to make it work?

       

      Thanks in advance

        • 1. Re: JBoss On - Starting rhq-server.sh
          javim

          Does someone know about it? It still happens even with the 2.4.0 version

           

           

          [my_user@my_machine bin]$ sudo ./rhq-server.sh start
          Trying to start the RHQ Server...
          RHQ Server (pid 11840) is NOT running
          Failed to start - make sure the RHQ Server is fully configured properly
          [my_user@my_machine bin]$

          • 2. Re: JBoss On - Starting rhq-server.sh
            lkrejci

            Hi Javier,

             

            to be honest with you I have never seen this happen. Are you 100% sure that that the installation is full and uncorrupted in some way?

             

            Also, to be able to diagnose this further, we'd need to know more about your RHQ installation. What OS you use? Where is RHQ installed? Do you cd into it through some symlink? What java version do you use? I see that you "sudo" the start up script. How is JAVA_HOME or RHQ_SERVER_JAVA_HOME env variable set for root? Off top of my head those are the things that theoretically might influence the startup but we'll know more when you provide some more info.

             

            Also does the server start up if you start it as the current user?

             

            Regards,

             

            Lukas

            • 3. Re: JBoss On - Starting rhq-server.sh
              javim

              Hi Lukas

               

              OS:                     Red Hat EL 5

              JAVA:                  jdk1.6.0_17

              RHQ_HOME:       /home/my_home/jon-server-2.4.0.GA

               

              I use sudo becoz y need  permissions to execute rhq-server.sh or ill would get the next message

               

              [my_user@my_machine bin]$ ./rhq-server.sh start
              Trying to start the RHQ Server...
              ./rhq-server.sh: line 401: /home/my_home/jon-server-2.4.0.GA/bin/rhq-server.pid: Permiso denegado
              RHQ Server (pid 11986) is NOT running
              Failed to start - make sure the RHQ Server is fully configured properly
              JAVA_HOME or RHQ_SERVER_JAVA_HOME are defined at the begining of rhq-server.sh. I had to do this becoz rhq-server.sh didnt recognize them in /etc/profile or /home/my_home/.bashrc or /home/my_home/.bash_profile
              I dont know what more to do
              Thanks Lukas,
              Best regards
              • 4. Re: JBoss On - Starting rhq-server.sh
                lkrejci

                Hmm,

                 

                there should be no explicit need to run the rhq server as root. Normal user should be able to start it up as well. I thought you're doing it because of some policy you have defined in your environment, but as I said the RHQ server doesn't mandate to be run as root.

                 

                The fact that you get a permission denied error when the script is trying to create the PID file tells me that maybe you have some permission issues in the RHQ install dir.

                 

                What user owns the RHQ directory?

                Does the file /home/my_home/jon-server-2.4.0.GA/bin/rhq-server.pid exist? If it does, who owns it?

                You should delete the file before starting the server (it should be deleted automatically when you do rhq-server.sh stop), because that file contains the process id of the server, which would obviously be wrong if the file existed and you were starting a new server.

                 

                It is also very weird that the env variables aren't recognized when defined in the parent shell. I'd double check that you really are defining them and that they exist after you re-login.

                • 5. Re: JBoss On - Starting rhq-server.sh
                  pilhuhn

                  Can you please supply boot.log and rhq-server-log4j.log files here?

                  The error you see mean that the server itself had issues starting.

                   

                  Alternatively you can start via

                   

                  bin/rhq-server.sh console

                   

                  and paste the console output into your reply.

                  • 6. Re: JBoss On - Starting rhq-server.sh
                    javim

                    I did it. I think there's a mem problem with JVM.

                     

                     

                    $ ./rhq-server.sh console
                    Starting RHQ Server in console...
                    =========================================================================

                     

                      JBoss Bootstrap Environment

                     

                      JBOSS_HOME: /home/bodies/jon-server-2.4.0.GA/jbossas

                     

                      JAVA: /usr/java/jdk1.6.0_17/bin/java

                     

                      JAVA_OPTS: -Dprogram.name=run.sh -Dapp.name=rhq-server -Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Djboss.server.log.dir=/home/bodies/jon-server-2.4.0.GA/logs -Djava.awt.headless=true -Djboss.platform.mbeanserver -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.util.logging.config.file=/home/bodies/jon-server-2.4.0.GA/jbossas/server/default/conf/logging.properties  -Djava.net.preferIPv4Stack=true

                     

                      CLASSPATH: /home/bodies/jon-server-2.4.0.GA/jbossas/bin/run.jar:/usr/java/jdk1.6.0_17/lib/tools.jar

                     

                    =========================================================================

                     

                    Error occurred during initialization of VM
                    Could not reserve enough space for object heap

                    • 7. Re: JBoss On - Starting rhq-server.sh
                      pilhuhn

                      Hey,

                      the output shows "-Xms1024M -Xmx1024M" which means the server wants to reserve 1GB memory for heap (and additional 256MB for perm gen), which in total makes ~1.4GB that the JVM wants. Looks like this is too much for your server.

                       

                      You may tune this by setting RHQ_SERVER_JAVA_OPTS to something like

                       

                      export RHQ_SERVER_JAVA_OPTS="-Xmx256m ....."  (the ... being more arguments)

                      • 8. Re: JBoss On - Starting rhq-server.sh
                        javim

                        Hey Heiko

                         

                        That was the problem!! The server died bcoz it couldnt run JVM bcoz mem problem. I changed params to

                         

                        -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=256M

                         

                        and it already works. I know that is not the correct heap size to make it works correctly. Unless I know that it runs. I'll try to obtain more memmory for my VM.

                         

                        Thank everybody  very much.

                         

                        Best regards,

                        Javier