aspose file tools*
The moose likes Tomcat and the fly likes Tomcat goes down every few minutes after startup on VPS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat goes down every few minutes after startup on VPS" Watch "Tomcat goes down every few minutes after startup on VPS" New topic
Author

Tomcat goes down every few minutes after startup on VPS

Ashok Rcm
Greenhorn

Joined: May 01, 2013
Posts: 2
Tomcat goes down every few minutes after startup. It doesnt say any reason.

Its new VPS, new Tomcat. No webapps are installed.

Tomcat Logs are below..




May 02, 2013 8:47:16 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/amd64:/usr/lib64:/lib64:/lib:/usr/lib
May 02, 2013 8:47:16 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 02, 2013 8:47:16 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 02, 2013 8:47:16 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 490 ms
May 02, 2013 8:47:16 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 02, 2013 8:47:16 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.39
May 02, 2013 8:47:16 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /root/apache-tomcat-7.0.39/webapps/host-manager
May 02, 2013 8:47:16 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /root/apache-tomcat-7.0.39/webapps/manager
May 02, 2013 8:47:16 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /root/apache-tomcat-7.0.39/webapps/docs
May 02, 2013 8:47:17 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /root/apache-tomcat-7.0.39/webapps/examples
May 02, 2013 8:47:17 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /root/apache-tomcat-7.0.39/webapps/ROOT
May 02, 2013 8:47:17 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2013 8:47:17 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2013 8:47:17 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 542 ms
May 02, 2013 8:50:01 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
May 02, 2013 8:50:03 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
May 02, 2013 8:50:05 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
May 02, 2013 8:50:05 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
May 02, 2013 8:50:07 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
May 02, 2013 8:50:09 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
May 02, 2013 8:50:09 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,

Premises are no web apps deployed and an automatic ordered shut down.
An OOM killer?

Could you monitorize your tomcat with java visual console to gather more info.?


Best regards,



Ashok Rcm
Greenhorn

Joined: May 01, 2013
Posts: 2
What is OOM killer? Also how do i monitor them?
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Ashok Rcm wrote:What is OOM killer?

From wikipedia
The typical OOM case in modern computers happens when the operating system is unable to create any more virtual memory, because all of its potential backing devices have been filled. Operating systems such as Linux will attempt to recover from this type of OOM condition by terminating a low-priority process, a mechanism known as the OOM Killer,


Try to monitorize Tomcat running the JDK tool JAVA_HOME/bin/jvisualvm, double click Tomcat in the applications panel and switch to monitor tab
Java VisualVM reference and ensure that no custom code / app is deployed (also remove tomcat manager).


Best regards,



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

I don't know anything about this "OOM Killer", and all my servers are Linux, but it does appear that SOMETHING external is sending a Shutdown signal to Tomcat via its control port (8009).


Customer surveys are for companies who didn't pay proper attention to begin with.
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi Tim,

In your shutdown log port 8009 seems to listen to ajp and default Tomcat shutdown port is 8005.
The documentation states that is possible to shutdown Tomcat with an ajp request ajp connector attributes
request.shutdownEnabled
If true and a secret has been configured, a correctly formatted AJP request (that includes the secret) will shutdown the Tomcat instance associated with this connector. This is set to false by default.

but also says that "This is set to false by default".

If you think that the shudown comes from the ajp connector you could try to set explicitly.

Sorry I can't help much but for sure is an 'interesting' issue,
 
wood burning stoves
 
subject: Tomcat goes down every few minutes after startup on VPS