1

I would like to connect apache to tomcat via mod_jk (same machine). The ajp connector in tomcat is listening on port 8009, the worker settings are:

worker.worker1.port=8009 worker.worker1.host=localhost 

However, the connection fails, here is the mod_jk debug log:

[debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13' [debug] init_ws_service::mod_jk.c (1097): Service protocol=HTTP/1.1 method=GET ssl=false host=(null) addr=127.0.0.1 name=localhost port=80 auth=(null) user=(null) laddr=127.0.0.1 raddr=127.0.0.1 uri=/share [debug] ajp_get_endpoint::jk_ajp_common.c (3154): acquired connection pool slot=0 after 0 retries [debug] ajp_marshal_into_msgb::jk_ajp_common.c (626): ajp marshaling done [debug] ajp_service::jk_ajp_common.c (2449): processing worker1 with 2 retries [debug] ajp_send_request::jk_ajp_common.c (1623): (worker1) all endpoints are disconnected. [debug] jk_open_socket::jk_connect.c (485): socket TCP_NODELAY set to On [debug] jk_open_socket::jk_connect.c (609): trying to connect socket 560 to 0.0.0.0:0 [info] jk_open_socket::jk_connect.c (627): connect to 0.0.0.0:0 failed (errno=47) [info] ajp_connect_to_endpoint::jk_ajp_common.c (995): Failed opening socket to (0.0.0.0:0) (errno=47) 

Why does mod_jk try to connect to 0.0.0.0:0 and not to 127.0.0.1:8009???

Thank you for your help! Tobias

8
  • Have you tried using 127.0.0.1 instead of localhost in the worker properties? it looks odd to me, though... Commented May 18, 2012 at 9:57
  • worker.worker1.host=127.0.0.1 gives the same result Commented May 18, 2012 at 10:09
  • Is this on Windows or Linux? Commented May 19, 2012 at 15:25
  • its Windows Server, 64bit Commented May 19, 2012 at 16:08
  • Another option is to use mod_proxy_http. You'll set it up with 1 ProxyPass line. Commented May 19, 2012 at 17:00

1 Answer 1

1

We just had the same problem and resolved it by using an older version of mod_jk (it did not work 1.2.36 and did work with 1.2.35) on Windows Apache 2.2.22 32bit

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.