lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Access Solr via Apache's mod_proxy_balancer or mod_jk (AJP)
Date Mon, 04 Jul 2016 15:53:56 GMT
On 7/4/2016 3:54 AM, Andreas Kahl wrote:
> Hello everyone,
> we've setup two Solr servers (not SolrCloud) which shall be accessed
> via Apache webserver's load balancing (either mod_proxy_balancer or
> mod_jk).
> 1. Is it possible to configure Solr >5 to enable an AJP port as this
> was the case in earlier versions when running in Tomcat?
> 2. If AJP/mod_jk is not possible, how should I set up
> mod_proxy_balancer? At the moment I run into the error "All workers
> are in error state". This is my current Apache config:
> <Proxy balancer://solrCluster>
>                 BalancerMember http://server1:8888
>                 BalancerMember http://server2:8888
> </Proxy>
> ProxyPass /solrCluster balancer://solrCluster/solr
> ProxyPassReverse /solrCluster balancer://solrCluster/solr
> Accessing a single server with a non balanced ReverseProxy works
> perfectly, but somehow mod_proxy_balancer's health checks do get
> negative responses from Solr. Any ideas what's going wrong? (I already
> tried putting /solr into the BalancerMembers to avoid the redirect
> from / to /solr)

The eclipse wiki is down, but in the Google search results that link to
the wiki I can see the text "Using Apache mod_jk and the /Jetty AJP/
connector. We recommend using the HTTP connectors for the following
reasons: Jetty performs ..."

So for some reason I can't see at the moment, the Jetty authors don't
recommend AJP, even though it apparently can do it.  You can likely get
the AJP module working in the Jetty that Solr includes, but doing so is
outside the scope of this mailing list.

The only load balancer I've ever set up is haproxy.  I use the ping
request handler with the health check file (/solr/corename/admin/ping)
as the method for haproxy to decide when one of the Solr hosts is down. 
The health check file allows me to enable/disable a particular core so I
can influence load balancer decisions without shutting Solr down.

To get help with the proxy mod for Apache, you'll need to find a support
resource for the httpd project.  This is your best bet:


View raw message