wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Problem with continuation of tomcat service on WEB SERVER Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem with continuation of tomcat service on WEB SERVER" Watch "Problem with continuation of tomcat service on WEB SERVER" New topic
Author

Problem with continuation of tomcat service on WEB SERVER

bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
Dear All reader,

I am working on virtual dedicated Linux server. My entire application pages, starting from home page of website, are in jsp which require
tomcat service in running mode.

Since two to three days I am facing some problem with TOMCAT service. Tomcat service get automatically stop without any intervention. And I got 503 error when I try to open web site.
Suggest something so that I easily monitor and start Tomcat again using some programming.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Did you check log files already?
bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
Yes I have checked all log files.
In tomcat catalina log files there is something like

Dec 16, 2009 10:48:08 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:180)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)
Dec 16, 2009 10:48:14 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.5.0_14/jre/lib/i386/server:/usr/java/jdk1.5.0_14/jre/lib/i386:/usr/java/jdk1.5.0_14/jre/../lib/i386
Dec 16, 2009 10:48:14 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 16, 2009 10:48:14 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-9080
Dec 16, 2009 10:48:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1241 ms
Dec 16, 2009 10:48:14 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name PSA
Dec 16, 2009 10:48:15 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 16, 2009 10:48:15 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
Dec 16, 2009 10:48:15 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Dec 16, 2009 10:48:36 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 16, 2009 10:48:36 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 16, 2009 10:48:36 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Dec 16, 2009 10:48:36 AM org.apache.catalina.core.StandardService start
INFO: Starting service PSA
Dec 16, 2009 10:48:36 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
Dec 16, 2009 10:48:36 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Dec 16, 2009 10:48:37 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:9008
Dec 16, 2009 10:48:37 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/3 config=null
Dec 16, 2009 10:48:37 AM org.apache.catalina.connector.MapperListener registerEngine
WARNING: Unknown default host: localhost
Dec 16, 2009 10:48:37 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-9080
Dec 16, 2009 10:48:37 AM org.apache.catalina.connector.MapperListener registerEngine
WARNING: Unknown default host: localhost
Dec 16, 2009 10:48:37 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Dec 16, 2009 10:48:37 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 22486 ms
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470

You need to check log files after Tomcat stopped. The logs you have provided just show that Tomcat started.

By the way did you install anything else on the machine two three days ago? Any firewall changes? Any antivirus software updates? What Tomcat version? What operation system?
bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
the lines i have show you was the complete log file for today.
I am using Tomcat 5.
I haven't install any software or haven't change any firewall setting.
I am using Linux oprating System on web server
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
bhagyashri Ajagare wrote:the lines i have show you was the complete log file for today.


Did it stop today?
bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
Yes it get stop today also.
And not only once, it get stop more than two times.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
But the 503 status is supposed to mean the following:

503 Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length
of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD
handle the response as it would for a 500 response.
Note: The existence of the 503 status code does not imply that a server must use it when becoming
overloaded. Some servers may wish to simply refuse the connection.


rather than the fact that the server is not running. Does that make any sense?

Bill
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
bhagyashri Ajagare wrote:Yes it get stop today also.
And not only once, it get stop more than two times.


bhagyashri, as William correctly pointed you need to provide your definition for the sentence "Tomcat service get automatically stop without any intervention". Is the server running while you are getting 503 error in your application?
bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
yes just tomcat service and all other services depend upon Tomcat service get stop.
Other services on server like MySQL phpmyadmin page, mail server etc. are running properly.
bhagyashri Ajagare
Greenhorn

Joined: Dec 15, 2009
Posts: 6
Problem is not solved ,but I got answer for my problem.
Tomcat service is get stopped because out of memory error.
As I will increase my RAM problem would get resolved.

Anyways thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with continuation of tomcat service on WEB SERVER