bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / docs / miscellaneous / faq.html
1 <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>The Apache Tomcat Connector - Miscellaneous Documentation - FAQ</title><meta name="author" value="Henri Gomez"><meta name="email" value="hgomez@apache.org"><link href="../style.css" type="text/css" rel="stylesheet"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="4"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="left" alt="Apache Tomcat" border="0"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server</a></li><li><a href="../reference/iis.html">IIS</a></li></ul><p><strong>Generic HowTo</strong></p><ul><li><a href="../generic_howto/quick.html">For the impatient</a></li><li><a href="../generic_howto/workers.html">All about workers</a></li><li><a href="../generic_howto/timeouts.html">Timeouts</a></li><li><a href="../generic_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../generic_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Webserver HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server</a></li><li><a href="../webserver_howto/iis.html">IIS</a></li><li><a href="../webserver_howto/nes.html">Netscape/SunOne/Sun</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=Tomcat+Connectors&amp;long_desc_type=substring&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;keywords_type=allwords&amp;keywords=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Reuse+same+sort+as+last+time&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li><a href="../news/20041100.html">2004</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connector - Miscellaneous Documentation</h1><h2>FAQ</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/faq.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version
2                     </a></small></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="General"><strong>General</strong></a></font></td></tr><tr><td><blockquote>
3 <p>
4 General Informations and FAQ about JK
5 </p>
6 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Where can I get help/support for JK ?"><strong>Where can I get help/support for JK ?</strong></a></font></td></tr><tr><td><blockquote>
7 <p>
8 The primary mechanism for support is through the JK 
9 documentation included in the doc directory.
10 Documentation is also available on the Apache Tomcat web site devoted to the
11 <a href="http://tomcat.apache.org/connectors-doc/">
12 Apache Tomcat Connectors Project</a>
13 For additional help, the best resource is the Tomcat Users Discussion list.  
14 You should start by searching
15 <a href="http://mail-archives.apache.org/mod_mbox/tomcat-users/">
16 the mail list archive</a>
17 before you post questions to the list.  
18 If you are unable to locate the answer to your question in the archive, 
19 you can post questions about JK to the user list for assistance.  
20 Make sure that you include the version of your Webserver, 
21 that you are using as well as the platform you are running on
22 and go 
23 <a href="http://tomcat.apache.org/lists.html">
24 here</a>
25 to determine how to subscribe to tomcat mailing list.
26 </p>
27 </blockquote></td></tr></table>
28
29 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="I can't find JK anywhere. Where is it?"><strong>I can't find JK anywhere. Where is it?</strong></a></font></td></tr><tr><td><blockquote>
30 <p>
31 Now that JK moved to the <b>tomcat-connectors</b> repository, 
32 the source and the binaries for JK can be downloaded from a mirror at the
33 <a href="http://tomcat.apache.org/download-connectors.cgi">
34 Tomcat Connectors (mod_jk, mod_jk2) Downloads</a> page.
35 </p>
36 </blockquote></td></tr></table>
37
38 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="What's the difference between JK and mod_jk ?"><strong>What's the difference between JK and mod_jk ?</strong></a></font></td></tr><tr><td><blockquote>
39 <br>
40 <p>
41 <b>JK</b> is a project covering web-servers to Tomcat connectors,
42 whereas <b>mod_jk</b> is the <a href="../webserver_howto/apache.html">Apache module</a> developed in JK.
43 </p>
44
45 <p>
46 <a href="../webserver_howto/iis.html">IIS webserver</a>support is implemented on JK, using a redirector
47 called <b>isapi redirector</b>.
48 </p>
49
50 <p>
51 <a href="../webserver_howto/nes.html">Netscape/SunONE/Sun webserver</a>webserver support is implemented on JK, using a redirector
52 called <b>nsapi redirector</b>.
53 </p>
54
55 </blockquote></td></tr></table>
56
57 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Where can I get more information ?"><strong>Where can I get more information ?</strong></a></font></td></tr><tr><td><blockquote>
58 <p>
59 For <b>JK 1.2.x</b>, you should read :
60 </p>
61
62 <ul>
63
64 <li>
65 <a href="../generic_howto/quick.html">For the impatient</a>
66 </li>
67
68 <li>
69 <a href="../webserver_howto/apache.html">Apache and JK</a>
70 </li>
71
72 <li>
73 <a href="../webserver_howto/iis.html">IIS and JK</a>
74 </li>
75
76 <li>
77 <a href="../webserver_howto/nes.html">Netscape/SunONE/Sun and JK</a>
78 </li>
79
80 <li>
81 <a href="../generic_howto/workers.html">Workers configuration</a>
82 </li>
83 </ul>
84
85 <p> 
86 For more detailed information, have a look at the Reference Guide.
87 You could also try searching the mailing list archives for "JK" or look at the source.
88 </p>
89 </blockquote></td></tr></table>
90
91 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Which protocol should I use? Ajp12 or Ajp13?"><strong>Which protocol should I use? Ajp12 or Ajp13?</strong></a></font></td></tr><tr><td><blockquote>
92 <p>
93 <a href="../ajp/ajpv13a.html">Ajp13</a> is a newer protocol, it's faster, and it works better with SSL. 
94 You almost certainly want to use it now that <strong>ajp12 is deprecated</strong>.
95 </p>
96 <p> 
97 Also ajp13 is supported by all Apache Tomcat including 3.2.x , 3.3.x, 4.0.x, 4.1.x, 5.0.x, 5.5.x
98 and the new tomcat 6. 
99 </p>
100
101 <p>
102 Others Servlet engines like <b>jetty</b> have support for Ajp13.
103 </p>
104 </blockquote></td></tr></table>
105
106 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="I've got a firewall between my web server and Tomcat which drops ajp13 connections after some time"><strong>I've got a firewall between my web server and Tomcat which drops ajp13 connections after some time</strong></a></font></td></tr><tr><td><blockquote>
107 <p>
108 Ajp13 uses persistant connections where the traffic could be null if there is no request to be sent to Tomcat. 
109 Firewalls use to drop inactive connections and will make your web server and Tomcat think the connection is valid. 
110 </p>
111 <p>
112 Starting with JK 1.2.0, a <b>socket_keepalive</b> property as been added to ajp13 settings, and you should take a look at 
113 it in <a href="../generic_howto/workers.html">Workers HowTo</a> and
114 <a href="../reference/workers.html">workers.properties reference</a>.
115 If nothing else helps, you can try <b>JkOptions +DisableReuse</b>, but this will have strong performance implications.
116 </p>
117 </blockquote></td></tr></table>
118
119 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Under heavy load, I've got many threads in Tomcat even if my Apache Web Server handles much of the load"><strong>Under heavy load, I've got many threads in Tomcat even if my Apache Web Server handles much of the load</strong></a></font></td></tr><tr><td><blockquote>
120 <p>
121 Under heavy load, Apache Web Server creates many children to handle the load,
122 which will in turn create many connections 
123 to Tomcat to forward the requests they should handle. 
124 Apache Web Server will normally kill the children/threads when the load decreases.
125 But if the load is still there and even if only Apache handles the requests,
126 ie static contents, the children are kept and with them all the ajp13 connections, 
127 even if they are no more used. 
128 </p>
129 <p>
130 To close connections after some time of inactivity you can use <b>connection_pool_timeout</b>,
131 for more informations refer to <a href="../reference/workers.html">workers.properties reference</a>.
132 </p>
133 </blockquote></td></tr></table>
134
135 </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Apache"><strong>Apache</strong></a></font></td></tr><tr><td><blockquote>
136 <p>
137 Informations and FAQ about mod_jk and Apache Web Servers. 
138 </p>
139 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Whenever I restart Tomcat, Apache locks up!"><strong>Whenever I restart Tomcat, Apache locks up!</strong></a></font></td></tr><tr><td><blockquote>
140 <p>
141 The Ajp13 protocol keeps an open socket between Tomcat and Apache.
142 Release of mod_jk present in J-T-C handles the network failure. 
143 But with very ancient releases of mod_jk, you may have to restart Apache as well.
144 </p>
145 </blockquote></td></tr></table>
146
147 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Why do there exist two files mod_jk.so (-eapi ad -noeapi) in download directories for Apache 1.3?"><strong>Why do there exist two files mod_jk.so (-eapi ad -noeapi) in download directories for Apache 1.3?</strong></a></font></td></tr><tr><td><blockquote>
148 <p>
149 Many versions of Apache use a modified API, known at Extended API, developed for use with the
150 <a href="http://www.modssl.org">mod_ssl module</a>. Starting with Apache 2.0 there is no more difference.
151 </p>
152
153 <p>
154 For example, Apache 1.3 present in certains recent Linux distributions include the
155 <b>mod_ssl</b> module.
156 </p>
157
158 <p>
159 So if you got such 'Extended Apache', you need to use <b>mod_jk.so-eapi</b>.
160 </p>
161
162 <p> 
163 You should use <b>mod_jk.so-noeapi</b> only for 'Standard Apache' (ie without mod_ssl).
164 </p>
165
166 <p>
167 It's wise to avoid using EAPI modules on STD API Apache or to use standard API modules on EAPI Apache. 
168 Allways be sure to have the <b>mod_jk.so</b> witch match your version of Apache
169 </p>
170 </blockquote></td></tr></table>
171
172 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="What's that message about 'garbled DSO ?'"><strong>What's that message about 'garbled DSO ?'</strong></a></font></td></tr><tr><td><blockquote>
173 <p>
174 It's related to Apache EAPI, the message <b class="code">'mod_jk.so is garbled - perhaps this is not an Apache module DSO ?'</b> 
175 just told you, that your're trying to install a mod_jk.so DSO module that was compiled on an Apache using EAPI, 
176 like apache-mod_ssl or apache from Redhat distro 6.2/7.0 but your system use the standard apache with normal API.
177 </p>
178 </blockquote></td></tr></table>
179
180 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="And the message about 'module might crash under EAPI!"><strong>And the message about 'module might crash under EAPI!</strong></a></font></td></tr><tr><td><blockquote>
181 <p>
182 Also related to EAPI, the message <b class="code">'[warn] Loaded DSO /usr/lib/apache/mod_jk.so uses plain Apache 1.3 API, 
183 this module might crash under EAPI! (please recompile it with -DEAPI)'</b>, the mod_jk.so was compiled under normal 
184 Apache with standard API and you try to install the module on an Apache using EAPI.
185 </p>
186 </blockquote></td></tr></table>
187
188 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="APXS is getting an error during the build of mod_jk, like rc=0 or rc=255.  I tried all of the steps in the build section, what do I do now ?"><strong>APXS is getting an error during the build of mod_jk, like rc=0 or rc=255.  I tried all of the steps in the build section, what do I do now ?</strong></a></font></td></tr><tr><td><blockquote>
189 <p>
190 APXS is a Perl script that is created when you build the Apache web server from source.  
191 Chances are that if you are getting these errors and you obtained Apache as a binary distribution, 
192 that APXS is not configured correctly for your system.  
193 Your best bet is to get the Apache source from http://httpd.apache.org and build it yourself.  
194 Use the following for a basic build (read the Apache docs for other options):
195 <p class="screen"><div align="left"><table width="80%" border="1" cellspacing="0" cellpadding="2" bgcolor="#000000"><tr><td bgcolor="#000000" align="left"><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">cd /usr/local/src</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">gzip -dc apache_1.3.19.tar.gz|tar xvf -</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">cd apache_1.3.19</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">./configure --prefix=/usr/local/apache \</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">            --enable-module=most \</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">            --enable-shared=max</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">make</b></nobr></code><br><code><nobr><em class="screen">[user@host] ~ $ </em><b class="screen">make install</b></nobr></code><br></td></tr></table></div></p>
196 </p>
197 <p>
198 Note: The above steps assume that you downloaded the Apache source and placed it in your /usr/local/src directory.
199 </p>
200 </blockquote></td></tr></table>
201
202 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Apache 2.0 complains about incorrect module version"><strong>Apache 2.0 complains about incorrect module version</strong></a></font></td></tr><tr><td><blockquote>
203 <p>
204 Since Apache 2.0 API still change often, the Apache 2.0 teams decide to put in headers of compiled modules the 
205 Apache 2.0 version used to compile the module. This check is called Magic Module Number bump.
206 </p>
207 <p>
208 At start time Apache 2.0 check that version in modules headers and stop if it detect that a module was compiled 
209 for another Apache 2.0 version. As such you should allways use modules compiled for the same Apache 2.0 version. 
210 This check may be removed if the future.
211 </p>
212 </blockquote></td></tr></table>
213
214 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Does it work for Apache 2.2?"><strong>Does it work for Apache 2.2?</strong></a></font></td></tr><tr><td><blockquote>
215 <p>
216 mod_jk works well with Apache 2.2. You need a binary module compiled for version 2.2 of the Apache web server.
217 A binary compiled for version 2.0 will not work.
218 </p>
219 <p>
220 Important parts of the functionality of mod_jk have been reimplemented as Apache httpd modules mod_proxy_ajp
221 and mod_proxy_balancer. These are part of the standard distributoin of Apache 2.2. The new modules do not contain
222 all features of mod_jk, but you get them automatically with every Apache 2.2.
223 </p>
224 </blockquote></td></tr></table>
225
226 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="JNI doesn't work with Apache 1.3"><strong>JNI doesn't work with Apache 1.3</strong></a></font></td></tr><tr><td><blockquote>
227 <p><font color="#ff0000">JNI workers have been deprecated. They will likely not work. Do not use them.</font></p>
228 <p>
229 JNI support requires a multi-threaded environment which is not the general case for Apache 1.3. 
230 You should verify if Apache 1.3 has been build with thread support and if not you could add the 
231 the pthreads library to your <b>httpd.conf</b> file. 
232 </p>
233
234 <div class="example"><pre>
235   # Add pthread to Apache in httpd.conf
236   LoadModule "/usr/lib/libpthreads.so"
237 </pre></div>
238
239 <p>
240 Also keep in mind that JNI is suited for multi-threaded servers and you should consider upgrading 
241 to Apache 2.x to support JNI.
242 </p>
243 </blockquote></td></tr></table>
244
245 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="JNI report that JVM couldn't be started under Linux"><strong>JNI report that JVM couldn't be started under Linux</strong></a></font></td></tr><tr><td><blockquote>
246 <p><font color="#ff0000">JNI workers have been deprecated. They will likely not work. Do not use them.</font></p>
247 <p>
248 Under Linux, you should set some environment variables BEFORE launching your Apache server :
249 </p>
250
251 <p class="screen"><div align="left"><table width="80%" border="1" cellspacing="0" cellpadding="2" bgcolor="#000000"><tr><td bgcolor="#000000" align="left"><code class="screen"><nobr>export LD_LIBRARY_PATH=$jre/bin:$jre/bin/classic:$LD_LIBRARY_PATH</nobr></code><br></td></tr></table></div></p>
252
253 <p>
254 Also some Linux distributions have enabled a GLIBC feature called 'floating stacks' which may not works with kernel 
255 less than 2.4.10 on SMP machines. You should disable floating stacks by exporting an environment variable :
256 </p>
257
258 <p class="screen"><div align="left"><table width="80%" border="1" cellspacing="0" cellpadding="2" bgcolor="#000000"><tr><td bgcolor="#000000" align="left"><code class="screen"><nobr>export LD_ASSUME_KERNEL=2.2.5</nobr></code><br></td></tr></table></div></p>
259
260 <p>
261 You could have to update your service scripts, ie <b>/etc/rc.d/init.d/httpd</b>, to set these env vars 
262 before your httpd server starts.
263 </p>
264 </blockquote></td></tr></table>
265
266 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Mixed errors when building via configure"><strong>Mixed errors when building via configure</strong></a></font></td></tr><tr><td><blockquote>
267 <p>
268 configure assume you have some GNU tools already installed and configured for your system, and ad minima <b>libtool</b>.
269 </p>
270 <p>
271 Also some systems may have mixed cc and gcc setup which may make you puzzled when trying to link an Apache built with native
272 c compiler with a jk/jk2 build with gcc.
273 </p>
274 <p>
275 In case the make processing doesn't work as expected, you should use a GNU make <b>gmake</b>.
276 </p>
277 </blockquote></td></tr></table>
278
279 </blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
280         Copyright &copy; 1999-2011, Apache Software Foundation
281         </em></font></div></td></tr></table></body></html>