4 Replies Latest reply on Jul 13, 2010 2:56 AM by javim

    JBoss ON - Environment variable

    javim

      When it try to start JON I get the next message

       

      There is no JVM available.
      Please set RHQ_SERVER_JAVA_HOME or RHQ_SERVER_JAVA_EXE_FILE_PATH appropriately.

       

       

      I've tried to set these variables in several locations: /etc/profile, /home/my_home/.basrc. Even into the sh script but i always get the same messge. Does someone know what I'm doing wrong?

       

      Thanks in advance

        • 1. Re: JBoss ON - Environment variable
          ips

          What value did you try setting them to? Did you remember to export the variables?

          • 2. Re: JBoss ON - Environment variable
            javim

            Yes I did. I tried

             

             

            JAVA_HOME=/usr/java/jdk1.6.0_17
            export JAVA_HOME

             

            RHQ_SERVER_HOME=/home/myHome/jon-server-2.3.1.GA
            export RHQ_SERVER_HOME

             

            RHQ_SERVER_JAVA_HOME=/usr/java/jdk1.6.0_17
            export RHQ_SERVER_JAVA_HOME

             

            RHQ_SERVER_JAVA_EXE_FILE_PATH=/usr/java/jdk1.6.0_17/bin/java
            export RHQ_SERVER_JAVA_EXE_FILE_PATH

             

             

            I tried jre path too.But still the same :-(

            • 3. Re: JBoss ON - Environment variable
              ips

              Hmm, that looks fine.

               

              Try changing the first line of rhq-server.sh to:

               

              #!/bin/sh -x

               

              Then try running it again. That will tell the shell to echo each line in the script as it executes it and might shed some light on why it's failing.

              • 4. Re: JBoss ON - Environment variable
                javim

                That was a great idea Ian. Thanks. I could check that It didn't recognize my environment variables even if I put them into /etc/profile or /home/myhome/.bashrc or /home/myhome/.bash_profile.

                 

                Anyway, I put them into the rhq-server.sh and it alredy recognize them. But i got a new error talking about one process.

                 

                 

                + 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