tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat6 with mod_jk
Date Mon, 10 Jan 2011 20:37:35 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter,

On 1/8/2011 8:28 PM, Peter Sparkes wrote:
>  LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

...

> file /etc/apache2/conf.d/jk.conf is
> <IfModule mod_jk.c>
>     JkWorkersFile /etc/apache2/workers.properties
>     JkLogFile /var/log/apache2/mod_jk.log
>     JkLogLevel debug
> </ifmodule>

Are you sure this file is being included in your configuration?

Try putting an invalid directive in there and running 'apache2 -t' to
see what happens. If you get an error, it's loading your configuration
correctly.

> file  /etc/apache2/sites-enabled/appledorera.org is
> <VirtualHost appledorera.org:80>
>         ServerAdmin admin@appledorera.org
>         ServerName  appledorera.org
>         ServerAlias www.appledorera.org
>         JkMount /* appledorera
> </VirtualHost>
>
> file /etc/apache2/workers.properties is
> workers.tomcat_home = /usr/local/tomcat
> workers.java_home=  / usr/lib/jvm/java-6-sun
> ps = /

These three settings (above) are no longer used. Do yourself a favor and
remove them.

> worker.list=appledorera
>  Set properties for appledorera

The above line may be confusing to the configuration file parser. You
should use "#" at the beginning of the line to indicate comments. The
above might be causing your problem.

> worker.appledorera.type=ajp13
> worker.appledorera.host=localhost
> worker.appledorera.port=8109

Looks good.

> file /usr/local/tomcat/instances/appledorera/conf/server.xml I have amended
> <Server port="8005" shutdown="SHUTDOWN">  to
> <Server port="8105" shutdown="SHUTDOWN">
> and
> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> to
> <Connector port="8109" protocol="AJP/1.3" redirectPort="8443" />

Ok.

> When the tomcat instance in /usr/local/tomcat/instances/appledorera is
> stopped
> http://appledorera.org/  gives Service Temporarily Unavailable
> and tail /var/log/apache2/mod_jk.log is
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [debug]
> jk_open_socket::jk_connect.c (448): socket TCP_NODELAY set to On
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [debug]
> jk_open_socket::jk_connect.c (548): trying to connect socket 14 to
> 127.0.0.1:8109
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [info]
> jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8109 failed
> (errno=111)
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [info]
> ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to
> (127.0.0.1:8109) (errno=111)
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [error]
> ajp_send_request::jk_ajp_common.c (1359): (appledorera) connecting to
> backend failed. Tomcat is probably not started or is listening on the
> wrong port (errno=111)
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [info]
> ajp_service::jk_ajp_common.c (2194): (appledorera) sending request to
> tomcat failed (recoverable), because of error during request sending
> (attempt=2)
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [error]
> ajp_service::jk_ajp_common.c (2212): (appledorera) Connecting to tomcat
> failed. Tomcat is probably not started or is listening on the wrong port
> [Sun Jan 09 01:14:35.460 2011] [8183:3834091344] [debug]
> ajp_reset_endpoint::jk_ajp_common.c (691): (appledorera) resetting
> endpoint with sd = 4294967295 (socket shutdown)
> [Sun Jan 09 01:14:35.461 2011] [8183:3834091344] [debug]
> ajp_done::jk_ajp_common.c (2530): recycling connection pool slot=0 for
> worker appledorera
> [Sun Jan 09 01:14:35.461 2011] [8183:3834091344] [info]
> jk_handler::mod_jk.c (2364): Service error=-3 for worker=appledorera


This looks like correct behavior to me.

> When the tomcat instance in /usr/local/tomcat/instances/appledorera is
> started
> http://appledorera.org/ gives an empty page
> and tail /var/log/apache2/mod_jk.log is
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1117): 0000    04 01 90
> 00 0B 42 61 64 20 52 65 71 75 65 73 74  - .....Bad.Request
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1117): 0010    00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00  - ................
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (608): status = 400
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (615): Number of headers is = 0
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1117): received from
> ajp13 pos=0 len=2 max=8192
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1117): 0000    05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00  - ................
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_process_callback::jk_ajp_common.c (1669): AJP13 protocol: Reuse is OK
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_reset_endpoint::jk_ajp_common.c (691): (appledorera) resetting
> endpoint with sd = 14
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> ajp_done::jk_ajp_common.c (2530): recycling connection pool slot=0 for
> worker appledorera
> [Sun Jan 09 01:11:31.376 2011] [8190:3834091344] [debug]
> jk_handler::mod_jk.c (2348): Service finished with status=400 for
> worker=appledorera

That's the response from the server, and doesn't include the request
made. Can you empty your mod_jk log file, restart httpd, make a /single/
request that should go to Tomcat, and then post the mod_jk.log file back
to the list?

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

iEYEARECAAYFAk0rbg8ACgkQ9CaO5/Lv0PBW7QCgi2l44TawQqUvCueCDfmop2Ja
XrQAnAgmzN3PgbnBpOcdoFGU8/KO7WJj
=ibJe
-----END PGP SIGNATURE-----

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


Mime
View raw message