卷曲:(7)无法连接到主机

Curl: (7) couldn't connect to host

在我的 RHEL 服务器上,我在 Cassandra 中创建了键空间 keyspace1 和 table table1,并且还成功配置了 SOLR。现在我想创建一个 SOLR 核心,所以我写:

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

但是我收到了错误

Curl: (7) couldn't connect to host

感谢帮助!!

我可以通过将以下行添加到 /etc/hosts

来解决它
`server private ip` localhost localhost.localdomain