无法使用URL在AWS EC2实例上访问Kibana

发布于 2025-02-06 13:29:37 字数 658 浏览 4 评论 0原文

我在EC2实例上安装了ElasticSeasrch和Kibana,我可以在此url http:// public-ip/9200上访问Elasticsearch。但是我无法使用http:// public-ip/5601访问基巴纳。

我已经配置了kibana.yml并添加了某些字段。

server.port: 5601
server.host: 0.0.0.0
elasticsearch.url: 0.0.0.0:9200

WGET http:// localhost:5601我要低于输出:

--2022-06-10 11:23:37--  http://localhost:5601/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:5601... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83731 (82K) [text/html]
 Saving to: ‘index.html’

我在做什么错?

I have Elasticseasrch and Kibana installed on EC2 instance where I am able to access Elasticsearch using on this url http://public-ip/9200. But I am unable to access Kibana using http://public-ip/5601.

I have configured kibana.yml and added certain fields.

server.port: 5601
server.host: 0.0.0.0
elasticsearch.url: 0.0.0.0:9200

On doing wget http://localhost:5601 I am getting below output:

--2022-06-10 11:23:37--  http://localhost:5601/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:5601... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83731 (82K) [text/html]
 Saving to: ‘index.html’

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温柔少女心 2025-02-13 13:29:37

服务器主机将设置为0.0.0.0表示应该从Localhost外部访问,但请仔细检查听众实际上使用nettat -netstat -nltpu在该端口上侦听外部连接。该服务器在端口9200上的公共IP上也可以访问,因此请尝试以下内容:

  • EC2 Security Group应从IP地址从该端口5601上入口TCP流量。
  • 网络ACL应允许端口5601上的入站/出站TCP流量。OS
  • 防火墙(例如ufwfirewalld)应允许该端口上的流量。您可以运行iptables -L -NXV检查防火墙规则。
  • 尝试在同一VPC中从其他EC2实例连接到该端口。您使用的Internet连接可能会在该端口上具有防火墙阻止连接。这在公司防火墙上很常见。
  • 如果这些失败,接下来,您要检查数据包是否到达了您的EC2实例,以便可以使用tcpdump -ni在该端口上运行数据包捕获-NI端口5601并检查您是否有任何数据包/在该端口上。
  • 如果您在tcpdump上看不到任何数据包,请使用 vpc Flow日志查看数据包是否进出该端口。

Server Host set to 0.0.0.0 means it should be accessible from outside localhost but double check that the listener is actually listening for external connections on that port using netstat -nltpu. The server is also accessible on it's public IP on port 9200 so try the following:

  • EC2 Security Group should inbound TCP traffic on that port 5601 from your IP address.
  • Network ACLs should allow inbound/outbound TCP traffic on port 5601.
  • OS firewall ( e.g. ufw or firewalld ) should allow traffic on that port. You can run iptables -L -nxv to check the firewall rules.
  • Try connecting to that port from a different EC2 instance in the same VPC. It is possible that what ever internet connection you are using may have a firewall blocking connections on that port. This is common with corporate firewalls.
  • If these fail, next you want to check if the packets are reaching your EC2 instance so you can run a packet capture on that port using tcpdump -ni any port 5601 and check if you have any packets coming in/out on that port.
  • if you don't see any packets on tcpdump, use VPC Flow Logs to see if packets are coming in/out that port.
○愚か者の日 2025-02-13 13:29:37

考虑到Kibana端口(5601)是通过安全组打开的,

我可以通过更新config server.host:localhost server.host:0.0.0.0.0来解决问题。
elasticsearch.hosts:[“ http:// localhost:9200”](在我的情况下,kibana和es都在同一台机器上运行)in Kibana.yml

https://discuss.elastic.co/tasty.co/t/kibana-co/t/kibana-nostic URL-GIVE-CONNECTION填充乘式机场/122067/8

Considering the kibana port (5601 ) is open via security groups

I could able to resolve the issue by updating config server.host:localhost to server.host:0.0.0.0
and elasticsearch.hosts: ["http://localhost:9200"] (in my case kibana and ES both are running on the same machine) in kibana.yml

https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/8

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文