先上一張圖
FATAL Error: listen EADDRNOTAVAIL 123.57.251.57:5601
配置文件我是這樣配置的:node
[root@head-kib ~]# cd /usr/local/kibana-6.5.4-linux-x86_64/config/ [root@head-kib config]# vim kibana.yml server.port: 5601 server.host: "123.57.251.57" elasticsearch.url: "http://192.168.246.234:9200" #ES節點 kibana.index: ".kibana"
由於用的是雲虛擬機,因此這裏的123.57.251.57是外網ip,咱們應該用內網ip才行。
可是若是寫localhost的話,雖然不會報錯,5601端口也是正常啓動,可是你訪問5601端口會被拒絕。linux
[root@head-kib kibana-6.5.4-linux-x86_64]# netstat -nlp | grep 5601 #5601端口正常 tcp 0 0 127.0.0.1:5601 0.0.0.0:* LISTEN 11188/./bin/../node [root@head-kib kibana-6.5.4-linux-x86_64]# curl -i http://123.57.251.57:5601 curl: (7) Failed connect to 123.57.251.57:5601; 拒絕鏈接
把ip改成0.0.0.0就能順利訪問到了。
shell
必須先殺掉佔用5601的進程才能重啓,要否則會報錯,說5601端口被佔用 [root@head-kib kibana-6.5.4-linux-x86_64]# netstat -nlp | grep 5601 tcp 0 0 127.0.0.1:5601 0.0.0.0:* LISTEN 11188/./bin/../node [root@head-kib kibana-6.5.4-linux-x86_64]# kill -9 11188 #殺掉 [root@head-kib kibana-6.5.4-linux-x86_64]# netstat -nlp | grep 5601 [3]+ 已殺死 nohup ./bin/kibana [root@head-kib kibana-6.5.4-linux-x86_64]# nohup ./bin/kibana & [3] 26192 [root@head-kib kibana-6.5.4-linux-x86_64]# nohup: 忽略輸入並把輸出追加到"nohup.out" [root@head-kib kibana-6.5.4-linux-x86_64]# tail -f nohup.out {"type":"log","@timestamp":"2020-04-01T04:41:25Z","tags": ["status","plugin:spaces@6.5.4","info"],"pid":26192,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
日誌沒報錯,再訪問頁面就出來了。
vim
大家的評論和點贊是我寫文章的最大動力,蟹蟹。curl