Tomcat Clustering With Apache-[warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy
I am new to apache and tomcat, and trying to implement clustering with mod_proxy and able get run multiple tomcat instances but got stuck. Here is my config:
httpd.conf:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_balancer.so
<Proxy balancer://testcluster stickysession=JSESSIONID>
BalancerMember ajp://localhost:8109 min=10 max=100 route=server1 loadfactor=1
BalancerMember ajp://localhost:8209 min=20 max=200 route=server2 loadfactor=1
</Proxy>
ProxyPass / balancer://testcluster/
When restarting apache its showing the following in error.log:
[Fri Feb 27 16:45:44 2015] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Fri Feb 27 16:46:48 2015] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
And also my server.xml of two instances has set to jvmRoute="server1" and jvmRoute="server1"....
Solution 1:
I know this is an old question, but maybe the answer is helpful to others.
The module names of the last two loaded modules are wrong. mod_proxy_ajp.so
is loaded as proxy_module
and mod_proxy_balancer.so
as proxy_http_module
.
wrong:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_balancer.so
right:
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so