14 Replies Latest reply on Feb 10, 2010 11:36 PM by akshay singh

    run.sh being killed

    akshay singh Newbie

      Hi All,

       

      while starting up the application server, the process is being killed and following is the last line appended to the log file :-

       

      ./run.sh: line 176: 15962 Killed                  "$JAVA" $JAVA_OPTS -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"


      the script being called is :-

           jboss_startup.sh <instance name>

       

      the above mentioned script internally makes the following call:

           cd $JBOSS_HOME/bin

           nohup ./run.sh -c <instance name> & > <instance name>.log

       

      OS deatils :-

           Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)

       

      About 5GB of RAM is free when the above scenerio takes place.

       

       

      any insight into the above behaviour and a solution for the same will be appreciated.

       

      thanking in anticipation

       

      Regards

       

      Akshay

        • 1. Re: run.sh being killed
          jaikiran pai Master

          Have you set the JAVA_HOME correctly?

           

          What does

           

          echo $JAVA_HOME
          

           

          print on the command line.

          • 2. Re: run.sh being killed
            David Lloyd Master
            Assuming you don't have any automated kill tasks or anything like that - check the system logs (especially dmesg) to see if the OS is killing it off for some reason.
            • 3. Re: run.sh being killed
              akshay singh Newbie

              hi jaikiran ,

               

              java_home is :

               

              /usr/java/jdk1.5.0_11

               

              its being set in .bash_profile

              • 4. Re: run.sh being killed
                akshay singh Newbie

                Hi david,

                 

                output for tail -10 dmesg is :-

                 

                1859794 pages of HIGHMEM
                36063 reserved pages
                868256 pages shared
                31250 pages swap cached
                14737 pages dirty
                0 pages writeback
                324442 pages mapped
                129707 pages slab
                15273 pages pagetables
                Out of memory: Killed process 26436 (java).

                 

                 

                but top shows approx 5gb of memory being free when am starting the server

                 

                reagrds

                 

                update :- i tried starting up the server again. The process was again killed but the output of dmesg hasn't changed.

                              so can i assume that dmesg's output isn't refecting the current process. also the process id of the last launched server cant be found in               dmesg

                • 5. Re: run.sh being killed
                  Rasa Here Novice

                  cd $JBOSS_HOME/bin

                       nohup ./run.sh -c <instance name> & > <instance name>.log

                   

                  please check nohup.out file you will get the exact error. Please try to print the $JAVA_HOME variable with in the script file. If it is showing empty then add the same in run.conf of $JBOSS_HOME/bin and try.

                  • 6. Re: run.sh being killed
                    akshay singh Newbie

                    Hi Rasa,

                     

                    nohup.out, shows the same error when i run the command manually

                     

                    also i get the following line in the log file :-

                     

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

                     

                      JBoss Bootstrap Environment

                     

                      JBOSS_HOME: /home/joa/sw/jboss-3.2.6

                     

                      JAVA: /usr/java/jdk1.5.0_11/bin/java

                     

                      JAVA_OPTS: -server -Xms256m -Xmx512m -Dprogram.name=run.sh

                     

                      CLASSPATH: /home/joa/sw/jboss-3.2.6/bin/run.jar:/usr/java/jdk1.5.0_11/lib/tools.jar

                     

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

                     

                    so java_home is set , had also tried after making an entry in run.conf, but got the same error.

                     

                     

                    Had a query,

                    can the OS be killing this process, if so then how do i get to know if it has done so ?

                     

                    thanks and regards

                     

                    akshay

                    • 7. Re: run.sh being killed
                      Rasa Here Novice

                      Normally nohup gives the reason also. Try nohup ./run.sh & alone and paste the exact error that you are getting in nohup.out.

                      • 8. Re: run.sh being killed
                        akshay singh Newbie

                        Hi Rasa,

                         

                        have attached nohup.out

                         

                        the errror has been appended at the end

                         

                        regards

                         

                        akshay

                        • 9. Re: run.sh being killed
                          Rasa Here Novice

                          mv: cannot stat `JfleXDesigner.war': No such file or directory
                          mv: cannot stat `jflex.com.war': No such file or directory

                          The war file is not exists ???

                           

                          Starting up JBoss for RelApp8020
                          ln: creating hard link `/home/joa/sw/jboss-3.2.6/server/RelApp8020/deploy/jbossweb-tomcat50.sar/ROOT.war/IAServerLog/RelApp8020.txt' to `/home/joa/sw/jboss-3.2.6/bin/RelApp8020.log': File exists
                          ./run.sh: line 176: 30926 Killed                  "$JAVA" $JAVA_OPTS -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"
                          Starting up JBoss for RelRep8040
                          ln: creating hard link `/home/joa/sw/jboss-3.2.6/server/RelRep8040/deploy/jbossweb-tomcat50.sar/ROOT.war/IAServerLog/RelRep8040.txt' to `/home/joa/sw/jboss-3.2.6/bin/RelRep8040.log': File exists

                           

                          From where you are creating the link ????

                          • 10. Re: run.sh being killed
                            akshay singh Newbie

                            Hi Rasa,

                             

                            following is my startup script :-

                             

                            export JBOSS_HOME="this is initialized in the script"
                            if [ -z $1 ] ; then
                              echo "ERROR: Give the jboss config name"
                              exit 1
                            fi
                            ls $JBOSS_HOME/server/$1 1>>/dev/null >>/dev/null 2>/dev/null
                            if [ $? -ne 0 ] ; then
                              echo "ERROR: Give correct jboss config name"
                              exit 1
                            fi
                            cd $JBOSS_HOME/server/$1/deploy
                            mv JfleXDesigner.war ../
                            mv jflex.com.war ../
                            cd $JBOSS_HOME/bin
                            echo "Starting up JBoss for $1"
                            ln $JBOSS_HOME/bin/$1.log $JBOSS_HOME/server/$1/deploy/jbossweb-tomcat50.sar/ROOT.war/ServerLog/$1.txt
                            nohup ./run.sh -c $1 > $1.log &
                                    a=0
                                    while [ $a -eq 0 ] ; do
                                      grep "Started in" $1.log
                                      if [ $? -eq 0 ] ; then
                                        a=10
                                      fi
                                    done

                             

                            vi $1.log

                             

                            cd $JBOSS_HOME/server/$1/deploy
                            mv ../JfleXDesigner.war .
                            mv ../jflex.com.war .

                             

                             

                             

                            the deployment of the wars depends on the ear.

                             

                             

                            in the case of nohup.out the process was killed hence i moved the wars manually and didn't unlink the log file.

                            as a result you can see the above mentioned errors.

                             

                            thanks and regards

                            akshay

                            • 11. Re: run.sh being killed
                              Rasa Here Novice

                              Ok. I hope the nohup.out file that you had send was not generated using this script. What i asked to do it forget about the above given script and use nohup ./run.sh & command and then see what it says. Hope you did that way ???

                               

                              Server Name: RelRep8040 [1;1H [?12l [?25h [24;1H [?1l > [?1049lVim: Error reading input, exiting...

                              Can you check what is this error.

                              • 12. Re: run.sh being killed
                                akshay singh Newbie

                                Server Name: RelRep8040 [1;1H [?12l [?25h [24;1H [?1l > [?1049lVim: Error reading input, exiting...

                                Can you check what is this error.

                                If you look at the script , then a vi command is exceuted at the end. this error is present as a .swp file of the same name was already present.

                                 

                                 

                                 

                                The last to lines in nohuo.out were appended when i ran nohup run.sh -c <> > <>.log

                                 

                                ie.

                                ./run.sh: line 176:   744 Killed                  "$JAVA" $JAVA_OPTS -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"
                                ./run.sh: line 176:  6985 Killed                  "$JAVA" $JAVA_OPTS -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"

                                 

                                 

                                two errors are thrown as i had launched two instances.

                                 

                                hope i cleared some of your ques

                                 

                                thanks and regards

                                akshay

                                • 13. Re: run.sh being killed
                                  Rasa Here Novice

                                  Then what is this <>.log says. Please check one instance at a time and run it using nohup ./run.sh &. Please do it and send me the details. Make sure that a fresh installation working fine in your current enviornment.

                                  • 14. Re: run.sh being killed
                                    akshay singh Newbie

                                    Hi Rasa

                                     

                                    sorry for the late reply, had left for the day

                                     

                                    <>, this was a typo and should have been written as <instance name>. sorry for the same.

                                     


                                    as suggested i ran the server using "nohup run.sh -c serverInstanceName " and got the following :-


                                    ./run.sh: line 176: 16773 Killed                  "$JAVA" $JAVA_OPTS -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"

                                     

                                    this server instance was launched at almost half the normal load.

                                     

                                    after this the machine was rebooted , and the instances were started at a lesser load.

                                     

                                    currently they are working fine. but even after reboot and smooth running for some time we faced the same problem last week. so rebooting seems as a temporary solution.

                                     

                                    thanks and regards

                                    akshay