I have 3 Zookeeper servers running at server1:2181, server2:2181 and server3:2181.
I want to start 4 Solr servers at server1:8983,server2:8983,server3:8983 and server4:8983 to point to Zookeeper Ensemble above. So at server1, I run a command:
bin>solr -c -z server1:2181,server2:2181,server3:2181 -m 2g
and I received an error message:
Missing operand.
Invalid command-line option: server2:2181
Usage:.........
but if I point to one Zookeeper server such as:
bin>solr -c -z server1:2181 -m 2g
it starts successfully.
All server running in Windows.
What did I do wrong? Or does the Solr start script in Windows have an error?
You need to put your zk connection string in quotes.
Related
I'm trying to set up 3 Solr (8.4.0) servers with a Zookeeper (3.7.0) ensemble on Windows Server 2019. Each server has one Solr instance and one Zookeeper installed. The problem I'm facing is that I'm getting an error when trying to start Solr pointing to multiple Zookeeper Ips:
.\solr start -c -z "172.29.70.47:2181,172.29.70.48:2181"
Console output:
Invalid command-line option: 172.29.70.48:2181
I have tried various combinations of this command with or without quotes, with or without ports etc but it fails every time. If I only specify one Zookeeper IP and port the command runs fine. As soon as I specify more than one IP it fails.
I've tried setting ZK_HOST in solr.in.cmd but it also fails to start. Even in the docs (https://solr.apache.org/guide/8_4/setting-up-an-external-zookeeper-ensemble.html#using-the-z-parameter-with-binsolr) it shows that configuring multiple IPs should be possible using the -z parameter.
What am I missing?
Thanks to MatsLindh I was able to figure out what the issue was. When using Powershell the double quotes need to be wrapped in single quotes so the command should look like:
.\solr start -c -z '"172.29.70.47:2181,172.29.70.48:2181,172.29.70.49:2181"'
Using Command Prompt in windows double quotes work as expected and the command should be:
solr start -c -z "172.29.70.47:2181,172.29.70.48:2181,172.29.70.49:2181"
bin/solr start -e techproducts -m 5g -Duser.timezone=US/Eastern -Xdebug -Xrunjdwp:server=y,suspend=n,transport=dt_socket,address=8000
ERROR: -Xdebug is not supported by this script
when i am running solr6.6 on debug mode, its giving me error.
can someone tell me how to run solr on debug mode?
This exact use case is given in the examples in the script:
./solr start -c -m 1g -z localhost:2181 -a \"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\""
-a Additional parameters to pass to the JVM when starting Solr, such as to setup
Java debug options. For example, to enable a Java debugger to attach to the Solr JVM
you could pass: -a \"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\"
In most cases, you should wrap the additional parameters in double quotes.
So, I have two instance of solr node running along with a embedded zookeeper on a single machine using the link Set up solrCloud. Now I want to add a new machine to this cluster. I run bin\solr start -cloud -s ./solr -h newMachineIP -p 9000 -z oldMachineIP:9983. It shows successful startup, but when I create a new collection it gives me an error saying "Server refused connection at: http://newMachineIp:9000/solr"
just a guess but... does C:\path\to\dir\solr-7.1.0\solr-7.1.0\server\solr\gettingstarted contain any spaces? If so, install Solr into a path with no spaces, this has been an issue before in Windows, and it's possible it still is in some code paths. Solr on Windows get much less testing than on linux.
I am trying to setup Solr cloud with multiple instance(s), all on one machine my zookeeper ensemble is runing on local machine.
for first instance
bin/solr start -c -s $INSATNCE_DIR -p $solrport -z localhost:2181,localhost:2182,localhost:2183 -Dsolr.log=/logs -Dsolr.install.dir=/solr-5.4.0 -V -Dbootstrap_conf=true
and for other instance
bin/solr start -c -s $INSATNCE_DIR -p $solrport -z localhost:2181,localhost:2182,localhost:2183 -Dsolr.log=/logs -Dsolr.install.dir=/solr-5.4.0 -V -Dbootstrap_conf=false
all works fine, but each of these instance admin interface under cloud>Tree only lists one live node
localhost:8983_solr
not the other instances.
This is causing issue when i am creating collection to be distributed to nodeSet.
Anyone has any idea whats am i doing wrong?
I have installed zookeeper on 3 machines. And set zoo.conf file. It's running with configuration. I installed solr also on these 3 machine.
Now i need to know how to run solr cloud on group of machine with number of shards?
My zookeeper configuration on all machine :-
tickTime=2000
dataDir=/var/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
server.1=instance-1:2888:3888
server.2=instance-2:2889:3889
server.3=instance-3:2890:3890
zookeeper command to run it on all machine:-
bin/zkServer.sh start conf/zoo.cfg
Solr command to run it:-
bin/solr start -e cloud -z instance-1:2181,instance-2:2182,instance-3:2183 -noprompt
It's just creating 2 shards on each machine individually on default port. Not able to connect machine with each other.