I have an linux server running with a JBoss Instance with apache2. Apache2 will use AJP connection to reverse proxy to JBoss.

I found these messages in the apache error.log:

[error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[error] ajp_read_header: ajp_ilink_receive failed
[error] (120006)APR does not understand this error code: proxy: read response failed from (hostname)
[error] (111)Connection refused: proxy: AJP: attempt to connect to (hostname) failed
[error] ap_proxy_connect_backend disabling worker for (hostname)
[error] proxy: AJP: failed to make connection to backend: hostname
[error] proxy: AJP: disabled connection for (hostname)25

I googled around but I can't seem to find any related topics. There are people say this behavior can be caused by misconfigured apache vs jboss. Telling the max amount of connections apache allows are far greater then jboss, causing the apache connection to time out.

But I know the app isn't used by thousands of simultaneous connections at the time not even hundreds of connections so I don't believe this could be a cause.

Does anybody have an idea? Or could tell me how to debug this problem?

I'm using these versions:

  • Debian 4.3.5-4 64Bit
  • Apache Version 2.2.16
  • JBOSS Version 4.2.3.GA



4.2.3 jboss, you should increase the amount of ajp connections that you can allow in server.xml. if that is not set, the default is 40, which is too low. Up that to 20% higher than your current amount of max connections. If you have hundreds of simutanious connections, set it to 512 and monitor it using the status console.

| improve this answer | |

Here is what made jb7.1.1 work with apache mod_jk connecting trough ajp in my env:




<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>


<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="ajp" port="8009"/>

BTW isn't this google dns?

| improve this answer | |
  • Yes, it's google's DNS I used it to mask my server ip ;) I think mod_jk doesn't work with this version of JBOSS which version are you using ? – Niels Oct 9 '12 at 7:47
  • 7.1.1 also 7.1.0 and 7.0.2 on different servers, each with apache frontend and mod_jk (which seems to be obsolete, and mod_cluster is somewhat better, I'll have to investigate this). But so far it works. – radoslawc Oct 9 '12 at 11:21

I believe the behaviour you're seeing could be caused by the following jboss issue:


The issue causes AJP threads to block indefinitely on sockets with CLOSED_WAIT status. When the "maxProcessors" limit from the AJP connector is reached then jboss isn't able to answer any more requests through AJP, causing the errors you got in the apache log.

As suggested in the ticket, that can be solved in a few steps:

  • checkout jbossweb from http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_2_0_1_GA
  • apply AjpPatch.patch as suggested in the comments thread at the jboss issue tracker
  • edit build.properties.default so that jbossweb is built agains your version of jboss AS
  • build the project with ant and replace your current jboss-web.deployer/jbossweb with the patched version
| improve this answer | |

Your Answer

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

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