Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

unable to create Solr collection / index

avatar
Explorer

Hi Team,

I've downloaded CDH quickstart vm and started to play with HUE - single node.

When I tried to create a Solr collection by running 

solrctl --zk quickstart.cloudera:2181/solr collection --create hue_solr -s 1

but i got an error that i want to use --solr as the cluster can't detect the solr automatically, I've googled this error and found people talking abut specifying the solr url as well as the zookeeper url, when I run the command as solrctl --zk quickstart.cloudera:2181/solr --solr quickstart.cloudera:8983/solr collection --create hue_solr -s 1 and this time I got another error "curl: option --negotiate: the installed libcurl version doesn't support this
curl: try 'curl --help' or 'curl --manual' for more information
Error: A call to SolrCloud WEB APIs failed:"

found this kb article https://www.cloudera.com/documentation/enterprise/5-7-x/topics/search_solrctl_examples.html talking about disabling proxy so I run it and the command became NO_PROXY='*' solrctl --zk quickstart.cloudera:2181/solr --solr quickstart.cloudera:8983/solr collection --create hue_solr -s 1 but still getting same error as above.

I came from Windows background so my Linux knowledge is a bit limited.

I  tried to restart Solr service but this didn't help.

Any help would be appreciated.

Thanks in advance

 

 

1 ACCEPTED SOLUTION

avatar
Expert Contributor
Hi Osama,

Sorry, didn't realize you were managing using Cloudera Manager (CM). In
that case you should be using CM to start and stop the Solr services. I
would try to get thing reset by stopping Solr via CM, make sure it's
stopped on the system, and then start it with CM. If it doesn't stop via
CM control then you may have to manually stop it this time. I am not
familiar with how the manual init scripts interact w/ the CM methods for
service control so you may be in an odd state.

* Stop Solr from CM
* Check from the command line "ps -ef | grep solr"
* If needed, stop Solr from the command line "service solr-server stop"
* Check from the command line "ps -ef | grep solr"
* Start Solr from CM
* Check from the command line "ps -ef | grep solr"

One you're satisfied that Solr is actually up and running test your
collection creation step. If it fails, check to see that Solr is still
running. I think you're just having some sort of stability problem with
Solr. You may need to increase the heap for Solr a little.

Nick

View solution in original post

25 REPLIES 25

avatar
Contributor

Did not work.

 

[centos@ip-172-31-81-167 ~]$ curl -i --retry 5 -s -L -k --negotiate -u : http://ip-172-31-82-140.ec2.internal:8983/solr
curl: option --negotiate: the installed libcurl version doesn't support this
curl: try 'curl --help' or 'curl --manual' for more information

avatar
Thats your problem, you are using a version of curl that doesn't support kerberos

you should see something like this for the curl --version command:
[root@nightly515-1 ~]# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.21 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

It needs to support "GSS-Negotiate". It's likely you installed a custom version of curl, or updated to a version that doesn't support it.

-pd

avatar
Contributor

I am not using Kerberos on this cluster, it is a CDH 5.15 install.

avatar
The issue is not whether kerberos is used, rather that the curl command expects it to be there (since it is there by default with the standard OS distribution of curl). Since it is not there, then the curl command fails, thus the solrctl script fails.

If you run the following, what is your result:
curl --version

If you are running redhat, can you also do:
which curl
yum whatprovides curl

And provide the output?

-pd

avatar
Master Guru

@AKB,

 

solrctl will use the --negotiate option regardless of whether the cluster enabled.  It will only be useful if kerberos is enabled in the cluster, though.

 

The problem is that your OS's version of curl does not support the "--negotiate" option which means, as Patrick said, that you have a non-standard version of curl or curl libraries installed on that host.

 

You can find out from where the files originate something like this:

 

# which curl

# rpm -qf `which curl`

# curl -V

 

Basically, you need to install a version of curl that leverages --negotiate on the host where you are running solrctl.

avatar
Expert Contributor

Problem is due to python version you have in your node.

 

incompatibility between the Python 3 version and the Python 2 version. The default Solr commands use the python2 version, so here we need to remove the Python global environment variables, not the python3 global environment variables.

 

 

Thanks & Regards,

J.Ganesh Kumar.