gpt4 book ai didi

从主机 curl VM 中的 Elasticsearch 实例

转载 作者:行者123 更新时间:2023-12-04 19:44:40 25 4
gpt4 key购买 nike

所以我在虚拟机中安装了 CentOs,然后 Elasticsearch ,我将它的网络设置为网桥。
Elasticsearch 1.7.3 当然正在运行。
我可以毫无问题地通过 SSH 连接它,但是 curl 无法正常工作

curl '163.113.183.229:9200/_cat/indices?v'
curl: (7) couldn't connect to host
我可以看什么来确定问题?
谢谢
编辑
CentOs 7 阻塞了我打开的 80 端口,但没有改变:
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

最佳答案

Elasticsearch 2.0 及更高版本默认只回答来自 localhost 的请求。

要从其他机器连接,请编辑 elasticsearch.yml并添加:

network.host: ["_local_", "_non_loopback_"]

关于从主机 curl VM 中的 Elasticsearch 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35871602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com