无法访问Kibana公共IP站点

时间:2017-09-11 23:23:19

标签: elasticsearch kibana gcloud google-compute-engine

无法通过谷歌计算引擎获得Kibana的公共IP。如果我将elasticsearch.ymllocalhost更改为0.0.0.0

,则表示无法访问该网站,但Elasticsearch通过公共IP工作

关闭nginx以测试Kibana。

运行:Ubuntu 16.04,Elasticsearch 5.6.0,Kibana 5.6.0

port 5601 Kibana firewall screenshot

允许使用防火墙

kibana.yml文件包含以下内容:

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.url: "http://localhost:9200"
elasticsearch.ssl.verificationMode: none

运行netstat -natp | grep 5601,我得到:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:5601            0.0.0.0:*               LISTEN      -  

运行sudo netstat -tupln会返回:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1916/sshd           
tcp        0      0 0.0.0.0:5601            0.0.0.0:*               LISTEN      10615/node          
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      1447/systemd-resolv 
tcp6       0      0 127.0.0.1:9300          :::*                    LISTEN      8490/java           
tcp6       0      0 :::22                   :::*                    LISTEN      1916/sshd           
tcp6       0      0 :::5355                 :::*                    LISTEN      1447/systemd-resolv 
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      8490/java           
udp        0      0 127.0.0.53:53           0.0.0.0:*                           1447/systemd-resolv 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1156/dhclient       
udp        0      0 10.128.0.100:123        0.0.0.0:*                           1702/ntpd           
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1702/ntpd           
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1702/ntpd           
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           1447/systemd-resolv 
udp6       0      0 fe80::4001:aff:fe80:123 :::*                                1702/ntpd           
udp6       0      0 ::1:123                 :::*                                1702/ntpd           
udp6       0      0 :::123                  :::*                                1702/ntpd           
udp6       0      0 :::5355                 :::*                                1447/systemd-resolv 

curl -i localhost:5601返回:

HTTP/1.1 200 OK
kbn-name: kibana
kbn-version: 5.6.0
cache-control: no-cache
content-type: text/html; charset=utf-8
content-length: 217
accept-ranges: bytes
Date: Mon, 11 Sep 2017 23:27:38 GMT
Connection: keep-alive
<script>var hashRoute = '/app/kibana';
var defaultRoute = '/app/kibana';
var hash = window.location.hash;
if (hash.length) {
  window.location = hashRoute + hash;
} else {
  window.location = defaultRoute;

sudo systemctl status kibana表示kibana服务处于活动状态且正在运行

似乎端口5601无法在Google Compute Engine中的任何实例上运行,我们将非常感谢任何想法。

1 个答案:

答案 0 :(得分:0)

为端口5601制定新的单独防火墙规则解决了这个问题!感谢大家的投入