I just finished setting up a SolrCloud configuration with three ZooKeeper nodes on separate virtual servers, and two Solr nodes, also on separate virtual servers. All the ports are configured correctly, and the entire cloud appears to be communicating correctly. However, I can't upload my configuration to ZooKeeper. I'm doing exactly what I've done in test scenarios, and no errors are thrown, but the configuration never shows up in ZooKeeper. Here's how I'm using the client:
./zkCli.sh -cmd upconfig -zkhost xxx.xxx.xxx.94:2181,xxx.xxx.xxx.67:2181,xxx.xxx.xxx.152:2181 -confdir /zookeeper/configsets/spider/conf -confname spider
Here's the output, which doesn't (to me) indicate any problems:
Connecting to localhost:2181 2015-06-23 16:52:09,577 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-06-23 16:52:09,583 [myid:] - INFO [main:Environment@100] - Client environment:host.name=zk2.mydomain.com 2015-06-23 16:52:09,584 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_79 2015-06-23 16:52:09,586 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-06-23 16:52:09,587 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre 2015-06-23 16:52:09,587 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/root/zookeeper/server/bin/../build/classes:/root/zookeeper/server/bin/../build/lib/.jar:/root/zookeeper/server/bin/../lib/slf4j-log4j12-1.6.1.jar:/root/zookeeper/server/bin/../lib/slf4j-api-1.6.1.jar:/root/zookeeper/server/bin/../lib/netty-3.7.0.Final.jar:/root/zookeeper/server/bin/../lib/log4j-1.2.16.jar:/root/zookeeper/server/bin/../lib/jline-0.9.94.jar:/root/zookeeper/server/bin/../zookeeper-3.4.6.jar:/root/zookeeper/server/bin/../src/java/lib/.jar:/root/zookeeper/server/bin/../conf: 2015-06-23 16:52:09,587 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib 2015-06-23 16:52:09,587 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-06-23 16:52:09,587 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler= 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.13.0-51-generic 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:user.name=root 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/root 2015-06-23 16:52:09,588 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/root/zookeeper/server/bin 2015-06-23 16:52:09,590 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@8854a21
I'm not getting any errors in zookeeper.out, and obviously nothing there, but the configuration just doesn't upload. Any thoughts? I'm getting desperate.
This was my mistake: I was so accustomed to using ZooKeeper's zkCli.sh script to check status and such that I forgot to upload config you need to use the Solr-specific version of the script, zkcli.sh, which can be found in /opt/solr-5.1.0/server/scripts/cloud-scripts. Note that you need all the libraries in the solr-core JAR as well. You can extract all of these without installing Solr if you prefer -- as an Ubuntu/Java noob, I found it easier just to install Solr and use the cloud-script.