I'm seeing spam in the mod_jk.log file, with the following error message: jk_connect.c (593): connect to 127.0.0.1:8009 failed (errno=61)
Tomcat is running properly, there are no firewalls configured between Apache and Tomcat (they are both running on the same machine), and there is a listener up on 8009. The connector runs properly for several days at a time, before starting to spam the log files with the above message, for any and all new connections.
Once the spam starts, the only way I've discovered to recover from it is to first restart Tomcat, and then restart Apache.
What are the most likely causes for this kind of problem?
this can have multiple reasons:
I was having the exact same problem on a fresh installation just this week. I had copied everything, file for file, from a Tomcat 5.5 install that was working exactly as expected so this was really a puzzling situation.
So I ran TCPView and I could see that AJP is NOT binding on port 8009 for TCP (but it was for TCPv6! wth...)
It appears that later versions of Tomcat, or isapi_redirect.dll or Tomcat5w.exe (the Tomcat service) seems to be "TCPv6 aware" and that is where the trouble begins.
The good news is that you can set the "address" property of in server.xml to an IPv4 address, e.g.:
<Connector address="192.168.1.109" port="8080"
... for your web service and<Connector address="192.168.1.109" port="8009"
... for the ajp/1.3 connectorNote, whatever you set the address to, make sure your worker.properties file has the same setting, e.g.:
...and that appears to be all there is to it.