You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Emmanuel JACQUET <em...@adec.fr> on 2005/11/08 19:45:45 UTC

tomcat 4.1 crashing after few minutes / java.net.ConnectException: Connection timed out

Hello gurus

I got a problem with a tomcat server, hosting multiple websites. Tomcat
is crashing after a few minutes, the only message i have is

"Cannot connect to this database.
java.sql.SQLException: Unable to connect to any hosts due to exception:
java.net.ConnectException: Connection timed out"

Normally, it works perfectly, but we had a shutdown due to a power cut.
Now, Tomcat runs a few minutes without problems then crashes.

Thanks for your suggestions!

Here is the description of the system

Httpd service is in front of Tomcat with a Apj13 connector between.
There are multiple virtualhosts in httpd.conf. There is only one
connector called with JkMount. Tomcat has been configured with one
engine tag and several hosts (see server.xml here included). We mostly
use Opencms with a mysql 3.23 database

Some informations:
Mysql is up and running. It accepts a lot of simultaneous connections
(2048 at least).
Tomcat runs with JAVA_OPTS="-Xms600m -Xmx600m"
The server has 2go memory (never using swap)

Red Hat Linux release 9 (Shrike)
tomcat : Apache Tomcat/4.1.30
java : j2sdk1.4.2_05
httpd : Apache/2.0.40
mysqld : 3.23.58


****************************
*  extract of catalina.out *
****************************


****************************
starting :
****************************

Démarrage du service Tomcat-Apache
Apache Tomcat/4.1.30
WebappLoader[/opencms]: Deploying class repositories to work directory
/usr/local/jakarta-tomcat-4.1.30/work/AllWebSites/www.bureau-alsace.c
om/opencms
WebappLoader[/opencms]: Deploy class files /WEB-INF/classes to
/home/tomcat/bureaualsace/webapps/opencms/WEB-INF/classes
WebappLoader[/opencms]: Deploy JAR /WEB-INF/lib/PDFBox-0.5.6-mpb.jar to
/home/tomcat/bureaualsace/webapps/opencms/WEB-INF/lib/PDFBox-0.5.6-m

****************************
[etc etc, no problems]
then
****************************

Ajp13Connector[8009] Opening server socket on host IP address localhost
Ajp13Connector[8009] Starting background thread
Ajp13Processor[8009][0] Starting background thread
Ajp13Processor[8009][1] Starting background thread
Ajp13Processor[8009][2] Starting background thread
...
Ajp13Processor[8009][9] Starting background thread

****************************
at this point, all websites are running normally.

then a few minutes after :
****************************

Ajp13Processor[8009][10] Starting background thread
Ajp13Processor[8009][11] Starting background thread
Cannot connect to this database.
java.sql.SQLException: Unable to connect to any hosts due to exception:
java.net.ConnectException: Connection timed out
Arrêt du service Tomcat-Apache
Ajp13Processor[8009][11] Stopping background thread
Ajp13Processor[8009][10] Stopping background thread
...
Ajp13Processor[8009][1] Stopping background thread
Ajp13Processor[8009][0] Stopping background thread
Ajp13Connector[8009] Stopping background thread

****************************
at this point, tomcat is down.

****************************

*******************
*  server.xml     *
*******************


<Server port="8005" shutdown="unechainealacon" debug="3">
        <Service name="Tomcat-Apache">
        <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                address="localhost" port="8009" minProcessors="5"
maxProcessors="75"
                enableLookups="false" acceptCount="30" debug="3"/>
        <Engine name="AllWebSites" debug="0"
defaultHost="notremachine.adelis.net">
                <Logger
className="org.apache.catalina.logger.SystemOutLogger"
                verbosity="5"/>
                <Host name="notremachine.adelis.net" debug="0"
unpackWARs="false">
                        <Context path=""
docBase="/home/tomcat/default/webapps"
                                debug="0" reloadable="false" />
                        <Valve
className="org.apache.catalina.valves.AccessLogValve"
                                prefix="localhost_access." suffix=".log"
                                pattern="common"       
                                directory="/home/tomcat/default/logs"/>
                </Host>
                <Host name="www.trucmuche.fr" debug="0" unpackWARs="false"
                        appBase="/home/tomcat/trucmuche/webapps">
                        <Alias>www.trucmuche.com</Alias>
                        <Context path="/opencms" docBase="opencms"
                                debug="0" reloadable="true"/>
                        <Context path="/soap"
                                docBase="soap"
                                debug="0" reloadable="false" />
                        <Valve
className="org.apache.catalina.valves.AccessLogValve"
                                prefix="host_access." suffix=".log"
                                pattern="common"
                                directory="/home/tomcat/roederer/logs"/>
                </Host>
        </Engine>
        </Service>
</Server>


***************************
*   workers.properties    *
***************************

# workers.properties - ajp13
#
# List workers
worker.list=wrkr
#
# Define wrkr
worker.wrkr.port=8009
worker.wrkr.host=localhost
worker.wrkr.type=ajp13
worker.wrkr.cachesize=10
worker.wrkr.cache_timeout=20
worker.wrkr.socket_timeout=10

-- 
Emmanuel JACQUET
IT engineer
ADEC (http://www.adec.fr)
Tel : +33.388722910
Fax : +33.388722919
http://pgpkeys.mit.edu (ID : 0x7309430A)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat 4.1 crashing after few minutes / java.net.ConnectException: Connection timed out [solved]

Posted by Emmanuel JACQUET <em...@adec.fr>.
Emmanuel JACQUET a écrit :

>Hello gurus
>
>I got a problem with a tomcat server, hosting multiple websites. Tomcat
>is crashing after a few minutes, the only message i have is
>
>"Cannot connect to this database.
>java.sql.SQLException: Unable to connect to any hosts due to exception:
>java.net.ConnectException: Connection timed out"
>  
>

Hello

I have found that the problem is located in a specific java application
used in only one website. This application crashes the whole system, but
it is not a server configuration's problem.  And .. ok, I do not
understand why it appeared after a server reboot.

Thank you !

Emmanuel



-- 
Emmanuel JACQUET
Ingenieur systemes d'information
ADEC (http://www.adec.fr)
Tel : +33.388722910
Fax : +33.388722919
http://pgpkeys.mit.edu (ID : 0x7309430A)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org