连接Kibana报错:Kibana server is not ready yet
问题描述
浏览器连接Kibana时报错
Kibana server is not ready yet
查看Kibana日志
{"type":"log","@timestamp":"2021-11-29T02:45:50Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://120.79.137.87:9200/"}
原因
检查Kibana容器启动的配置是否与下面一致
docker run --name kibana \
-e ELASTICSEARCH_HOSTS=http://120.79.137.87:9200/ \
-p 5601:5601 \
-d kibana:7.6.2
如不一致,停止该容器后删除,重新再新建一个新的Kibana容器
之后启动Kibana后又报错
查看日志
{"type":"log","@timestamp":"2021-11-29T02:53:35Z","tags":["warning","savedobjects-service"],"pid":7,"message":"Another Kibana instance appears to be migrating the index. Waiting for that migration to complete. If no other Kibana instance is attempting migrations, you can get past this message by deleting index .kibana_1 and restarting Kibana."}
解决方案
停止Kibana服务,然后再从ElasticSearch中删除一下四个索引
curl -XDELETE http://IP地址:9200/.kibana
curl -XDELETE http://IP地址:9200/.kibana*
curl -XDELETE http://IP地址:9200/.kibana_2
curl -XDELETE http://IP地址:9200/.kibana_1