Solrcloud: Error 500 after restart

6,973

Solution 1

I have solved the issue by setting the services startup in these mode

  • zookeeper: Automatic
  • solr: Automatic (Delayed start)

Solution 2

Suggesting that maybe zookeeper isn't started before solr tries to initialise. Using nssm dependencies can you make solr service dependant on zookeeper service. https://nssm.cc/usage

Share:
6,973

Related videos on Youtube

kasher
Author by

kasher

Updated on September 18, 2022

Comments

  • kasher
    kasher almost 2 years

    I have 3 vm windows, on all of them is installed solr 5.4.0 and 3.4.6 zookeeper; the two services start automatically when the vm start. After reboot vms the solr does not respond correctly, it gives me error500:

    HTTP ERROR 500 Problem accessing /solr/. Reason: Server Error ... SolrException: Error processing the request. CoreContainer is either not initialized or shutting down.

    Checking the logs I have also seen this error:

    o.a.s.c.SolrCore null:org.apache.solr.common.SolrException: Error occurred while loading solr.xml from zookeeper

    Trying to stop the zookeeper and solr services on all vm and start again (before start zookeeper on all vm and after solr), sometimes takes solr starts to work properly; other times by solrcloud section of the UI, we notice that the nodes are in the down state (written brown)

    I list the procedures that I run to create the cluster solr:

    • create folder "zookeeper/data" and changed the zoo.cfg file by adding the zookeeper nodes in this way

    initLimit=5

    syncLimit=2

    dataDir=C:/zookeeper/data

    clientPort=2181

    server.1=zknode1:2888:3888

    server.2=zknode2:2888:3888

    server.3=zknode2:2888:3888

    • created the myid files with the respective number on the nodes (1, 2, 3) in the zookeeper\data
    • by NSSMs I created zk service that starts the script zookeeper\bin\zkServer.cmd, and the solr service that starts solr\bin\solr.cmd with the following parameters

    -c -z "zknode1:2181,zknode2:2181,zknode3:2181" -f

    I create a collection based on an existing configuration on solr not cloud

    solr.cmd create_collection -c mycoll -d C:\conf\mycoll\conf -n mycoll -shards 1 -replicationFactor 3

    on each solr node is see that is created mycoll_shard1_replicaX folder, where X changes on each node (1,2,3). Querying all works, even dataimport, but if I restart the nodes, finding the problem written above. I'm wrong in the creation of the collection, or is this a known bug?

    • Mat
      Mat almost 8 years
      Hi kasher, did you managed in solve this problem? I have the same problem with Solr 6.1.0 and Zookeeper 3.4.5. Thanks!
    • Ian
      Ian over 7 years
      I'm looking into a similar issue, could it be that zookeeper hasn't started up before solr starts up, and so solr fails to connect to zookeeper and remains in a failed state?