wood burning stoves 2.0*
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
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
Author

mod_jk // not clear on server.xml configs

melissa mecca
Greenhorn

Joined: Mar 22, 2009
Posts: 1
Hi

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:
http://www.mydomain.com/ROOT/messagebroker/amf instead of here: http://www.mydomain.com/messagebroker/amf

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/...
/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

/Library/Tomcat/conf/
jk/mod_jk.so
jk/workers.properties

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

<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>

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


--------------------------------------------------------
THANKS!!

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

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: http://aspose.com/file-tools
 
subject: mod_jk // not clear on server.xml configs