Tomcat

mod_jk 不嘗試連接

  • April 5, 2013

我在 /var/log/httpd/mod_jk.log 中有以下字元串

[Fri Apr 05 20:48:04.709 2013] [11848:46912530825504] [info] ajp_service::jk_ajp_common.c (2543): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [error] jk_open_socket::jk_connect.c (448): socket() failed (errno=22)
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to (127.0.0.1:9008) (errno=22)
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [error] ajp_send_request::jk_ajp_common.c (1578): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=22)
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [info] ajp_service::jk_ajp_common.c (2543): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [error] ajp_service::jk_ajp_common.c (2562): (ajp13) connecting to tomcat failed.
[Fri Apr 05 20:48:04.808 2013] [11848:46912530825504] [info] jk_handler::mod_jk.c (2627): Service error=-3 for worker=ajp13

tomcat 正在監聽 9008 埠,我嘗試連接 ajpclient 和 telnet(這似乎有效),

我也檢查過

tshark -i any and port 9008

它沒有擷取任何東西(似乎 mod_jk 甚至沒有嘗試打開與 tomcat 的連接)。

所以這裡有一個問題 - 我怎樣才能更多地調試 mod_jk 以及什麼可能導致這種行為?

我通過重新編譯 mod_jk.so 來修復它(plesk_mod_jk 附帶的一個似乎與 XEN 不兼容)。

引用自:https://serverfault.com/questions/496478