File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes mod_jk // not clear on server.xml configs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "mod_jk // not clear on server.xml configs" Watch "mod_jk // not clear on server.xml configs" New topic

mod_jk // not clear on server.xml configs

melissa mecca

Joined: Mar 22, 2009
Posts: 1

I'm having some ups and downs with the mod_jk connector and my setup and could use some pointers from the group here. I've described my problems and the setup below. I could use either a general overview -- or -- if you only have a little time to post, maybe just provide some examples of how the mod_jk connector should be configured in server.xml; this is the area I'm least clear about; and also, why the loadbalancer is mentioned in the logs as having problems. I don't know why I care about the load balancer right now...

the experience:

The mod_jk connector actually was working the other day. The problem was that my servlets were being hosted at a path like this: instead of here:

I decided the fix was to set the context root for my tomcat app. After following directions to do that, and updating my JKMount directives, I haven't been able to get the mod_jk connector online again. (grr!) The mod_jk log shows complaints that tomcat is either not running or isn't listening on the right port; and requests from a browser to the new path to the servlet just hangs. Same with requests for jsp pages.

the setup:

Leopard server 10.5.6, tomcat 6, apache2
there's only one domain and one webapp on this server.
the mod_jk connector in use is the one that shipped with the os
a grep for java confirms that tomcat is running.

/Library/Tomcat/webapps/ROOT/META-INF/context.xml --> sets the context for this app

os x server admin --> sets apache document root to /Library/Tomcat/webapps
/Library/Tomcat/webapps/index.html --> includes a redirect to ROOT/index.html

httpd.conf --> set some JKMount entries for:
JKMount /*.jsp ajp12
JKMount /messagebroker/*.jsp ajp12


server.xml --> here are some relevant exerpts
<Listener className="org.apache.jk.config.ApacheConfig" modJk="/Library/Tomcat/conf/jk/" />

<Connector port="8009" protocol="HTTP/1.1"
connectionTimeout="0" />

<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
<Parameter name="port" value="8009"/>

<Connector port="8009" protocol="AJP/1.3" redirectPort="8080"/>


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62267

I think this might fair better in the Tomcat forum, so I've moved it there.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: mod_jk // not clear on server.xml configs