Ec2上的弹性搜索不能打到公共IP(超时) [英] elasticsearch on Ec2 cannot hit public IP(timeout)
问题描述
我可以打到本地IP地址(例如curl -XGET localhost:9200)
我无法使用公共IP地址,无论是在同一台机器上还是从我们的网络,它总是超时,
IPtables允许
端口是打开的(对自己和私有网络)
弹性搜索http.cors已启用,并允许 *
除了Iptables,amazon安全配置,弹性搜索配置有什么可以忽略吗? (我们可以访问443并获得kibana,它只是弹性搜索ajax调用的时间,或者如果我尝试直接访问9200)
一直在为此工作一天,所以我谦虚地来找你们。
谢谢
我有完全相同的问题。
我设法解决如下:
-
我确保在elasticsearch.yml文件中设置以下内容:
a。 http.enabled:true
b。 http.cors.enabled:true
c。 http.cors.allow-origin:* -
重新启动的弹性搜索(service elasticsearch restart)
- Do what TJ said in his comment, + restart the instance. I wasn't sure if this was/is necessary, but I did it for good measure.
I made sure that the following is set in the elasticsearch.yml file: a. http.enabled: true b. http.cors.enabled: true c. http.cors.allow-origin: "*"
Restarted elasticsearch (service elasticsearch restart)
TJ 在他的评论中说,+重启实例。我不知道这是否是必要的,但我做的很好。
然后,当我尝试从公共IP访问弹性搜索时,它工作 - http:// [PUBLIC IP OF INSTANCE]:9200
希望这有帮助。
I have elasticsearch running on EC2,
I can hit form local IP address(ex. curl -XGET localhost:9200)
I cannot hit from public IP address, whether on the same machine, or from our network, it always times out,
IPtables are allowing
port is open(to itself as well as private network)
Elasticsearch http.cors is enabled and allows "*"
aside from Iptables, amazon security config, elasticsearch config could there be anything I am overlooking? (we can access 443 and get kibana up, it just times out on the elasticsearch ajax call or if I try to access 9200 directly)
been working on this for over a day so I humbly come to you all!
thank you
I had exactly the same issue.
I managed to solve it as follows:
Then when I tried to access elasticsearch from the public IP it worked - http://[PUBLIC IP OF INSTANCE]:9200
Hope this helps.
这篇关于Ec2上的弹性搜索不能打到公共IP(超时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!