0

I'm trying to use Solr cloud with zookeeper. Per the solr cloud page, I am trying to use a standalone zookeeper and have the solr instances connect to it. Here's my problem: I can connect to zookeeper one time. Everything looks good on the solr admin page, and the "cloud" section is accurate. If I shut down my client and restart, I get 404'd when I try to access the solr admin page again.

There are no readily apparent errors in any logs, on either client or zookeeper side. I have a vanilla zookeeper downloaded from the apache site. I made sure all my versions are the same. My zoo.cfg is simple:

tickTime=2000
initLimit=10
syncLimit=5

I am using CloudSolrServer to connect my program (which is running a solr instance) to zookeeper. I have read quite a bit about client session timeouts/termination, but I would have guessed completely shutting down and restarting the client would start a fresh session.

I am using solr v4.1.0 and zookeeper v3.4.5.

Wisco crew
  • 1,337
  • 1
  • 17
  • 25

1 Answers1

0

I believe I figured out what was wrong. Faulty logic in my program was incorrectly causing the clients to believe there was no zookeeper running, so they started an embedded zookeeper. Once this was up, it communicated with the (actually running) standalone zookeeper, so I had a 2-instance zookeeper ensemble running.

After I shut it down, the standalone zookeeper remained up, and now my program knew about it via zoo_data. On restart it would connect to the standalone zookeeper, but not start an embedded one again. This made it so I only had 1 out of 2 zookeepers running, and not enough for a quorum. So my program just spun its wheels waiting for another zookeeper to come online, which would never happen.

TL;DR: My resolution was to fix the bug in detecting if a zookeeper is live to connect to.

Wisco crew
  • 1,337
  • 1
  • 17
  • 25