Specifying ZK_HOST in the solr.in.sh file works fine for me. bq: running bin/solr start does not start up in cloud mode despite having ZK_HOST set in /etc/default/solr.in.sh.
I don't think the startup script would even look in /etc/default for solr.in.sh unless you've defined a "HOME" env variable pointing there. And even then it needs to be a hidden file (the "." in $HOME/.solr.in.sh). See the "CONTROLLING STARTUP" section in bin/solr: # the following locations are searched in this order: # # ./ # $HOME/.solr.in.sh # /usr/share/solr # /usr/local/share/solr # /var/solr/ # /opt/solr (plus some other options...) FYI: bq: "bin/solr start-c -z xxx/solr makes no difference." Unless you've made a typo the -z parameter requires the ZK ensemble, not a Solr node. The -c is unnecessary when -z is specified BTW. The -c will start an _internal_ zookeeper in the absence of a -z parameter..... Best, Erick On Sat, Jun 3, 2017 at 8:09 AM, Lee Carroll <lee.a.carr...@googlemail.com> wrote: > Hi > running bin/solr start does not start up in cloud mode despite having > ZK_HOST set in /etc/default/solr.in.sh. > > running openjdk 1.8 > solr 6.5.1 on aws linux > zookeeper 3.4.6 on aws linux (3 node ensemble) > > logs look clean both in zookeeper and solr > > running bin/solr zk ls / returns > > Connecting to ZooKeeper at ec2-xxx:2181,ec2-xxx:2181,ec2-xxx:2181/solr ... > Getting listing for Zookeeper node / from ZooKeeper at > ec2-34-196-159-23.compute-1.amazonaws.com:2181, > ec2-34-196-204-202.compute-1.amazonaws.com:2181, > ec2-34-196-212-108.compute-1.amazonaws.com:2181/solr recurse: false > configs > solr.xml > > This suggests that zk_hosts is being picked up and the connection looks ok > woth the zk ensemble > > running bin/solr start returns > > Waiting up to 180 seconds to see Solr running on port 8983 [\] > Started Solr server on port 8983 (pid=30467). Happy searching! > > but the status suggests we are in stand alone core mode > > bin/solr status > > Found 1 Solr nodes: > > Solr process 30467 running on port 8983 > { > "solr_home":"/var/solr/data", > "version":"6.5.1 cd1f23c63abe03ae650c75ec8ccb37762806cc75 - jimczi - > 2017-04-21 12:23:42", > "startTime":"2017-06-03T15:02:53.995Z", > "uptime":"0 days, 0 hours, 1 minutes, 5 seconds", > "memory":"23 MB (%4.7) of 490.7 MB"} > > and indeed trying to create collection fails > > bin/solr create_collection -c destinations -n destinations > > ERROR: Solr at http://localhost:8983/solr is running in standalone server > mode, please use the create_core command instead; > create_collection can only be used when running in SolrCloud mode. > > forcing the issue with bin/solr start -c > > or even > bin/solr start-c -z xxx/solr makes no difference. > > I'm sure i'm missing something obvious in the solr.in.sh but can't find > anything so far. > > Lee C