1

I'm running an Apache tomcat + mod_jk 1.2.40 behind an apache web server.

Everything has been setup and works properly for some amount of time since a tomcat startup (measurable in days/weeks); then something happens, and mod_jk loses the connection with tomcat.

Apart from the thing that happens (actually I'm not sure of what it happens, I'm troubleshooting), I'm looking for some support about the reason for which the connection among jk and tomcat gets lost. Here follows the portion of mod_jk logs around the connecion loosing issue:

[Wed Dec 10 09:28:21 2014] [26331:140365639858112] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Wed Dec 10 09:28:37 2014] [12546:140365639858112] [info] ajp_send_request::jk_ajp_common.c (1652): (workerName) all endpoints are disconnected, detected by connect check (1), cping (0), send (0)
...
[Wed Dec 10 09:28:49 2014] [26331:140365639858112] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] jk_open_socket::jk_connect.c (758): connect to 127.0.0.1:8071 failed (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1019): Failed opening socket to (127.0.0.1:8071) (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [error] ajp_send_request::jk_ajp_common.c (1663): (workerName) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] ajp_service::jk_ajp_common.c (2673): (workerName) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Dec 10 09:29:02 2014] [13626:140365639858112] [info] jk_open_socket::jk_connect.c (758): connect to 127.0.0.1:8071 failed (errno=111)
[Wed Dec 10 09:29:02 2014] [13626:140365639858112] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1019): Failed opening socket to (127.0.0.1:8071) (errno=111)
[Wed Dec 10 09:29:02 2014] [13626:140365639858112] [error] ajp_send_request::jk_ajp_common.c (1663): (workerName) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Wed Dec 10 09:29:02 2014] [13626:140365639858112] [info] ajp_service::jk_ajp_common.c (2673): (workerName) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] jk_open_socket::jk_connect.c (758): connect to 127.0.0.1:8071 failed (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1019): Failed opening socket to (127.0.0.1:8071) (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [error] ajp_send_request::jk_ajp_common.c (1663): (workerName) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] ajp_service::jk_ajp_common.c (2673): (workerName) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [error] ajp_service::jk_ajp_common.c (2693): (workerName) connecting to tomcat failed.
[Wed Dec 10 09:29:02 2014] [13683:140365639858112] [info] jk_handler::mod_jk.c (2806): Service error=-3 for worker=workerName

I think that "mod_jk/1.2.40 initialized" means that mod_jk is starting: if I restart tomcat, everything works properly again for days/weeks.

Could you give me some suggestion? Thank you

  • Try set connectionTimeout parameter in tomcat ajp connector Eg. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="300000" /> – Federico Sierra Dec 16 '14 at 14:51
  • On your suggestion I could make some test keeping the timeout in mind, because since this problem happens every n days, it could be great to reproduce it – reallynice Dec 16 '14 at 15:22
  • I can also agree, with Apache 2.4.12 on mod_jk 1.2.40 on Windos 2012 R2 server we get the same problems. But nothing in logs of apache webserver found. – user274643 Mar 5 '15 at 13:45
  • I'm pretty sure that the problem originated in cPanel automatic updates since the 29th of october 2014, when they changed their update script (see changelog): every downtime occurred when a cPanel update occurred too. Not that every cpanel update gave us downtime, only some. – reallynice Mar 6 '15 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.