~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to xdocs/faq.xml

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE document [
 
3
  <!ENTITY project SYSTEM "project.xml">
 
4
]>
 
5
<document url="faq.html">
 
6
 
 
7
  &project;
 
8
<copyright>
 
9
   Copyright 1999-2004 The Apache Software Foundation
 
10
 
 
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
 
14
 
 
15
       http://www.apache.org/licenses/LICENSE-2.0
 
16
 
 
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.
 
22
</copyright>
 
23
<properties>
 
24
<title>FAQ</title>
 
25
<author email="hgomez@apache.org">Henri Gomez</author>
 
26
<date>$Date: 2006-06-29 01:56:49 +0200 (Thu, 29 Jun 2006) $</date>
 
27
</properties>
 
28
<body>
 
29
<section name="General">
 
30
<p>
 
31
General Informations and FAQ about JK
 
32
</p>
 
33
<subsection name="Where can I get help/support for JK ?">
 
34
<p>
 
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
 
49
and go 
 
50
<a href="http://tomcat.apache.org/lists.html">
 
51
here</a>
 
52
to determine how to subscribe to tomcat mailing list.
 
53
</p>
 
54
</subsection>
 
55
 
 
56
<subsection name="I can't find JK anywhere. Where is it?">
 
57
<p>
 
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.
 
62
</p>
 
63
</subsection>
 
64
 
 
65
<subsection name="What's the difference between JK and mod_jk ?">
 
66
<br />
 
67
<p>
 
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.
 
70
</p>
 
71
 
 
72
<p>
 
73
<a href="howto/domino.html">Domino webserver</a> support is implemented on JK, using a redirector
 
74
called <b>dsapi redirector</b>.
 
75
</p>
 
76
 
 
77
<p>
 
78
<a href="howto/iis.html">IIS webserver</a>support is implemented on JK, using a redirector
 
79
called <b>isapi redirector</b>.
 
80
</p>
 
81
 
 
82
<p>
 
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>.
 
85
</p>
 
86
 
 
87
</subsection>
 
88
 
 
89
<subsection name="Where can I get more information ?">
 
90
<p>
 
91
For <b>JK 1.2.x</b>, you should read :
 
92
</p>
 
93
 
 
94
<ul>
 
95
 
 
96
<li>
 
97
<a href="howto/quick.html">For the impatients</a>
 
98
</li>
 
99
 
 
100
<li>
 
101
<a href="howto/apache.html">Apache and JK</a>
 
102
</li>
 
103
 
 
104
<li>
 
105
<a href="howto/domino.html">Domino and JK</a>
 
106
</li>
 
107
 
 
108
<li>
 
109
<a href="howto/iis.html">IIS and JK</a>
 
110
</li>
 
111
 
 
112
<li>
 
113
<a href="howto/nes.html">Netscape/iPlanet and JK</a>
 
114
</li>
 
115
 
 
116
<li>
 
117
<a href="howto/workers.html">Workers configuration</a>
 
118
</li>
 
119
</ul>
 
120
 
 
121
<p> 
 
122
You could also try searching the mailing list archives for "JK" or look at the source.
 
123
</p>
 
124
</subsection>
 
125
 
 
126
<subsection name="Which protocol should I use? Ajp12 or Ajp13?">
 
127
<p>
 
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>.
 
130
</p>
 
131
<p> 
 
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. 
 
133
</p>
 
134
 
 
135
<p>
 
136
Others Servlet engines like <b>jetty</b> have support for Ajp13.
 
137
</p>
 
138
</subsection>
 
139
 
 
140
<subsection name="I've got a firewall between my WebServer and Tomcat who drop ajp13 connections after some times">
 
141
<p>
 
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. 
 
144
</p>
 
145
<p>
 
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>.
 
148
</p>
 
149
</subsection>
 
150
 
 
151
<subsection name="Under heavy load, I've got many threads in Tomcat even if my Apache Web Server handle much of the load">
 
152
<p>
 
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. 
 
158
</p>
 
159
<p>
 
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>.
 
162
</p>
 
163
</subsection>
 
164
 
 
165
</section>
 
166
 
 
167
<section name="Apache">
 
168
<p>
 
169
Informations and FAQ about mod_jk and Apache Web Servers. 
 
170
</p>
 
171
<subsection name="Whenever I restart Tomcat, Apache locks up!">
 
172
<p>
 
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.
 
175
</p>
 
176
</subsection>
 
177
 
 
178
<subsection name="Why did exist two files mod_jk.so (-eapi ad -noeapi) in download dir for Linux ?">
 
179
<p>
 
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>.
 
182
</p>
 
183
 
 
184
<p>
 
185
For example, Apache present in certains recent Linux distributions include the
 
186
<b>mod_ssl</b> module.
 
187
</p>
 
188
 
 
189
<p>
 
190
So if you got such 'Extended Apache', you need to use <b>mod_jk.so-eapi</b>.
 
191
</p>
 
192
 
 
193
<p> 
 
194
You should use <b>mod_jk.so-noeapi</b> only for 'Standard Apache' (ie without mod_ssl).
 
195
</p>
 
196
 
 
197
<p>
 
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
 
200
</p>
 
201
</subsection>
 
202
 
 
203
<subsection name="What's that message about 'garbled DSO ?'">
 
204
<p>
 
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.
 
208
</p>
 
209
</subsection>
 
210
 
 
211
<subsection name="And the message about 'module might crash under EAPI!">
 
212
<p>
 
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.
 
216
</p>
 
217
</subsection>
 
218
 
 
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 ?">
 
220
<p>
 
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):
 
226
<screen>
 
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/>
 
235
</screen>
 
236
</p>
 
237
<p>
 
238
Note: The above steps assume that you downloaded the Apache source and placed it in your /usr/local/src directory.
 
239
</p>
 
240
</subsection>
 
241
 
 
242
<subsection name="Apache 2.0 complains about incorrect module version">
 
243
<p>
 
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.
 
246
</p>
 
247
<p>
 
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.
 
251
</p>
 
252
</subsection>
 
253
 
 
254
<subsection name="JNI didn't works with Apache 1.3">
 
255
<p>
 
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. 
 
259
</p>
 
260
 
 
261
<source>
 
262
  # Add pthread to Apache in httpd.conf
 
263
  LoadModule "/usr/lib/libpthreads.so"
 
264
</source>
 
265
 
 
266
<p>
 
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.
 
269
</p>
 
270
</subsection>
 
271
 
 
272
<subsection name="JNI report that JVM couldn't be started under Linux">
 
273
<p>
 
274
Under Linux, you should set some environment variables BEFORE launching your Apache server :
 
275
</p>
 
276
 
 
277
<screen>
 
278
<read>export LD_LIBRARY_PATH=$jre/bin:$jre/bin/classic:$LD_LIBRARY_PATH</read>
 
279
</screen>
 
280
 
 
281
<p>
 
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 :
 
284
</p>
 
285
 
 
286
<screen>
 
287
<read>export LD_ASSUME_KERNEL=2.2.5</read>
 
288
</screen>
 
289
 
 
290
<p>
 
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.
 
293
</p>
 
294
</subsection>
 
295
 
 
296
<subsection name="Mixed errors when building via configure">
 
297
<p>
 
298
configure assume you have some GNU tools allready installed and configured for your system, and ad minima <b>libtool</b>.
 
299
</p>
 
300
<p>
 
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.
 
303
</p>
 
304
<p>
 
305
In fine some native make didn't works as expect so you should use a GNU make <b>gmake</b>.
 
306
</p>
 
307
</subsection>
 
308
 
 
309
<subsection name="JK2 build report error about missing FIONBIO on Solaris 8">
 
310
<p>
 
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.
 
313
</p>
 
314
</subsection>
 
315
 
 
316
 
 
317
</section>
 
318
 
 
319
<section name="IIS">
 
320
<p>
 
321
Informations and FAQ about JK and IIS Web Servers. 
 
322
</p>
 
323
<todo>
 
324
More informations to be added.
 
325
</todo>
 
326
</section>
 
327
 
 
328
<section name="NES/iPlanet">
 
329
<p>
 
330
Informations and FAQ about JK and NES/iPlanet Web Servers. 
 
331
</p>
 
332
<todo>
 
333
More informations to be added.
 
334
</todo>
 
335
</section>
 
336
 
 
337
</body>
 
338
</document>