title: Tomcat 7 doesn't shut down, process keeps running?
body: <p>I started tomcat 7 using,</p>
  
  <pre><code>cd /opt/tomcat7/bin    
  $/opt/tomcat7/bin ./startup.sh
  </code></pre>
  
  <p>It shows process running</p>
  
  <pre><code>root     23206  130  3.4 1323956 572880 pts/2  Sl   07:58   1:05 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dspring.profiles.active=mongo1,maxListenersAllowed -DST_SERVER=mongo1 -Djava.endorsed.dirs=/opt/tomcat7/endorsed -classpath /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat7 -Dcatalina.home=/opt/tomcat7 -Djava.io.tmpdir=/opt/tomcat7/temp org.apache.catalina.startup.Bootstrap start
  </code></pre>
  
  <p>If I shutdown it using </p>
  
  <pre><code>$/opt/tomcat7/bin ./shutdown.sh
  </code></pre>
  
  <p>It gives this message</p>
  
  <pre><code>Using CATALINA_BASE:   /opt/tomcat7
  Using CATALINA_HOME:   /opt/tomcat7
  Using CATALINA_TMPDIR: /opt/tomcat7/temp
  Using JRE_HOME:        /usr
  Using CLASSPATH:       /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
  </code></pre>
  
  <p>but if I check the above process, it still shows it running. Tomcat doesn't shut down. I tried it using root user as well but still no success. </p>
  
  <p>Manully I can kill the process but I want to create deploy script so want to do it using shutdown.sh and startup.sh</p>
  
  <p>Same happens if I try using </p>
  
  <pre><code>/opt/tomcat7/bin/catalina.sh start
  /opt/tomcat7/bin/catalina.sh stop
  </code></pre>
  
  <p>Log</p>
  
  <pre><code>Jul 23, 2014 8:26:17 AM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
  Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8081"]
  Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 361 ms
  Jul 23, 2014 8:26:18 AM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Jul 23, 2014 8:26:18 AM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/docs
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/manager
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/ROOT
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/examples
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/host-manager
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory /opt/tomcat7/webapps/target
  Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8081"]
  Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 862 ms
  Jul 23, 2014 8:26:42 AM org.apache.catalina.core.StandardServer await
  INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol pause
  INFO: Pausing ProtocolHandler ["http-bio-8081"]
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol pause
  INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
  Jul 23, 2014 8:26:42 AM org.apache.catalina.core.StandardService stopInternal
  INFO: Stopping service Catalina
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol stop
  INFO: Stopping ProtocolHandler ["http-bio-8081"]
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol stop
  INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol destroy
  INFO: Destroying ProtocolHandler ["http-bio-8081"]
  Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol destroy
  INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
  </code></pre>