[英]How to connect my Kibana to ElasticSearch in the docker run command?
Just trying to learn to setup Kibana and Elastic search using native docker command (ie not using Docker-Compose).只是想学习使用本机 docker 命令(即不使用 Docker-Compose)设置 Kibana 和 Elastic 搜索。
Below are the commands I run以下是我运行的命令
docker network create es-net
docker run -d --name es-cluster \
--net es-net -p 9200:9200 \
-e "xpack.security.enabled=false" \
-e "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch:7.2.0
docker run -d --net es-net -p 5601:5601 \
-e ELASTICSEARCH_URL=http://es-cluster:9200 \
docker.elastic.co/kibana/kibana:7.2.0
Somehow Kibana is not loading the elastic search up when I run http://localhost:5601/
and always with the message Kibana server is not ready yet
当我运行
http://localhost:5601/
时,Kibana 没有加载弹性搜索,并且总是显示Kibana server is not ready yet
消息
I follow the answer as per Kibana on Docker cannot connect to Elasticsearch , to ensure the ELASTICSEARCH_URL
is correctly set, but it is still not coming up.我按照Kibana on Docker cannot connect to Elasticsearch的答案,以确保正确设置了
ELASTICSEARCH_URL
,但它仍然没有出现。 Anything I miss?有什么我想念的吗?
note: tested with curl 0.0.0.0:9200
, the elastic search is already running注意:用
curl 0.0.0.0:9200
测试,弹性搜索已经在运行
Looks like since I'm in version 7.2.0 of Kibana, it has changed from ELASTICSEARCH_URL
to ELASTICSEARCH_HOSTS
看起来因为我在 Kibana 的 7.2.0 版中,它已经从
ELASTICSEARCH_URL
更改为ELASTICSEARCH_HOSTS
as per https://www.elastic.co/guide/en/kibana/current/docker.html根据https://www.elastic.co/guide/en/kibana/current/docker.html
docker run -d --net es-net -p 5601:5601 \
-e ELASTICSEARCH_HOSTS=http://es-cluster:9200 \
docker.elastic.co/kibana/kibana:7.2.0
With this in place, all should work then.有了这个,一切都应该工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.