LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 02-19-2006, 02:37 AM   #1
colombo187
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 16

Rep: Reputation: 0
Help binding tomcat with apache


Not sure if this is the right forum for this but here goes... I've been trying to bind apache-2.0.55 to tomcat-4.1.31 using mod_jk. I built mod_jk without errors, placed mod_jk.so into apache's module directory, edited httpd.conf to point to the mod_jk.so and mod_jk.conf files but when I try to access a jsp I get the page cannot be displayed error and my mod_jk.log shows that it tried to make the connection
Code:
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] do_shm_open::jk_shm.c (291): Truncated shared memory to 67584
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] do_shm_open::jk_shm.c (323): Initialized shared memory size=67584 free=65536 addr=0x402a5000
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] do_shm_open_lock::jk_shm.c (233): Opened shared memory lock /usr/local/apache2/logs/jk-runtime-status.lock
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] init_jk::mod_jk.c (2364): Initialized shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] uri_worker_map_open::jk_uri_worker_map.c (323): rule map size is 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] build_worker_map::jk_worker.c (236): creating worker ajp13
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] wc_create_worker::jk_worker.c (141): about to create instance ajp13 of ajp13
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] wc_create_worker::jk_worker.c (154): about to validate and init ajp13
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_validate::jk_ajp_common.c (1806): worker ajp13 contact is '192.168.1.102:8009'
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1895): setting socket keepalive to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1934): setting socket timeout to -1
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1938): setting socket buffer size to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1942): setting connection recycle timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1946): setting cache timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1950): setting connect timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1954): setting reply timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1958): setting prepost timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1962): setting recovery opts to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1966): setting number of retries to 3
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (1843): setting connection cache size to 1
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] build_worker_map::jk_worker.c (248): removing old ajp13 worker
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] build_worker_map::jk_worker.c (236): creating worker ajp14
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] wc_create_worker::jk_worker.c (141): about to create instance ajp14 of ajp13
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] wc_create_worker::jk_worker.c (154): about to validate and init ajp14
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_validate::jk_ajp_common.c (1806): worker ajp14 contact is 'localhost:8009'
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1895): setting socket keepalive to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1934): setting socket timeout to -1
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1938): setting socket buffer size to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1942): setting connection recycle timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1946): setting cache timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1950): setting connect timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1954): setting reply timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1958): setting prepost timeout to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1962): setting recovery opts to 0
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_init::jk_ajp_common.c (1966): setting number of retries to 3
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (1843): setting connection cache size to 1
[Sat Feb 18 17:30:28 2006] [1669:16384] [debug] build_worker_map::jk_worker.c (248): removing old ajp14 worker
[Sat Feb 18 17:30:28 2006] [1671:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:30:28 2006] [1671:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1671:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:30:28 2006] [1673:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:30:28 2006] [1673:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1673:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:30:28 2006] [1672:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:30:28 2006] [1672:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1672:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:30:28 2006] [1674:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:30:28 2006] [1674:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1674:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:30:28 2006] [1675:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:30:28 2006] [1675:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:30:28 2006] [1675:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:39:30 2006] [1671:16384] [debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/examples/jsp/num/numguess.jsp' from 0 maps
[Sat Feb 18 17:39:30 2006] [1671:16384] [debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/examples/jsp/num/numguess.jsp' from 0 maps
[Sat Feb 18 17:39:31 2006] [1710:16384] [debug] do_shm_open::jk_shm.c (251): Shared memory is already open
[Sat Feb 18 17:39:31 2006] [1710:16384] [debug] jk_child_init::mod_jk.c (2320): Attached shm:/usr/local/apache2/logs/jk-runtime-status
[Sat Feb 18 17:39:31 2006] [1710:16384] [debug] jk_child_init::mod_jk.c (2330): Initialized mod_jk/1.2.15
[Sat Feb 18 17:41:15 2006] [1673:16384] [debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/examples/jsp/num/numguess.jsp' from 0 maps
[Sat Feb 18 17:41:15 2006] [1673:16384] [debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/examples/jsp/num/numguess.jsp' from 0 maps
sorry that's sooo long but might help...here's workers.properties
Code:
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/opt/java
workers.th=$(workers.tomcat_home)
ps=\
worker.list=ajp13, ajp14
# Define a worker named ajp12 and of type ajp12
# Note that the name and the type do not have to match.
#
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1

# Define a worker named Ajp13
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13

# Defining a worker named inprocess and of type jni
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)server$(ps)lib$(ps)tomcat-jk.jar
worker.inprocess.cmd_line=start
worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar
here's server xml(relevant stuff anyway..
Code:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
   modJk="/usr/local/apache2/modules/mod_jk.so" jkDebug="debug"
   workersConfig="/usr/local/tomcat/conf/jk/workers.properties"
   jkLog="/usr/local/tomcat/logs/mod_jk.log" forwardAll="false" />

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8007" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
Can anyone see what the problem is? I seem to be out of my league here and been trying anything i can think of I've modified all the above files countless times
 
Old 02-19-2006, 04:07 AM   #2
dimsh
Member
 
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
You have in your debug: "Attempting to map URI '/examples/jsp/num/numguess.jsp' from 0 maps"

I am not sure, but "0 maps" makes me feel the problem is in JkMount, you did not post your mod_jk.conf, however the mount points should be clearly declared in that file for mapping local folder to URIs, and I suggest you to try the example application before your own app, for more info and simillar problem take a look here
and also you can search goolge from this link


Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TOMCAT and Apache shane200_ Suse/Novell 5 04-05-2007 10:11 AM
Tomcat + Apache Elguapo Linux - Software 1 04-05-2005 07:23 AM
Tomcat 5.5.1 and Apache 2 kpmaddenuk Linux - Software 2 10-30-2004 06:55 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 10:47 PM
Tomcat + Apache gilbert_on_line Linux - Software 1 04-18-2001 09:44 AM


All times are GMT -5. The time now is 07:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration