3
<!ENTITY project SYSTEM "project.xml">
5
<document url="faq.html">
9
Copyright 1999-2004 The Apache Software Foundation
11
Licensed under the Apache License, Version 2.0 (the "License");
12
you may not use this file except in compliance with the License.
13
You may obtain a copy of the License at
15
http://www.apache.org/licenses/LICENSE-2.0
17
Unless required by applicable law or agreed to in writing, software
18
distributed under the License is distributed on an "AS IS" BASIS,
19
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
See the License for the specific language governing permissions and
21
limitations under the License.
25
<author email="hgomez@apache.org">Henri Gomez</author>
26
<date>$Date: 2006-06-29 01:56:49 +0200 (Thu, 29 Jun 2006) $</date>
29
<section name="General">
31
General Informations and FAQ about JK
33
<subsection name="Where can I get help/support for JK ?">
35
The primary mechanism for support is through the JK
36
documentation included in the doc directory.
37
Documentation is also available on the Apache Tomcat web site devoted to the
38
<a href="http://tomcat.apache.org/connectors-doc/">
39
Apache Tomcat Connectors Project</a>
40
For additional help, the best resource is the Tomcat Users Discussion list.
41
You should start by searching
42
<a href="http://mail-archives.apache.org/mod_mbox/tomcat-users/">
43
the mail list archive</a>
44
before you post questions to the list.
45
If you are unable to locate the answer to your question in the archive,
46
you can post questions about JK to the user list for assistance.
47
Make sure that you include the version of your Webserver,
48
that you are using as well as the platform you are running on
50
<a href="http://tomcat.apache.org/lists.html">
52
to determine how to subscribe to tomcat mailing list.
56
<subsection name="I can't find JK anywhere. Where is it?">
58
Now that JK moved to the <b>tomcat-connectors</b> repository,
59
the source and the binaries for JK can be downloaded from a mirror at the
60
<a href="http://tomcat.apache.org/download-connectors.cgi">
61
Tomcat Connectors (mod_jk, mod_jk2) Downloads</a> page.
65
<subsection name="What's the difference between JK and mod_jk ?">
68
<b>JK</b> is a project covering web-servers to Tomcat connectors,
69
whereas <b>mod_jk</b> is the <a href="howto/apache.html">Apache module</a> developed in JK.
73
<a href="howto/domino.html">Domino webserver</a> support is implemented on JK, using a redirector
74
called <b>dsapi redirector</b>.
78
<a href="howto/iis.html">IIS webserver</a>support is implemented on JK, using a redirector
79
called <b>isapi redirector</b>.
83
<a href="howto/nes.html">Netscape/iPlanet webserver</a>webserver support is implemented on JK, using a redirector
84
called <b>nsapi redirector</b>.
89
<subsection name="Where can I get more information ?">
91
For <b>JK 1.2.x</b>, you should read :
97
<a href="howto/quick.html">For the impatients</a>
101
<a href="howto/apache.html">Apache and JK</a>
105
<a href="howto/domino.html">Domino and JK</a>
109
<a href="howto/iis.html">IIS and JK</a>
113
<a href="howto/nes.html">Netscape/iPlanet and JK</a>
117
<a href="howto/workers.html">Workers configuration</a>
122
You could also try searching the mailing list archives for "JK" or look at the source.
126
<subsection name="Which protocol should I use? Ajp12 or Ajp13?">
128
<a href="common/ajpv13a.html">Ajp13</a> is a newer protocol, it's faster, and it works better with SSL.
129
You almost certainly want to use it now that <strong>ajp12 is deprecated</strong>.
132
Also ajp13 is supported by all Apache Tomcat including 3.2.x , 3.3.x, 4.0.x, 4.1.x and the new tomcat 5.
136
Others Servlet engines like <b>jetty</b> have support for Ajp13.
140
<subsection name="I've got a firewall between my WebServer and Tomcat who drop ajp13 connections after some times">
142
Ajp13 use persistant connections where the traffic could be null if there is no request to be sent to Tomcat.
143
Firewall used to drop inactive connections and will make your WebServer and Tomcat think the connection is valid.
146
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
147
it in <a href="howto/workers.html">Workers HowTo</a>.
151
<subsection name="Under heavy load, I've got many threads in Tomcat even if my Apache Web Server handle much of the load">
153
Under heavy load, Apache WebServer create many childs to handle the load, which will in turn create many connections
154
to Tomcat to forward the requests they should handle.
155
Apache WebServer will normally kill the childs/threads when the load decrease. But if the load is still there and
156
even if only Apache handle the requests, ie static contents, the childs are kept and with them the ajp13 connections,
157
even if they are no more used.
160
Since JK 1.2.0, <b>cache_timeout</b> and <b>recycle_timeout</b> properties as been added to close
161
connections after some time of inactivity, for more informations refer to <a href="howto/workers.html">Workers HowTo</a>.
167
<section name="Apache">
169
Informations and FAQ about mod_jk and Apache Web Servers.
171
<subsection name="Whenever I restart Tomcat, Apache locks up!">
173
The Ajp13 protocol keeps an open socket between Tomcat and Apache. Release of mod_jk present in J-T-C handle the network failure.
174
But with previous release of mod_jk, you may have to restart Apache as well.
178
<subsection name="Why did exist two files mod_jk.so (-eapi ad -noeapi) in download dir for Linux ?">
180
Many versions of Apache use of modified API, known at Extended API, developed for use with the
181
<a href="http://www.modssl.org">mod_ssl module</a>.
185
For example, Apache present in certains recent Linux distributions include the
186
<b>mod_ssl</b> module.
190
So if you got such 'Extended Apache', you need to use <b>mod_jk.so-eapi</b>.
194
You should use <b>mod_jk.so-noeapi</b> only for 'Standard Apache' (ie without mod_ssl).
198
It's wise to avoid using EAPI modules on STD API Apache or to use standard API modules on EAPI Apache.
199
Allways be sure to have the <b>mod_jk.so</b> witch match your version of Apache
203
<subsection name="What's that message about 'garbled DSO ?'">
205
It's related to Apache EAPI, the message <code>'mod_jk.so is garbled - perhaps this is not an Apache module DSO ?'</code>
206
just told you, that your're trying to install a mod_jk.so DSO module that was compiled on an Apache using EAPI,
207
like apache-mod_ssl or apache from Redhat distro 6.2/7.0 but your system use the standard apache with normal API.
211
<subsection name="And the message about 'module might crash under EAPI!">
213
Also related to EAPI, the message <code>'[warn] Loaded DSO /usr/lib/apache/mod_jk.so uses plain Apache 1.3 API,
214
this module might crash under EAPI! (please recompile it with -DEAPI)'</code>, the mod_jk.so was compiled under normal
215
Apache with standard API and you try to install the module on an Apache using EAPI.
219
<subsection 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 ?">
221
APXS is a Perl script that is created when you build the Apache web server from source.
222
Chances are that if you are getting these errors and you obtained Apache as a binary distribution,
223
that APXS is not configured correctly for your system.
224
Your best bet is to get the Apache source from http://httpd.apache.org and build it yourself.
225
Use the following for a basic build (read the Apache docs for other options):
227
<type>cd /usr/local/src</type><br/>
228
<type>gzip -dc apache_1.3.19.tar.gz|tar xvf -</type><br/>
229
<type>cd apache_1.3.19</type><br/>
230
<type>./configure --prefix=/usr/local/apache \</type><br/>
231
<type> --enable-module=most \</type><br/>
232
<type> --enable-shared=max</type><br/>
233
<type>make</type><br/>
234
<type>make install</type><br/>
238
Note: The above steps assume that you downloaded the Apache source and placed it in your /usr/local/src directory.
242
<subsection name="Apache 2.0 complains about incorrect module version">
244
Since Apache 2.0 API still change often, the Apache 2.0 teams decide to put in headers of compiled modules the
245
Apache 2.0 version used to compile the module. This check is called Magic Module Number bump.
248
At start time Apache 2.0 check that version in modules headers and stop if it detect that a module was compiled
249
for another Apache 2.0 version. As such you should allways use modules compiled for the same Apache 2.0 version.
250
This check may be removed if the future.
254
<subsection name="JNI didn't works with Apache 1.3">
256
JNI support require a multi-threaded environment which is not the general case for Apache 1.3.
257
You should verify if Apache 1.3 has been build with thread support and if not you could add the
258
the pthreads library to your <b>httpd.conf</b> file.
262
# Add pthread to Apache in httpd.conf
263
LoadModule "/usr/lib/libpthreads.so"
267
Also keep in mind that JNI is suited for multi-threaded servers and you should consider upgrading
268
to Apache 2.0 to support JNI.
272
<subsection name="JNI report that JVM couldn't be started under Linux">
274
Under Linux, you should set some environment variables BEFORE launching your Apache server :
278
<read>export LD_LIBRARY_PATH=$jre/bin:$jre/bin/classic:$LD_LIBRARY_PATH</read>
282
Also some Linux distributions have enabled a GLIBC feature called 'floating stacks' which may not works with kernel
283
less than 2.4.10 on SMP machines. You should disable floating stacks by exporting an environment variable :
287
<read>export LD_ASSUME_KERNEL=2.2.5</read>
291
You could have to update your service scripts, ie <b>/etc/rc.d/init.d/httpd</b>, to set these env vars
292
before your httpd server starts.
296
<subsection name="Mixed errors when building via configure">
298
configure assume you have some GNU tools allready installed and configured for your system, and ad minima <b>libtool</b>.
301
Also some systems may have mixed cc and gcc setup which may make you puzzled when trying to link an Apache built with native
302
c compiler with a jk/jk2 build with gcc.
305
In fine some native make didn't works as expect so you should use a GNU make <b>gmake</b>.
309
<subsection name="JK2 build report error about missing FIONBIO on Solaris 8">
311
In JK2 before v2.0.2, you should add <source>#define BSD_COMP</source> in top
312
of jk/native2/common/jk_channel_socket.c to have Solaris build succeed.
321
Informations and FAQ about JK and IIS Web Servers.
324
More informations to be added.
328
<section name="NES/iPlanet">
330
Informations and FAQ about JK and NES/iPlanet Web Servers.
333
More informations to be added.