rvnistelrooy10
Programmer
Hi, I need more help in configuring Apache to talk to Tomcat. I’ve have done the following:
1. Add the code below in the server.xml file in Tomcat.
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
2. Create a workers.properties file as below and save it in this directory /usr/local/jakarta-tomcat-4.1.24/conf/workers.properties.
worker.list=testworker
worker.testworker.port=8009
worker.testworker.host=localhost
worker.testworker.type=ajp13
3. Download the mod_jk-1.3-noeapi.so file and place it in the /usr/local/apache/libexec directory.
4. Add the code below in the httpd.conf file in Apache.
LoadModule jk_module libexec/mod_jk-1.3-noeapi.so
JkWorkersFile /usr/local/jakarta-tomcat-4.1.24/conf/workers.properties
JkLogFile /var/log/apache/mod_jk.log
JkLogLevel info
Alias /examples “/usr/local/ jakarta-tomcat-4.1.24/webapps/examples”
JkMount /examples/servlet/* testworker
JkMount /examples/*.jsp testworker
JkMount /*.jsp testworker
<Location “/examples/WEB-INF/”>
Allow Override None
deny from all
</Location>
Problem 1:
After that, I start Tomcat and then Apache. When I key in in the URL, the JSP Examples page will appear. When I click on the examples link that link to a html page. Then, no problem, it’ll appear. But if I click on the link that link to a jsp page, then there will be an internal server error.
Problem 2:
When i start the tomcat, ok no prob. Everything goes smoothly. But when i stop it, i got this error:
Catalina.stop:java.net.connectException:Connection refused
What is the problem?
Problem 3:
After shutting everything, I view the mod_jk.log file. There are these errors:
[Mon Jun 09 23:40:13 2003] [jk_connect.c (203)] : jk_open_socket_connect() failed errno=111
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (626)] : Error connecting to Tomcat. Tomcat is probably not started or is listening on the wrong port. Failed errno=111.
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (874)] : Error connecting to the Tomcat process.
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (1190)] : Sending request to Tomcat failed in send loop. err=2.
I think all these 3 errors r related. Pls help me. Btw, do Tomcat have any documentation on the errors msg displayed?
Thanks…
1. Add the code below in the server.xml file in Tomcat.
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
2. Create a workers.properties file as below and save it in this directory /usr/local/jakarta-tomcat-4.1.24/conf/workers.properties.
worker.list=testworker
worker.testworker.port=8009
worker.testworker.host=localhost
worker.testworker.type=ajp13
3. Download the mod_jk-1.3-noeapi.so file and place it in the /usr/local/apache/libexec directory.
4. Add the code below in the httpd.conf file in Apache.
LoadModule jk_module libexec/mod_jk-1.3-noeapi.so
JkWorkersFile /usr/local/jakarta-tomcat-4.1.24/conf/workers.properties
JkLogFile /var/log/apache/mod_jk.log
JkLogLevel info
Alias /examples “/usr/local/ jakarta-tomcat-4.1.24/webapps/examples”
JkMount /examples/servlet/* testworker
JkMount /examples/*.jsp testworker
JkMount /*.jsp testworker
<Location “/examples/WEB-INF/”>
Allow Override None
deny from all
</Location>
Problem 1:
After that, I start Tomcat and then Apache. When I key in in the URL, the JSP Examples page will appear. When I click on the examples link that link to a html page. Then, no problem, it’ll appear. But if I click on the link that link to a jsp page, then there will be an internal server error.
Problem 2:
When i start the tomcat, ok no prob. Everything goes smoothly. But when i stop it, i got this error:
Catalina.stop:java.net.connectException:Connection refused
What is the problem?
Problem 3:
After shutting everything, I view the mod_jk.log file. There are these errors:
[Mon Jun 09 23:40:13 2003] [jk_connect.c (203)] : jk_open_socket_connect() failed errno=111
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (626)] : Error connecting to Tomcat. Tomcat is probably not started or is listening on the wrong port. Failed errno=111.
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (874)] : Error connecting to the Tomcat process.
[Mon Jun 09 23:40:13 2003] [jk_ajp_common.c (1190)] : Sending request to Tomcat failed in send loop. err=2.
I think all these 3 errors r related. Pls help me. Btw, do Tomcat have any documentation on the errors msg displayed?
Thanks…