| <?xml version="1.0"?> |
| <document> |
| <copyright> |
| Copyright 1999-2004 The Apache Software Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| </copyright> |
| <properties> |
| <title>FAQ</title> |
| <author email="hgomez@apache.org">Henri Gomez</author> |
| <date>$Date$</date> |
| </properties> |
| |
| <section name="General"> |
| <p> |
| General Informations and FAQ about JK |
| </p> |
| <subsection name="Where can I get help/support for JK ?"> |
| <p> |
| The primary mechanism for support is through the JK |
| documentation included in the doc directory. |
| Documentation is also available on the Apache Jakarta web site devoted to the |
| <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html"> |
| Jakarta Tomcat Connectors Project</a> |
| For additional help, the best resource is the Tomcat Users Discussion list. |
| You should start by searching |
| <a href="http://mikal.org/interests/java/tomcat/index.html"> |
| the mail list archive</a> |
| before you post questions to the list. |
| If you are unable to locate the answer to your question in the archive, |
| you can post questions about JK to the user list for assistance. |
| Make sure that you include the version of your Webserver, |
| that you are using as well as the platform you are running on |
| and go |
| <a href="http://jakarta.apache.org/site/mail.html"> |
| here</a> |
| to determine how to subscribe to tomcat mailing list. |
| </p> |
| </subsection> |
| |
| <subsection name="I can't find JK anywhere. Where is it?"> |
| <p> |
| Now that JK moved to the <b>jakarta-tomcat-connectors</b> repository, |
| the source for JK can be downloaded from a mirror at the |
| <a href="http://jakarta.apache.org/site/sourceindex.cgi"> |
| Jakarta Source Download</a> page and the binaries for JK can |
| be downloaded from a mirror at the |
| <a href="http://jakarta.apache.org/site/binindex.cgi"> |
| Jakarta Binary Download</a> page. |
| </p> |
| </subsection> |
| |
| <subsection name="What's the difference between JK and mod_jk ?"> |
| <p> |
| <b>JK</b> is a project covering web-servers to Tomcat connectors, |
| whereas <b>mod_jk</b> is the <a href="jk/aphowto.html">Apache module</a> developped in JK. |
| </p> |
| |
| <p> |
| <a href="jk/domhowto.html">Domino webserver</a> support is implemented on JK, using a redirector |
| called <b>dsapi redirector</b>. |
| </p> |
| |
| <p> |
| <a href="jk/iishowto.html">IIS webserver</a>support is implemented on JK, using a redirector |
| called <b>isapi redirector</b>. |
| </p> |
| |
| <p> |
| <a href="jk/neshowto.html">Netscape/iPlanet webserver</a>webserver support is implemented on JK, using a redirector |
| called <b>nsapi redirector</b>. |
| </p> |
| |
| </subsection> |
| |
| <subsection name="Where can I get more information ?"> |
| <p> |
| For <b>JK 1.2.x</b>, you should read : |
| </p> |
| |
| <ul> |
| |
| <li> |
| <a href="jk/quickhowto.html">For the impatients</a> |
| </li> |
| |
| <li> |
| <a href="jk/aphowto.html">Apache and JK</a> |
| </li> |
| |
| <li> |
| <a href="jk/domhowto.html">Domino and JK</a> |
| </li> |
| |
| <li> |
| <a href="jk/iishowto.html">IIS and JK</a> |
| </li> |
| |
| <li> |
| <a href="jk/neshowto.html">Netscape/iPlanet and JK</a> |
| </li> |
| |
| <li> |
| <a href="jk/workershowto.html">Workers configuration</a> |
| </li> |
| </ul> |
| |
| <p> |
| For <b>JK 2.0.x</b> the <a href="jk2/configtc.html"> |
| config tomcat</a> and <a href="jk2/configweb.html">config webserver</a> |
| documents have considerably more in-depth information. |
| It's worth a look. |
| You could also try searching the mailing list archives for "JK" or look at the source. |
| </p> |
| </subsection> |
| |
| <subsection name="Which protocol should I use? Ajp12 or Ajp13?"> |
| <p> |
| <a href="common/AJPv13.html">Ajp13</a> is a newer protocol, it's faster, and it works better with SSL. |
| You almost certainly want to use it now that ajp12 is deprecated. |
| </p> |
| <p> |
| 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. |
| </p> |
| |
| <p> |
| Others Servlet engines like <b>jetty</b> have support for Ajp13. |
| </p> |
| </subsection> |
| |
| <subsection name="I've got a firewall between my WebServer and Tomcat who drop ajp13 connections after some times"> |
| <p> |
| Ajp13 use persistant connections where the traffic could be null if there is no request to be sent to Tomcat. |
| Firewall used to drop inactive connections and will make your WebServer and Tomcat think the connection is valid. |
| </p> |
| <p> |
| 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 |
| it in <a href="jk/workershowto.html">Workers HowTo</a>. |
| </p> |
| </subsection> |
| |
| <subsection name="Under heavy load, I've got many threads in Tomcat even if my Apache Web Server handle much of the load"> |
| <p> |
| Under heavy load, Apache WebServer create many childs to handle the load, which will in turn create many connections |
| to Tomcat to forward the requests they should handle. |
| Apache WebServer will normally kill the childs/threads when the load decrease. But if the load is still there and |
| even if only Apache handle the requests, ie static contents, the childs are kept and with them the ajp13 connections, |
| even if they are no more used. |
| </p> |
| <p> |
| Since JK 1.2.0, <b>cache_timeout</b> and <b>socket_timeout</b> properties as been added to close |
| connections after some time of inactivity, for more informations refer to <a href="jk/workershowto.html">Workers HowTo</a>. |
| </p> |
| </subsection> |
| |
| </section> |
| |
| <section name="Apache"> |
| <p> |
| Informations and FAQ about mod_jk and Apache Web Servers. |
| </p> |
| <subsection name="Whenever I restart Tomcat, Apache locks up!"> |
| <p> |
| The Ajp13 protocol keeps an open socket between Tomcat and Apache. Release of mod_jk present in J-T-C handle the network failure. |
| But with previous release of mod_jk, you may have to restart Apache as well. |
| </p> |
| </subsection> |
| |
| <subsection name="Why did exist two files mod_jk.so (-eapi ad -noeapi) in download dir for Linux ?"> |
| <p> |
| Many versions of Apache use of modified API, known at Extended API, developped for use with the |
| <a href="http://www.modssl.org">mod_ssl module</a>. |
| </p> |
| |
| <p> |
| For example, Apache present in certains recent Linux distributions include the |
| <b>mod_ssl</b> module. |
| </p> |
| |
| <p> |
| So if you got such 'Extended Apache', you need to use <b>mod_jk.so-eapi</b>. |
| </p> |
| |
| <p> |
| You should use <b>mod_jk.so-noeapi</b> only for 'Standard Apache' (ie without mod_ssl). |
| </p> |
| |
| <p> |
| It's wise to avoid using EAPI modules on STD API Apache or to use standard API modules on EAPI Apache. |
| Allways be sure to have the <b>mod_jk.so</b> witch match your version of Apache |
| </p> |
| </subsection> |
| |
| <subsection name="What's that message about 'garbled DSO ?'"> |
| <p> |
| It's related to Apache EAPI, the message <code>'mod_jk.so is garbled - perhaps this is not an Apache module DSO ?'</code> |
| just told you, that your're trying to install a mod_jk.so DSO module that was compiled on an Apache using EAPI, |
| like apache-mod_ssl or apache from Redhat distro 6.2/7.0 but your system use the standard apache with normal API. |
| </p> |
| </subsection> |
| |
| <subsection name="And the message about 'module might crash under EAPI!"> |
| <p> |
| Also related to EAPI, the message <code>'[warn] Loaded DSO /usr/lib/apache/mod_jk.so uses plain Apache 1.3 API, |
| this module might crash under EAPI! (please recompile it with -DEAPI)'</code>, the mod_jk.so was compiled under normal |
| Apache with standard API and you try to install the module on an Apache using EAPI. |
| </p> |
| </subsection> |
| |
| <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 ?"> |
| <p> |
| APXS is a Perl script that is created when you build the Apache web server from source. |
| Chances are that if you are getting these errors and you obtained Apache as a binary distribution, |
| that APXS is not configured correctly for your system. |
| Your best bet is to get the Apache source from http://httpd.apache.org and build it yourself. |
| Use the following for a basic build (read the Apache docs for other options): |
| <screen> |
| <type>cd /usr/local/src</type><br/> |
| <type>gzip -dc apache_1.3.19.tar.gz|tar xvf -</type><br/> |
| <type>cd apache_1.3.19</type><br/> |
| <type>./configure --prefix=/usr/local/apache \</type><br/> |
| <type> --enable-module=most \</type><br/> |
| <type> --enable-shared=max</type><br/> |
| <type>make</type><br/> |
| <type>make install</type><br/> |
| </screen> |
| </p> |
| <p> |
| Note: The above steps assume that you downloaded the Apache source and placed it in your /usr/local/src directory. |
| </p> |
| </subsection> |
| |
| <subsection name="Apache 2.0 complains about incorrect module version"> |
| <p> |
| Since Apache 2.0 API still change often, the Apache 2.0 teams decide to put in headers of compiled modules the |
| Apache 2.0 version used to compile the module. This check is called Magic Module Number bump. |
| </p> |
| <p> |
| At start time Apache 2.0 check that version in modules headers and stop if it detect that a module was compiled |
| for another Apache 2.0 version. As such you should allways use modules compiled for the same Apache 2.0 version. |
| This check may be removed if the future. |
| </p> |
| </subsection> |
| |
| <subsection name="JNI didn't works with Apache 1.3"> |
| <p> |
| JNI support require a multi-threaded environment which is not the general case for Apache 1.3. |
| You should verify if Apache 1.3 has been build with thread support and if not you could add the |
| the pthreads library to your <b>httpd.conf</b> file. |
| </p> |
| |
| <screen> |
| <note># Add pthread to Apache in httpd.conf</note> |
| <read>LoadModule "/usr/lib/libpthreads.so"</read> |
| </screen> |
| |
| <p> |
| Also keep in mind that JNI is suited for multi-threaded servers and you should consider upgrading |
| to Apache 2.0 to support JNI. |
| </p> |
| </subsection> |
| |
| <subsection name="JNI report that JVM couldn't be started under Linux"> |
| <p> |
| Under Linux, you should set some environment variables BEFORE launching your Apache server : |
| </p> |
| |
| <screen> |
| <read>export LD_LIBRARY_PATH=$jre/bin:$jre/bin/classic:$LD_LIBRARY_PATH</read> |
| </screen> |
| |
| <p> |
| Also some Linux distributions have enabled a GLIBC feature called 'floating stacks' which may not works with kernel |
| less than 2.4.10 on SMP machines. You should disable floating stacks by exporting an environment variable : |
| </p> |
| |
| <screen> |
| <read>export LD_ASSUME_KERNEL=2.2.5</read> |
| </screen> |
| |
| <p> |
| You could have to update your service scripts, ie <b>/etc/rc.d/init.d/httpd</b>, to set these env vars |
| before your httpd server starts. |
| </p> |
| </subsection> |
| |
| <subsection name="Mixed errors when building via configure"> |
| <p> |
| configure assume you have some GNU tools allready installed and configured for your system, and ad minima <b>libtool</b>. |
| </p> |
| <p> |
| Also some systems may have mixed cc and gcc setup which may make you puzzled when trying to link an Apache built with native |
| c compiler with a jk/jk2 build with gcc. |
| </p> |
| <p> |
| In fine some native make didn't works as expect so you should use a GNU make <b>gmake</b>. |
| </p> |
| </subsection> |
| |
| <subsection name="JK2 build report error about missing FIONBIO on Solaris 8"> |
| <p> |
| In JK2 before v2.0.2, you should add <source>#define BSD_COMP</source> in top |
| of jk/native2/common/jk_channel_socket.c to have Solaris build succeed. |
| </p> |
| </subsection> |
| |
| |
| </section> |
| |
| <section name="IIS"> |
| <p> |
| Informations and FAQ about JK and IIS Web Servers. |
| </p> |
| <todo> |
| More informations to be added, Nacho ? |
| </todo> |
| </section> |
| |
| <section name="NES/iPlanet"> |
| <p> |
| Informations and FAQ about JK and NES/iPlanet Web Servers. |
| </p> |
| <todo> |
| More informations to be added, Mike ? |
| </todo> |
| </section> |
| |
| |
| </document> |