tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Köhler <skoeh...@upb.de>
Subject Re: socket errors in catalina.out and mod_jk.log
Date Wed, 26 Feb 2003 16:57:46 GMT
> Could you give us more information :
> 
> - jk version you're using (jk or jk2)

mod_jk (not mod_jk 2) version 1.2.2

> - Apache webserver (1.3/2.0)

apache 1.3.27

> - Operating system hosting tomcat and apache

it's suse linux 7.3 with kernel 2.4.20 with sun jdk 1.4.1_01

> This message appears in tomcat in wait for ajp message,
> since Operating system return Read timed out instead of
> Read error.

read-error should not happen, as mod_jk could send a quit-paket or 
something (analog to the ftp-protocol)
if mod_jk doesn't do that, it's a design-error.

> Are you using Windows OS ?

no

> ===>
> 
>     void processConnection(MsgContext ep) {
>         try {
>             MsgAjp recv=new MsgAjp();
>             while( running ) {
>                 int status= this.receive( recv, ep );
>                 if( status <= 0 ) {
>                     if( status==-3)
>                         log.debug( "server has been restarted or reset 
> this connection" );
>                     else
>                         log.warn("Closing ajp connection " + status );
>                     break;
>                 }
>                 ep.setLong( MsgContext.TIMER_RECEIVED, 
> System.currentTimeMillis());
> 
>                 ep.setType( 0 );
>                 // Will call next
>                 status= this.invoke( recv, ep );
>                 if( status!= JkHandler.OK ) {
>                     log.warn("processCallbacks status " + status );
>                     break;
>                 }
>             }
>         } catch( Exception ex ) {
>             if( ex.getMessage().indexOf( "Connection reset" ) >= 0)
>                 log.debug( "Server has been restarted or reset this 
> connection");

you analyse the text within the exception's message?
this is not the best way, because the message's might change, or is 
there any statement by sun, that these texts won't change?

>             else if (ex.getMessage().indexOf( "Read timed out" ) >=0 )
>                 log.info( "connection timeout reached");
>             else
>                 log.error( "Error, processing connection", ex);



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


Mime
View raw message