Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

this can have multiple reasons:

  • tomcat is not running
  • tomcat is running, but no connector for port 8009 is configured
  • tomcat is running, but a firewall between apache and tomcat does not allow traffic on port 8009 (should not be the case in your situation)
  • tomcat is running, but not listening on this ip
share|improve this answer
add comment

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 connector

Note, whatever you set the address to, make sure your worker.properties file has the same setting, e.g.:

worker.ajp13w.host=192.168.1.109

...and that appears to be all there is to it.

share|improve this answer
    
BTW: I did not see this on my other installation as I was always running Tomcat through Eclipse and the Tomcat plugin for Eclipse. –  Rocjoe Jul 28 '10 at 2:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.