newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
Hi,

I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
I have a mod_jk.conf file containing
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

I'm not getting any errors in the file specified as JkLogFile, and netstat
-l shows a listening socket at port 8009.

I can load my servlet from http://localhost:8080/Client_Access, but I can't
load it from http://localhost/Client_Access
so mod_jk isn't working. What could it be?

Thanks,

Matthew Fleming

PS, here is my whole mod_jk.conf file:

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

Here is workers.properties:

worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

This is what I'm seeing in mod_jk.log:
[Wed Aug 11 20:44:10 2010][4008:3066754848] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.ajp13.cachesize' is deprecated - please check the documentation for
the correct replacement.
[Wed Aug 11 20:44:10 2010][4008:3066754848] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.ajp13.cache_timeout' is deprecated - please check the documentation
for the correct replacement.
[Wed Aug 11 20:44:10 2010][4008:3066754848] [info] init_jk::mod_jk.c (2830):
mod_jk/1.2.26 initialized

I'm running tomcat 6.0.29 on Linux.


Re: newbie question re mod_jk

2010-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew,

On 8/12/2010 10:42 AM, Matthew Fleming wrote:
 I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
 I have a mod_jk.conf file containing
 JkMount /Client_Access ajp13
 JkMount /Client_Access/* ajp13
 
 I'm not getting any errors in the file specified as JkLogFile, and netstat
 -l shows a listening socket at port 8009.
 
 I can load my servlet from http://localhost:8080/Client_Access, but I can't
 load it from http://localhost/Client_Access
 so mod_jk isn't working. What could it be?

mod_jk doesn't read a file called mod_jk.conf, so you've got to be
including it in your httpd.conf, somewhere. Can you check your
configuration to find out where it's being loaded?

It's possible that your JkMount directives are being processed at the
top level of the configuration and then are not being made visible in
your VirtualHost.

I recommend a few changes to your configuration:

 PS, here is my whole mod_jk.conf file:
 
 LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
 JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
 JkLogFile /var/log/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y]
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T

Leave all of the above in mod_jk.conf

 JkMount /Client_Access ajp13
 JkMount /Client_Access/* ajp13

Move these two lines into your httpd.conf file inside the VirtualHost
that responds to http://localhost/ requests.

 worker.ajp13.cachesize=10

As the logs state, this setting is deprecated. Check the mod_jk
documentation for its replacement. You can find that documentation here:
http://tomcat.apache.org/connectors-doc/reference/workers.html

Just search for cachesize. Read that section carefully: you might want
to eliminate that option entirely from your configuration.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxkOX0ACgkQ9CaO5/Lv0PB0DQCeKDpUeXCJ8dZv4DxO7boCjJxg
wvsAoIRbApJGsFURM5eEqfxgAErz7tHT
=/lzP
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: newbie question re mod_jk

2010-08-12 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew,

On 8/12/2010 10:42 AM, Matthew Fleming wrote:

I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
I have a mod_jk.conf file containing
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

I'm not getting any errors in the file specified as JkLogFile, and netstat
-l shows a listening socket at port 8009.

I can load my servlet from http://localhost:8080/Client_Access, but I can't
load it from http://localhost/Client_Access
so mod_jk isn't working. What could it be?


mod_jk doesn't read a file called mod_jk.conf, so you've got to be
including it in your httpd.conf, somewhere. Can you check your
configuration to find out where it's being loaded?

It's possible that your JkMount directives are being processed at the
top level of the configuration and then are not being made visible in
your VirtualHost.

I recommend a few changes to your configuration:


PS, here is my whole mod_jk.conf file:

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T


Leave all of the above in mod_jk.conf


JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13


Move these two lines into your httpd.conf file inside the VirtualHost
that responds to http://localhost/ requests.


worker.ajp13.cachesize=10


As the logs state, this setting is deprecated. Check the mod_jk
documentation for its replacement. You can find that documentation here:
http://tomcat.apache.org/connectors-doc/reference/workers.html

Just search for cachesize. Read that section carefully: you might want
to eliminate that option entirely from your configuration.


Furthermore, I would remove all the following lines :

worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

and leave only these :

worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009

Also, relative to the last line :
worker.ajp13.port=8009

check in your tomcat's server.xml file that you do have an uncommented Connector tag 
like this one :


Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

This is, at the tomcat level, the connector that responds to your worker.ajp.port, so the 
port number must match.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
I appreciate all the suggestions and have implemented them all, but its
still not working. Any other suggestions?

Matthew Fleming


Re: newbie question re mod_jk

2010-08-12 Thread André Warnier

Matthew Fleming wrote:

I appreciate all the suggestions and have implemented them all, but its
still not working. Any other suggestions?


Yes. Define what not working means, like :

- describe your configuration, shortly
- what are you doing ?
- what do you expect to happen ?
- what happens instead ?
- what is in the logfiles ?

It is 2:00 AM here and I am a bit grouchy, but it is so much easier to answer you quickly 
when you provide these details, than having to pry them out of you.

And you will be the first one to benefit from it.
;-)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
Working now. Thanks again for all your advice. The original recommendations
were all that was necessary (plus I had two apache Includes in the wrong
order, and there was a little matter of a typo...) Thanks so much for all
your help.

Matthew Fleming