12 Replies Latest reply on Jul 22, 2013 9:06 AM by jvassev2

    HornetQ Servlet or HTTP via mod_proxy results in intermediate connection losses.


      Hi all,


      We're finally upgrading from JBossMQ to HornetQ! For JBossMQ we allways used the jbossmq-httpil invocation layer to create connections from hubs worldwide to one central server. The central server is a JBoss Server hidden behind an apache front-end server with mod_proxy_ajp as reverse proxy.


      For HornetQ the setup needs to be similar. I tried with with the servlet connector/acceptor and deployed the messaging.war in jboss (HTTP on port 8080, AJP on port 8009).


      My client can only connect to the apache server, so I configured mod_proxy in the apache server:

      ProxyPass /messaging/ ajp://local.hornetq:8009/messaging/


      I can now connect to the server using a client connection with properties useServlet=true, servletPath=messaging/HornetQServlet, host=apache, port=80, and I can send and receive individual messaging very easily.


      But as soon as I need to send/receive a couple of messages in a row I get


      WARNING: Timed out waiting for handler to complete processing

      javax.jms.JMSException: Timed out waiting for response when sending packet 43

                at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:277)

                at org.hornetq.core.client.impl.ClientSessionImpl.commit(ClientSessionImpl.java:514)

                at org.hornetq.core.client.impl.DelegatingSession.commit(DelegatingSession.java:156)

                at org.hornetq.jms.client.HornetQSession.commit(HornetQSession.java:229)


      Caused by: HornetQException[errorCode=3 message=Timed out waiting for response when sending packet 43]

                ... 19 more


      If I go directly to the jboss server (host=local.hornetq, port=8080), everything keeps running smoothly.


      I also tried:

      ProxyPass /messaging/ http://local.hornetq:8080/messaging/

      SetEnv proxy-sendchunked 1

      But this gives the same errors.



      I suspect that HornetQ uses some strange HTTP requests with long running connections and Chunked encoding that gets blocked by mod_proxy_ajp. Any advice on how to tune apache to fix this?