Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat Clustering with Apache Server - Wrong Message Format Error  RSS feed

 
Vaibhav Gargs
Ranch Hand
Posts: 112
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to do tomcat instances clustering with Apache Server 2.4. I have tested Apache Server and Tomcat instances individually and all of them are working fine. But, while i try to access the tomcat instances through Apache Server, then i am getting below error:


Error:

[Sat Jun 10 23:48:15 2017] [7000:7916] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1313): wrong message format 0x4854 from 127.0.0.1:8009
[Sat Jun 10 23:48:15 2017] [7000:7916] [error] ajp_get_reply::jk_ajp_common.c (2176): (instance1) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Sat Jun 10 23:48:15 2017] [7000:7916] [info] ajp_service::jk_ajp_common.c (2673): (instance1) sending request to tomcat failed (recoverable), because of protocol error (attempt=1)

Below are my configuration files entries:

Workers.properties:

worker.list=balancer,stat

worker.balancer.type=lb
worker.balancer.balance_workers=instance1,instance2


worker.stat.type=status


worker.instance1.type=ajp13
worker.instance1.port=8009
worker.instance1.host=localhost

worker.instance2.type=ajp13
worker.instance2.port=8010
worker.instance2.host=localhost


Tomcat Server.xml:

    <Connector port="8009" protocol="AJP/1.3"  />


httpd.conf: (For Apache Server)

LoadModule jk_module modules/mod_jk.so


<IfModule jk_module>

JkWorkersFile conf/workers.properties

JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat '[%a %b %d %H:%M:%S %Y] '
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat '%w %V %T'

JkMount /status stat
JkMount / balancer
</IfModule>

Please suggest your inputs if I am missing something. I have tried to search a lot on google but nothing worked

Thanks for your support.

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!