前言
安装完elasticsearch后,以为这个随便安装一下就好了,想不到还是有很多坑。
下载及安装
- https://www.elastic.co/downloads/kibana
- iptables -I INPUT -p tcp --dport 5601 -j ACCEPT [开放端口]
诡异的事情与坑
[root@elastic kibana-6.2.4-linux-x86_64]# bin/kibana
log [08:59:08.017] [info][status][plugin:kibana@6.2.4] Status changed from uninitialized to green - Ready
log [08:59:08.059] [info][status][plugin:elasticsearch@6.2.4] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [08:59:08.070] [info][status][plugin:console@6.2.4] Status changed from uninitialized to green - Ready
log [08:59:08.075] [info][status][plugin:metrics@6.2.4] Status changed from uninitialized to green - Ready
log [08:59:08.217] [info][status][plugin:timelion@6.2.4] Status changed from uninitialized to green - Ready
log [08:59:08.237] [fatal] Port 5601 is already in use. Another instance of Kibana may be running!
FATAL Port 5601 is already in use. Another instance of Kibana may be running!
安装完无法正常启动提示端口占用,查询占用端口的程序,并不存在。
[root@elastic kibana-6.2.4-linux-x86_64]# ps -aux | grep 5601
root 6283 0.0 0.0 112660 964 pts/4 S+ 17:03 0:00 grep --color=auto 5601
[root@elastic kibana-6.2.4-linux-x86_64]#
换个命令
netstat -nltp
[root@elastic kibana-6.2.4-linux-x86_64]# netstat -nltp
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:9200 0.0.0.0:* LISTEN 4628/java
tcp 0 0 0.0.0.0:9300 0.0.0.0:* LISTEN 4628/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1144/sshd
tcp 1 0 127.0.0.1:5601 0.0.0.0:* LISTEN 5912/bin/../node/bi
[root@elastic kibana-6.2.4-linux-x86_64]# kill -9 9512
再次启动成功了,外网无法访问
[root@elastic ~]# curl http://localhost:5601
<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;
}</script>
开放外网
[root@elastic config]# vi kibana.yml
server.host: "0.0.0.0"
重启搞定。
总结
其实只是kibana默认后台运行,起来不知道怎么关,,安装还是很简单的。
网友评论