2
votes

On my RHEL server, I have created keyspace keyspace1 and table table1 in Cassandra and also configured SOLR successfully. Now I want to create a SOLR core so I write:

curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=keyspace1.table1&generateResources=true"

But I am getting the error

Curl: (7) couldn't connect to host

Help appreciated !!

1
Your curl command looks correct. Please verify that Cassandra&Solr are both up and running. If you are using DSE Search, verify that the node was started correctly in the search mode (see docs.datastax.com/en/datastax_enterprise/4.8/…) for further details. - nastra
yes I am able to do other operations like create table on cassandra as well as opened the SOLR link, which works perfectly. - Hitesh
Can you make your system log available? Also make sure that really something is running on port 8983 using e.g. netstat -nat |grep 8983 - nastra
Go to whatever browser you had solr UI on 8983 responding, paste the link you were feeding to curl, adjust to ip or localhost accordingly and it should work. - Bereng
Agree with Bereng, if it works from the browser with an IP use an IP from curl and it will work as well. - phact

1 Answers

1
votes

I was able to solve it by adding the below line to /etc/hosts

`server private ip` localhost localhost.localdomain