Multicore Solr ping trouble.

493 views
Skip to first unread message

Vasiliy Toporov

unread,
Feb 3, 2011, 4:19:45 AM2/3/11
to PHP Solr Client
Hello.

Our php-application use Solr search engine on Tomcat 6. To connect
with Solr we use Php Solr Client. When our index were based on single
core everything was fine. But when I changed the configuration to
multicore, Php Solr Client stopted to work.

The problem was in this part of code:

if (!$this->solr->ping()) {
echo 'Solr service not responding.';
exit;
}

When I'm trying to ping each Solr core directly from admin-panel, I
get this java-exeption (I've got it in Tomcat6-Solr, installed on
Lubuntu 10.10 and Debian 5 Lenny):

HTTP Status 500 - java.lang.IllegalStateException: <pingQuery> not
configured (consider registering PingRequestHandler with the name '/
admin/ping' instead) org.apache.jasper.JasperException:
java.lang.IllegalStateException: <pingQuery> not configured (consider
registering PingRequestHandler with the name '/admin/ping' instead) at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:
491) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
413) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:
260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206) at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:
646) at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:
436) at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:
374) at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:
302) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
264) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
298) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
857) at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:588) at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
489) at java.lang.Thread.run(Thread.java:636) Caused by:
java.lang.IllegalStateException: <pingQuery> not configured (consider
registering PingRequestHandler with the name '/admin/ping' instead) at
org.apache.solr.core.SolrConfig.getPingQueryRequest(SolrConfig.java:
302) at
org.apache.solr.core.SolrCore.getPingQueryRequest(SolrCore.java:769)
at org.apache.jsp.admin.ping_jsp._jspService(ping_jsp.java:195) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
377) ... 22 more


It's funny, but when I commented ping part of Php Solr Client
inicialization, everything started to work - proper indexing and
making queries.

Thanks for your attention.

Donovan Jimenez

unread,
Feb 3, 2011, 10:14:55 AM2/3/11
to php-sol...@googlegroups.com
I think when you moved to multi-core something might not have translated properly in your solrconfig.xml. The stack trace is complaining that the pingQuery configuration element isn't defined, which is used by the admin ping request handler (it performs a solr query for the ping). Here's the relevant wiki doc, i think you just need to add it to your solrconfig.xml and see where that gets you:


Hope it helps,
Donovan


--
You received this message because you are subscribed to the Google Groups "PHP Solr Client" group.
To post to this group, send email to php-sol...@googlegroups.com.
To unsubscribe from this group, send email to php-solr-clie...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/php-solr-client?hl=en.


Vasiliy Toporov

unread,
Feb 4, 2011, 2:55:26 AM2/4/11
to PHP Solr Client
Thanks for link, Donovan. This information solved the problem.

I just add this piece of code to admin block in solrconfig.xml (for
each core).

<gettableFiles>
solrconfig.xml
schema.xml
</gettableFiles>
<pingQuery>q=solr&amp;version=2.0&amp;start=0&amp;rows=0</pingQuery>
<healthcheck type="file">server-enabled</healthcheck>

On Feb 3, 8:14 pm, Donovan Jimenez <donovan.jime...@gmail.com> wrote:
> I think when you moved to multi-core something might not have translated
> properly in your solrconfig.xml. The stack trace is complaining that the
> pingQuery configuration element isn't defined, which is used by the admin
> ping request handler (it performs a solr query for the ping). Here's the
> relevant wiki doc, i think you just need to add it to your solrconfig.xml
> and see where that gets you:
>
> http://wiki.apache.org/solr/SolrConfigXml#The_Admin.2BAC8-GUI_Section
>
> Hope it helps,
> Donovan
>
> > php-solr-clie...@googlegroups.com<php-solr-client%2Bunsu...@googlegroups.com>
> > .

kapil yadav

unread,
Sep 8, 2016, 9:56:21 AM9/8/16
to PHP Solr Client
Awesome, Thanks for wonderful help.
Reply all
Reply to author
Forward
0 new messages