You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/10/21 22:05:04 UTC
DO NOT REPLY [Bug 13827] New: -
mod_jk load balancing does not set proper JSESSIONID with tomcat 4.x
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13827>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13827
mod_jk load balancing does not set proper JSESSIONID with tomcat 4.x
Summary: mod_jk load balancing does not set proper JSESSIONID
with tomcat 4.x
Product: Tomcat 4
Version: 4.1.12
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Critical
Priority: Other
Component: Connector:Other
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jcorley@togethersoft.com
If I use tomcat 3.3.1 I end up with a JSESSIONID of "zewmdq9u51.intlic1" where
intlic1 is the name of one of my load balanced workers. However, if I use
tomcat 4.1.12 or 4.0.6 I end up with a JSESSIONID of
"021F58EA1591E5AEADF594A74431E83E" which has no .workername appended to it and
thus never routes my session to the correct server. The configs appended to the
end of this bug report are using the RPM paths, but I've also tried with the
standard tarballs of 4.0.6 and 4.1.12 and duplicated the problem. Here are the
configs I'm using:
-----
mod_jk.conf:
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkMount /*.jsp loadbalancer
JkMount /*.do loadbalancer
JkMount /licensemanager/* loadbalancer
-----
workers.properties
(using the RPM layout just change /var/tomcat4 to /var/tomcat3 and this file
works with tomcat 3.3.1)
workers.tomcat_home=/var/tomcat4
workers.java_home=/usr/java/j2sdk1.4.0_02
ps=/
worker.list=loadbalancer
worker.intlic1.port=8009
worker.intlic1.host=10.4.4.10
worker.intlic1.type=ajp13
worker.intlic1.lbfactor=1
worker.intlic1.local_worker=1
worker.intlic2.port=8009
worker.intlic2.host=10.4.4.11
worker.intlic2.type=ajp13
worker.intlic2.lbfactor=1
worker.intlic2.local_worker=0
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=intlic1,intlic2
worker.loadbalancer.local_worker_only=1
-----
server.xml for tomcat 4.1.12
(I've also tried using the coyote jk2 connector and still had the same results)
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
<Engine name="Standalone" defaultHost="intlic.togethersoft.net" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="intlic.togethersoft.net" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="intlic.togethersoft.net_access_log."
suffix=".txt"
pattern="common"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="intlic.togethersoft.net_log."
suffix=".txt"
timestamp="true"/>
</Host>
</Engine>
</Service>
</Server>
-----
server.xml for tomcat 3.3.1
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<ContextManager workDir="/var/spool/tomcat3" >
<LoaderInterceptor11 useApplicationLoader="true" />
<TrustedLoader />
<LogSetter name="tc_log" timestamps="true"
verbosityLevel="INFORMATION" />
<LogEvents enabled="false" />
<ContextXmlReader config="conf/server.xml" />
<ContextXmlReader config="conf/apps.xml" />
<AutoDeploy source="/var/tomcat3/modules" target="/var/tomcat3/modules"
redeploy="true" />
<AutoWebApp dir="/var/tomcat3/modules" host="DEFAULT" trusted="true"/>
<AutoDeploy source="/var/tomcat3/webapps" target="/var/tomcat3/webapps" />
<AutoWebApp dir="/var/tomcat3/webapps" host="DEFAULT" />
<PolicyLoader securityManagerClass="java.lang.SecurityManager"
policyFile="conf/tomcat.policy" />
<SimpleMapper1 />
<SessionExpirer checkInterval="60" />
<SessionIdGenerator randomClass="java.security.SecureRandom"
randomFile="/dev/urandom" />
<LogSetter name="servlet_log"
timestamps="true"
verbosityLevel = "INFORMATION"
path="/var/log/tomcat3/servlet-${yyyyMMdd}.log"
/>
<LogSetter name="JASPER_LOG"
timestamps="true"
path="/var/log/tomcat3/jasper-${yyyyMMdd}.log"
verbosityLevel = "INFORMATION" />
<WebXmlReader validate="true" />
<ErrorHandler showDebugInfo="true" />
<WorkDirSetup cleanWorkDir="false" />
<Jdk12Interceptor />
<InvokerInterceptor />
<JspInterceptor keepGenerated="true"
largeFile="false"
useJspServlet="false"
/>
<StaticInterceptor listings="true"
useAcceptLanguage="true"
useCharset="locale" />
<ReloadInterceptor fullReload="true" />
<SimpleSessionStore maxActiveSessions="-1" />
<AccessInterceptor />
<CredentialsInterceptor />
<SimpleRealm filename="conf/users/global-users.xml" />
<LoadOnStartupInterceptor />
<Servlet22Interceptor />
<DecodeInterceptor />
<SessionId cookiesFirst="true" noCookies="false" />
<ApacheConfig noRoot="true" />
<IISConfig noRoot="true" />
<NSConfig noRoot="true" />
<Http10Connector port="8080"
secure="false"
maxThreads="100"
maxSpareThreads="50"
minSpareThreads="10" />
<JniConnector />
<Ajp12Connector address="127.0.0.1" port="8007"
AjpidFile="/var/spool/tomcat3/ajp12.id" />
<Ajp13Connector port="8009" AjpidFile="/var/spool/tomcat3/ajp13.id" />
</ContextManager>
</Server>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>