Re: Tomcat5.5 stops responding after sevral days

2005-09-17 Thread Arthur D'Alessandro
Try adding the LD_ASSUME_KERNEL
from the tomcat readme..


Tomcat on Linux:

GLIBC 2.2 / Linux 2.4 users should define an environment variable:
export LD_ASSUME_KERNEL=2.2.5

Redhat Linux 9.0 users should use the following setting to avoid
stability problems:
export LD_ASSUME_KERNEL=2.4.1


 On 9/16/05, Brian Cook [EMAIL PROTECTED] wrote: 
 
 
 I am running Tomcat 5.5 and about every 2 - 5 days it stops fully
 responding. Meaning that nothing will load in a browser when accessing
 Tomcat but the browser will never time out either. It will just sit
 there waiting forever. It happens to all of the modules loaded in
 webapps as well as to the admin and deployment modules. Nothing in
 Tomcat will respond. Stopping and then restarting Tomcat resolves the
 problem for 2 -5 days until it happens again.
 
 Catalina.out does not show any errors, exceptions, or warnings before it
 happens. Netstat only shows 5 - 10 connections well under the max set
 for any of the modules. Top shows the processor 0% userd with 50 - 100
 MB of RAM and lots of swap space available. The database logs also do
 not report any errors.
 
 Usually when I see the symptom of Tomcat not responding but not timing
 out either. It is caused by an in accessible data base. But in those
 instances the connection failure is logged in catalina.out, it only
 effects the one module that can not get to its data base. This lead me
 to wonder if Tomcat was some how losing its connection to the data base
 that stores the realm user data.(NOTE: This instance of Tomcat is
 configured to access MySQL to get user realm info) But if that were the
 case I would have assumed the failed connection would be logged in
 Catalina.out. Just in case I added ?autoReconnect=true to all of the
 DB URLs but it has not helped.
 
 I could use some ideas of other things I should be looking into and or
 options I should be setting to log more details. Thoughts any one?
 
 I have included system details and the server.xml file below
 
 OS : Redhat 9.0
 JVM : 1.5.3
 Tomcat : 5.5
 MySQL : 4.1.8
 
 
 
 server.xml
 !-- Example Server Configuration File --
 !-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --
 
 !-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances. The Server
 listens for a shutdown command on the indicated port.
 
 Note: A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --
 
 Server port=8005 shutdown=SHUTDOWN
 
 !-- Comment these entries out to disable JMX MBeans support used for the
 administration web application --
 Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener /
 Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
 Listener
 className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/
 
 !-- Global JNDI resources --
 GlobalNamingResources
 
 !-- Test entry for demonstration purposes --
 Environment name=simpleValue type=java.lang.Integer value=30/
 
 !-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
 !-- Resource name=UserDatabase
 auth=Container
 type=org.apache.catalina.UserDatabase
 description=User database that can be updated and saved
 
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=conf/tomcat-users.xml / --
 
 !-- Resource name=UserDatabase
 auth=Container
 type=javax.sql.DataSource
 description=User database that can be updated and saved
 username=root
 password=printtime!!
 driverClassName=com.mysql.jdbc.Driver
 
 url=jdbc:mysql://192.168.2.3/PTOnlineUsers?autoReconnect=true
 maxActive=6 maxIdle=2 /
 --
 /GlobalNamingResources
 
 !-- A Service is a collection of one or more Connectors that share
 a single Container (and therefore the web applications visible
 within that Container). Normally, that Container is an Engine,
 but this is not required.
 
 Note: A Service is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --
 
 !-- Define the Tomcat Stand-Alone Service --
 Service name=Catalina
 
 !-- A Connector represents an endpoint by which requests are received
 and responses are returned. Each Connector passes requests on
 to the
 associated Container (normally an Engine) for processing.
 
 By default, a non-SSL HTTP/1.1 Connector is established on port
 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second
 Connector
 entry. SSL support requires the following steps (see the SSL
 Config
 HOWTO in the Tomcat 5 documentation bundle for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download and install JSSE
 1.0.2 or
 later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
 

Tomcat5.5 stops responding after sevral days

2005-09-16 Thread Brian Cook


I am running Tomcat 5.5 and about every 2 - 5 days it stops fully 
responding.  Meaning that nothing will load in a browser when accessing 
Tomcat but the browser will never time out either.  It will just sit 
there waiting forever.  It happens to all of the modules loaded in 
webapps as well as to the admin and deployment modules.  Nothing in 
Tomcat will respond.  Stopping and then restarting Tomcat resolves the 
problem for 2 -5 days until it happens again.


Catalina.out does not show any errors, exceptions, or warnings before it 
happens.  Netstat only shows 5 - 10 connections well under the max set 
for any of the modules.  Top shows the processor 0% userd with 50 - 100 
MB of RAM and lots of swap space available.  The database logs also do 
not report any errors.


Usually when I see the symptom of Tomcat not responding but not timing 
out either.  It is caused by an in accessible data base.  But in those 
instances the connection failure is logged in catalina.out, it only 
effects the one module that can not get to its data base.  This lead me 
to wonder if Tomcat was some how losing its connection to the data base 
that stores the realm user data.(NOTE:  This instance of Tomcat is 
configured to access MySQL to get user realm info)  But if that were the 
case I would have assumed the failed connection would be logged in 
Catalina.out.  Just in case I added ?autoReconnect=true to all of the 
DB URLs but it has not helped.


I could use some ideas of other things I should be looking into and or 
options I should be setting to log more details.  Thoughts any one?


I have included system details and the server.xml file below

OS :  Redhat 9.0
JVM :  1.5.3
Tomcat : 5.5
MySQL : 4.1.8



server.xml
!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
which may contain one or more Service instances.  The Server
listens for a shutdown command on the indicated port.

Note:  A Server is not itself a Container, so you may not
define subcomponents such as Valves or Loggers at this level.
--

Server port=8005 shutdown=SHUTDOWN

 !-- Comment these entries out to disable JMX MBeans support used for the
  administration web application --
 Listener 
className=org.apache.catalina.mbeans.ServerLifecycleListener /
 Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
 Listener 
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/


 !-- Global JNDI resources --
 GlobalNamingResources

   !-- Test entry for demonstration purposes --
   Environment name=simpleValue type=java.lang.Integer value=30/

   !-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users --
   !-- Resource name=UserDatabase
   auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   
factory=org.apache.catalina.users.MemoryUserDatabaseFactory

   pathname=conf/tomcat-users.xml / --

  !--  Resource name=UserDatabase
   auth=Container
   type=javax.sql.DataSource
   description=User database that can be updated and saved
   username=root
   password=printtime!!
   driverClassName=com.mysql.jdbc.Driver
   
url=jdbc:mysql://192.168.2.3/PTOnlineUsers?autoReconnect=true

   maxActive=6 maxIdle=2 /
  --
 /GlobalNamingResources

 !-- A Service is a collection of one or more Connectors that share
  a single Container (and therefore the web applications visible
  within that Container).  Normally, that Container is an Engine,
  but this is not required.

  Note:  A Service is not itself a Container, so you may not
  define subcomponents such as Valves or Loggers at this level.
  --

 !-- Define the Tomcat Stand-Alone Service --
 Service name=Catalina

   !-- A Connector represents an endpoint by which requests are received
and responses are returned.  Each Connector passes requests on 
to the

associated Container (normally an Engine) for processing.

By default, a non-SSL HTTP/1.1 Connector is established on port 
8080.

You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second 
Connector
entry.  SSL support requires the following steps (see the SSL 
Config

HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 
1.0.2 or

  later, and put the JAR files into $JAVA_HOME/jre/lib/ext.
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA 
(Windows)
$JAVA_HOME/bin/keytool