Kibana Docker "This may take a few minutes" 但从未启动
Kibana Docker "This may take a few minutes" but never boots
我正在尝试 运行 Elasticsearch 和 Kibana Docker。我在虚拟机(Ubuntu 服务器)上安装了 docker,并且使用了 docker-compose.yml、elasticsearch.yml 和 kibana.yml如此处所述:
现在它首先开始启动额外的插件 (head_540),它可以在 http://ip_of_my_vm:9100
上访问,但 Elasticsearch 和 kibana 都不能。当我试图到达 http://ip_of_my_vm:5601` 时,Kibana 给了我一个 "Too many redirects" 错误。我发现它试图将我重定向到登录页面,可能的原因是 X-Pack 随图像一起交付并自动启用(但看起来不应该如此,因为我无法打开url 的)。所以我尝试通过编辑 elasticsearch.yml:
来禁用它
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
和kibana.yml:
server.name: kibana
server.host: "0"
xpack.security.enabled: false
xpack.reporting.enabled: false
xpack.monitoring.enabled: false
elasticsearch.url: http://elasticsearch:9200
# elasticsearch.username: "elastic"
# elasticsearch.password: "changeme"
xpack.monitoring.ui.container.elasticsearch.enabled: false
现在我可以通过 docker-compose up
启动 composer 时访问 Elasticsearch,但是 kibana 卡住了:
kibana_540 | {"type":"log","@timestamp":"2018-04-27T10:56:26Z","tags":["info","optimize"],"pid":1,"message":"Optimizing and caching bundles for graph, ml, kibana, timelion and status_page. This may take a few minutes"}
现在,除了像
这样的所有错误
elasticsearch_540 | [2018-04-27T10:58:12,100][ERROR][o.e.x.m.e.l.LocalExporter] failed to get monitoring watch [h7x_x5GCTjqL2wadFDSM8w_logstash_version_mismatch]
elasticsearch_540 | java.lang.IllegalStateException: watch store not started
似乎 Elasticsearch 确实在工作,因为我可以在 http://ip_of_my_vm:9200
到达 url 但我的 kibana 和额外的插件都没有。
谁能帮我解决这个问题?
我是这方面的新手,但我在 运行 前几次成功了。
您要 docker 化 ELK Stack 吗?
因为您似乎没有在这里谈论 logstash 服务,而且您遇到的错误是关于 "logstash_version_mismatch".
能否向我们提供您的 docker-compose.yml 以使其更清楚? :)
所以看来优化捆绑包花了很长时间,因为我今天早上检查了服务器,一切似乎都正常。由于 Kibana 中的内部服务器错误,我不得不重新启动 docker,但现在一切正常。这些是我的 YAML 文件。顺便说一句,我禁用了 x-pack,因为我不使用它,而且我从一开始就遇到了 x-pack 的一些问题:
docker-compose.yml
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
container_name: elasticsearch_540
environment:
- http.host=0.0.0.0
- transport.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
volumes:
- esdata:/usr/share/elasticsearch/data
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- 9200:9200
- 9300:9300
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 4g
cap_add:
- IPC_LOCK
kibana:
image: docker.elastic.co/kibana/kibana:5.4.0
container_name: kibana_540
environment:
- SERVER_HOST=0.0.0.0
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
headPlugin:
image: mobz/elasticsearch-head:5
container_name: head_540
ports:
- 9100:9100
volumes:
esdata:
driver: local
elasticsearch.yml
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.watcher.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
kibana.yml
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.reporting.enabled: false
xpack.watcher.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
就像我提到的,我从 获取了文件,但在 elasticsearch.yml 和 kibana.yml 中禁用了 x-pack 并且我增加了堆大小,因为它是 运行 几次内存不足。
编辑:
我在这里分享了我当前的集群配置:https://gist.github.com/ErikvdVen/8207e39b27472361378bd3909aa247ea
我正在尝试 运行 Elasticsearch 和 Kibana Docker。我在虚拟机(Ubuntu 服务器)上安装了 docker,并且使用了 docker-compose.yml、elasticsearch.yml 和 kibana.yml如此处所述:
现在它首先开始启动额外的插件 (head_540),它可以在 http://ip_of_my_vm:9100
上访问,但 Elasticsearch 和 kibana 都不能。当我试图到达 http://ip_of_my_vm:5601` 时,Kibana 给了我一个 "Too many redirects" 错误。我发现它试图将我重定向到登录页面,可能的原因是 X-Pack 随图像一起交付并自动启用(但看起来不应该如此,因为我无法打开url 的)。所以我尝试通过编辑 elasticsearch.yml:
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
和kibana.yml:
server.name: kibana
server.host: "0"
xpack.security.enabled: false
xpack.reporting.enabled: false
xpack.monitoring.enabled: false
elasticsearch.url: http://elasticsearch:9200
# elasticsearch.username: "elastic"
# elasticsearch.password: "changeme"
xpack.monitoring.ui.container.elasticsearch.enabled: false
现在我可以通过 docker-compose up
启动 composer 时访问 Elasticsearch,但是 kibana 卡住了:
kibana_540 | {"type":"log","@timestamp":"2018-04-27T10:56:26Z","tags":["info","optimize"],"pid":1,"message":"Optimizing and caching bundles for graph, ml, kibana, timelion and status_page. This may take a few minutes"}
现在,除了像
这样的所有错误elasticsearch_540 | [2018-04-27T10:58:12,100][ERROR][o.e.x.m.e.l.LocalExporter] failed to get monitoring watch [h7x_x5GCTjqL2wadFDSM8w_logstash_version_mismatch]
elasticsearch_540 | java.lang.IllegalStateException: watch store not started
似乎 Elasticsearch 确实在工作,因为我可以在 http://ip_of_my_vm:9200
到达 url 但我的 kibana 和额外的插件都没有。
谁能帮我解决这个问题?
我是这方面的新手,但我在 运行 前几次成功了。 您要 docker 化 ELK Stack 吗? 因为您似乎没有在这里谈论 logstash 服务,而且您遇到的错误是关于 "logstash_version_mismatch".
能否向我们提供您的 docker-compose.yml 以使其更清楚? :)
所以看来优化捆绑包花了很长时间,因为我今天早上检查了服务器,一切似乎都正常。由于 Kibana 中的内部服务器错误,我不得不重新启动 docker,但现在一切正常。这些是我的 YAML 文件。顺便说一句,我禁用了 x-pack,因为我不使用它,而且我从一开始就遇到了 x-pack 的一些问题:
docker-compose.yml
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
container_name: elasticsearch_540
environment:
- http.host=0.0.0.0
- transport.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
volumes:
- esdata:/usr/share/elasticsearch/data
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- 9200:9200
- 9300:9300
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 4g
cap_add:
- IPC_LOCK
kibana:
image: docker.elastic.co/kibana/kibana:5.4.0
container_name: kibana_540
environment:
- SERVER_HOST=0.0.0.0
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
headPlugin:
image: mobz/elasticsearch-head:5
container_name: head_540
ports:
- 9100:9100
volumes:
esdata:
driver: local
elasticsearch.yml
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.watcher.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
kibana.yml
cluster.name: "chimeo-docker-cluster"
node.name: "chimeo-docker-single-node"
network.host: 0.0.0.0
xpack.security.enabled: false
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.reporting.enabled: false
xpack.watcher.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "Authorization"
就像我提到的,我从
编辑:
我在这里分享了我当前的集群配置:https://gist.github.com/ErikvdVen/8207e39b27472361378bd3909aa247ea