4 Replies Latest reply on Nov 28, 2012 7:42 AM by daniele_athome

    How to stop GateIn3.1.0-tomcat properly?

    ssl oss Newbie

      Hi, all.

       

      Does anyone know how to stop gatein properly?

       

      After I run "gatein.sh stop", the listening process is still there (netstat -lntp)...

      Therefore, after a couple of running "gatein.sh start" and "gatein.sh stop",

      many processes has been left and nobody uses them.

       

      my environment is:

         Centos5.5

         openJDK1.6.0

         GateIn3.1.0-tomcat

       

      Thank you,

      Kenta

        • 1. Re: How to stop GateIn3.0.1-tomcat properly?
          ssl oss Newbie

          I think the process that has been left is jvm...

          It should be killed by only running "gatein.sh stop".

           

          Am I doing something wrong??

           

          Kenta

          • 2. Re: How to stop GateIn3.0.1-tomcat properly?
            ssl oss Newbie

            The processes are left something like this...(this is after I ran "gatein.sh start" "gatein.sh stop" twice)

            You can see two java processes are left. Anybody knows what causes this problem and how to avoid it??

             

            -------------------------------------------------------------------------------------

            [root@localhost conf]# ps aux | grep java

            root     20500  6.4 21.3 998744 438920 pts/0   Sl   11:30   0:52 /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/root/GateIn-3.1.0-GA/conf/logging.properties -Xms128m -Xmx384m -XX:MaxPermSize=192m -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Djava.security.auth.login.config=../conf/jaas.conf -Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf -Dhttp.proxyHost=<PROXY_HOST> -Dhttp.proxyPort=<PROXY_PORT> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/root/GateIn-3.1.0-GA/endorsed -classpath :/root/GateIn-3.1.0-GA/bin/bootstrap.jar -Dcatalina.base=/root/GateIn-3.1.0-GA -Dcatalina.home=/root/GateIn-3.1.0-GA -Djava.io.tmpdir=/root/GateIn-3.1.0-GA/temp org.apache.catalina.startup.Bootstrap start

            root     20803 13.6 18.0 971908 370768 pts/0   Sl   11:39   0:36 /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/root/GateIn-3.1.0-GA/conf/logging.properties -Xms128m -Xmx384m -XX:MaxPermSize=192m -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Djava.security.auth.login.config=../conf/jaas.conf -Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf -Dhttp.proxyHost=<PROXY_HOST> -Dhttp.proxyPort=<PROXY_PORT> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/root/GateIn-3.1.0-GA/endorsed -classpath :/root/GateIn-3.1.0-GA/bin/bootstrap.jar -Dcatalina.base=/root/GateIn-3.1.0-GA -Dcatalina.home=/root/GateIn-3.1.0-GA -Djava.io.tmpdir=/root/GateIn-3.1.0-GA/temp org.apache.catalina.startup.Bootstrap start

            root     20989  0.0  0.0  65420   832 pts/0    S+   11:44   0:00 grep java

            -------------------------------------------------------------------------------------

             

            Thank you,

            Kenta

            • 3. How to stop GateIn3.0.1-tomcat properly?
              ssl oss Newbie

              I finally figured out how.

               

              In order to call catalina.sh, I needed to pass some parameters that are required in catalina.sh...

              Even though gatein.sh passes some, it seems not enough.

               

              I wonder how others manage this, just killing the left process each time stop the server, or have not have this issue...

              Please let me know more info about yours.

               

              Thank you,

              Kenta

              • 4. Re: How to stop GateIn3.1.0-tomcat properly?
                daniele_athome Newbie

                I hit that issue too. I requested a thread dump to the VM and it seems there are many daemon thread still active when Tomcat shuts down. Although I did manage to terminate a couple of them by "regular" means, others of unknown nature (at least to me) remain active.

                I gave up and forcibly kill the process when I need to stop Tomcat. You can use environment variable CATALINA_PID, it will work with gatein.sh stop -force .