Gabbar
Gabbar

Reputation: 4066

Random errors in SolrCloud

I have an instance of SolrCloud 5.5.5 with Jetty 9 setup and working fine for the most part. Every once in a while the following errors show up in the Solr nodes. Do you have any ideas where I can start by looking for the cause of these errors?

org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates are disabled.
    at org.apache.solr.update.processor.DistributedUpdateProcessor.zkCheck(DistributedUpdateProcessor.java:1472)
    at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1595)
    at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:270)
    at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:177)
    at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:94)
    at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:69)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2102)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:460)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)

Upvotes: 0

Views: 299

Answers (1)

Hayati İbiş
Hayati İbiş

Reputation: 127

I think the question is very similar to this question.

You have to be sure that ZooKeeper is up and running and there is no communication issue between Solr nodes and ZK.

In your problem, Garbage Collector (GC) pauses can cause this exception. You can try to raise heap memory and change the GC. Then restart the affected node.

In this wiki page, they mention about tuning the GC for Solr.

The default garbage collectors are:

  • Java 7 use Parallel GC
  • Java 8 use Parallel GC
  • Java 9 use G1 GC

As mentioned in the wiki page you can try the JAVA_OPTS below:

JVM_OPTS=" \
    -XX:+UseG1GC \
    -XX:+PerfDisableSharedMem \
    -XX:+ParallelRefProcEnabled \
    -XX:G1HeapRegionSize=8m \
    -XX:MaxGCPauseMillis=250 \
    -XX:InitiatingHeapOccupancyPercent=75 \
    -XX:+UseLargePages \
    -XX:+AggressiveOpts \
    "

I hope it helps.

Upvotes: 2

Related Questions