I'm trying to connect Apache2/mod_jk w/ Tomcat 4.1.12 Coyote via AJP13
over tcp socket. However, I get the following exception from my tomcat.
SEVERE: Caught exception executing
org.apache.jk.common.SocketConnection@1f06dc3, terminating thread
java.lang.NullPointerException
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
543)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533)
at java.lang.Thread.run(Thread.java:536)
Line 543 of ChannelSocket.java (rev 1.21 marked for Tomcat 4.1.12) is
the highlighted line of this method:
/** Process a single ajp connection.
*/
void processConnection(MsgContext ep) {
try {
MsgAjp recv=new MsgAjp();
while( running ) {
int status= this.receive( recv, ep );
if( status <= 0 ) {
if( status==-3)
log.warn( "server has closed the current
connection (-1)" );
else
log.warn("Closing ajp connection " + status );
break;
}
ep.setLong( MsgContext.TIMER_RECEIVED,
System.currentTimeMillis());
ep.setType( 0 );
status= this.invoke( recv, ep );
if( status!= JkHandler.OK ) {
log.warn("processCallbacks status " + status );
break;
}
}
this.close( ep );
} catch( Exception ex ) {
if( ex.getMessage().indexOf( "Connection reset" ) >=0 ) {
log.warn( "Server has closed connection");
} else {
log.error( "Error, closing connection", ex);
}
}
}
So what is null on this line? I can only imagine it would be the
exception's message. So what exception is being thrown in this method
without a message, and how can I prevent it?
Config files follow.
Thanks,
Nick Wesselman
Digital Visions, Inc.
----------------------------------
server.xml
<snip>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8015" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<snip>
jk2.properties
handler.list=channelSocket
channelSocket.port=8015
channelSocket.maxPort=port+0
workers.properties
<snip>
worker.ajp13.port=8015
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
<snip>
