Bug 52793

Summary: jk sending the activate of null to server.
Product: Tomcat Connectors Reporter: Yoshihito Fukuyama <yoshihito.fukuyama>
Component: mod_jkAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: 1.2.32   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Yoshihito Fukuyama 2012-02-29 06:08:13 UTC
I used jenkins and apache httpd and mod_jk 1.2.32.
Jenkins throws NullPointerException.

mod_jk config:
---- mod_jk.conf
JkWorkersFile conf/workers.properties
JkMount /* jenkins

---- workers.properties
worker.list=jenkins
worker.jenkins.type=ajp13
worker.jenkins.host=localhost
worker.jenkins.port=8009
----

jenkins log:
----
:
Feb 29, 2012 1:11:07 PM hudson.WebAppMain$2 run
INFO: Jenkins is fully up and running
Feb 29, 2012 1:26:40 PM winstone.Logger logInternal
SEVERE: Error within request handler thread
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:411)
        at winstone.ajp13.Ajp13IncomingPacket.parsePacket(Ajp13IncomingPacket.java:163)
        at winstone.ajp13.Ajp13Listener.allocateRequestResponse(Ajp13Listener.java:184)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:79)
        at java.lang.Thread.run(Thread.java:636)
:
----
This is bug in the jenkins(winstone)...


But I think due to the initialization of mod_jk 1.2.32.

---- svn diff
Index: common/jk_util.c
===================================================================
--- common/jk_util.c    (revision 1294951)
+++ common/jk_util.c    (working copy)
@@ -2079,7 +2079,7 @@
     s->attributes_values = NULL;
     s->num_attributes = 0;
     s->route = NULL;
-    s->activation = JK_LB_ACTIVATION_ACTIVE;
+    s->activation = JK_LB_ACTIVATION_TEXT_ACTIVE;
     s->secret = NULL;
     s->reco_buf = NULL;
     s->reco_status = RECO_NONE;
----


http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html
Changes between 1.2.31 and 1.2.32
LB: Forward worker activation state as request attribute "JK_LB_ACTIVATION".
Possible values are "ACT" (active), "DIS" (disabled) and "STP" (stopped).
Comment 1 Rainer Jung 2012-03-03 14:42:36 UTC
Your fix is correct. I applied it as r1296630. It will be part of the next version 1.2.33.

Thanks!