我想通过 mod_jk 将 apache 连接到 tomcat(同一台机器)。tomcat 中的 ajp 连接器正在监听端口 8009,工作器设置为:
worker.worker1.port=8009
worker.worker1.host=localhost
但是连接失败,这里是 mod_jk 调试日志:
[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)
为什么 mod_jk 尝试连接 0.0.0.0:0 而不是 127.0.0.1:8009???
谢谢你的帮助!Tobias
答案1
我们刚刚遇到了同样的问题,并通过在 Windows Apache 2.2.22 32 位上使用旧版本的 mod_jk(它在 1.2.36 上不起作用,但在 1.2.35 上起作用)解决了该问题