01-19-2018 01:54 PM
I am facing the same issue when creating SOLR collection in my quickstart VM (error below) -
solrctl collection --create findrcoll -s 1
Error: can't discover Solr URI. Please specify it explicitly via --solr.
I also verified that solr server daemon is running. I am not using Cloudera Manager in my VM.
[cloudera@quickstart findrcoll]$ sudo service solr-server status
Solr server daemon is running [ OK ]
Any help is appreciated. Thanks
10-30-2018 08:32 AM
Is this a bug in CDH 5.15?
The same happens for me.
This works
solrctl --zk ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr instancedir --create ds-collection /tmp/ds-collection
This gives me Solr url not found error:
solrctl --zk ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr collection --create ds-collection -s 2 -r 2
The above command used to work in older 5.1x versions. Please advise.
10-30-2018 08:42 AM
@bgooley Please see my post above. Thanks.
11-01-2018 07:37 AM
Anyone?
11-01-2018 08:37 AM
11-01-2018 09:34 AM
11-01-2018 09:35 AM - edited 11-01-2018 09:36 AM
[centos@ip-172-31-81-167 data]$ solrctl --trace --zk ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr collection --delete ds-collection
+ shift 1
+ test 5 '!=' 0
+ case "$1" in
+ '[' 5 -gt 1 ']'
+ SOLR_ZK_ENSEMBLE=ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr
+ shift 2
+ test 3 '!=' 0
+ case "$1" in
+ break
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -z ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr ']'
+ SOLR_ADMIN_ZK_CMD='ZKCLI_JVM_FLAGS=${ZKCLI_JVM_FLAGS} LOG4J_PROPS=${SOLR_CONF_DIR}/log4j.properties ${SOLR_HOME}/bin/zkcli.sh -zkhost $SOLR_ZK_ENSEMBLE 2>&3'
+ '[' 3 -gt 0 ']'
+ test 3 '!=' 0
+ case "$1" in
+ '[' --delete = --list ']'
+ '[' --delete = --list-snapshots ']'
+ '[' 3 -gt 2 ']'
+ case "$2" in
++ echo --delete
++ tr '[a-z]-' '[A-Z] '
+ COL_ACTION=' DELETE'
++ echo DELETE
+ eval solr_webapi ''\''/admin/collections?action=DELETE&name=ds-collection'\'''
++ solr_webapi '/admin/collections?action=DELETE&name=ds-collection'
++ '[' -z '' ']'
+++ get_solr_protocol
++++ eval 'ZKCLI_JVM_FLAGS=${ZKCLI_JVM_FLAGS}' 'LOG4J_PROPS=${SOLR_CONF_DIR}/log4j.properties' '${SOLR_HOME}/bin/zkcli.sh' -zkhost '$SOLR_ZK_ENSEMBLE' '2>&3' -cmd get /clusterprops.json
+++++ ZKCLI_JVM_FLAGS=
+++++ LOG4J_PROPS=/etc/solr/conf/log4j.properties
+++++ /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/../lib/solr//bin/zkcli.sh -zkhost ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr -cmd get /clusterprops.json
+++ SOLR_STATE='{"urlScheme":"http"}'
+++ echo '{"urlScheme":"http"}'
+++ grep -i urlScheme
+++ grep -q -i https
+++ echo http
++ local SOLR_PROTOCOL=http
+++ get_solr_state /live_nodes
+++ sed -ne 's#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'
++++ eval 'ZKCLI_JVM_FLAGS=${ZKCLI_JVM_FLAGS}' 'LOG4J_PROPS=${SOLR_CONF_DIR}/log4j.properties' '${SOLR_HOME}/bin/zkcli.sh' -zkhost '$SOLR_ZK_ENSEMBLE' '2>&3' -cmd ls /live_nodes
+++++ ZKCLI_JVM_FLAGS=
+++++ LOG4J_PROPS=/etc/solr/conf/log4j.properties
+++++ /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/../lib/solr//bin/zkcli.sh -zkhost ip-172-31-90-165.ec2.internal:2181,ip-172-31-81-167.ec2.internal:2181,ip-172-31-92-169.ec2.internal:2181/solr -cmd ls /live_nodes
+++ SOLR_STATE='/live_nodes (5)
/live_nodes/ip-172-31-81-167.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-90-165.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-82-140.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-92-169.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-93-54.ec2.internal:8983_solr (0)'
+++ echo '/live_nodes (5)
/live_nodes/ip-172-31-81-167.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-90-165.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-82-140.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-92-169.ec2.internal:8983_solr (0)
/live_nodes/ip-172-31-93-54.ec2.internal:8983_solr (0)'
+++ grep -v '^/ '
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-81-167.ec2.internal:8983/solr
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-90-165.ec2.internal:8983/solr
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-82-140.ec2.internal:8983/solr
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-92-169.ec2.internal:8983/solr
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-93-54.ec2.internal:8983/solr
++ for node in '`get_solr_state '\''/live_nodes'\'' | sed -ne '\''s#/live_nodes/\(.*:[0-9][0-9]*\).*$#\1#p'\''`' 'localhost:$SOLR_PORT'
++ curl -i --retry 5 -s -L -k --negotiate -u : http://localhost:/solr
++ '[' -n '' ']'
++ die 'Error: can'\''t discover Solr URI. Please specify it explicitly via --solr.'
++ '[' '!' -z 'Error: can'\''t discover Solr URI. Please specify it explicitly via --solr.' ']'
++ echo Error: 'can'\''t' discover Solr URI. Please specify it explicitly via --solr.
Error: can't discover Solr URI. Please specify it explicitly via --solr.
## Seems like the collection command is not working in CDH 5.15. Instancedir works fine with zk quoram.
11-01-2018 09:58 AM
11-01-2018 10:05 AM
Yes, running all commands on NN2 which happens to be a Solr node also. I was able to create the collections using the collections api, but solrctl works for some commands and just not the collections command. Maybe some bug, please check the code. Thanks
11-02-2018 12:53 PM