Install Kibana with Docker
Posted Roc.Lee
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Install Kibana with Docker相关的知识,希望对你有一定的参考价值。
-
拉取镜像
docker pull docker.elastic.co/kibana/kibana:7.12.0
-
运行并添加容器后台运行,指定Elasticsearch地址为http://localhost:9200
docker run --name kib01 -d -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://localhost:9200" docker.elastic.co/kibana/kibana:7.12.0
-
设置连接Elasticsearch的用户名和密码
进入容器
docker exec -it kb01 /bin/bash
编辑配置文件
vi config/kibana.yml
添加内容
elasticsearch.username: kibana_system
elasticsearch.password: password123
- 重启容器
docker restart kib01
参考链接:
- [https://www.elastic.co/guide/en/kibana/7.12/docker.html](Install Kibana with Docker)
kibana页面报错:Config: Request failed with status code
前提:
kibana 6.2.4 升级 6.4.2 完成升级后首次打开kibana页面。
升级过程详见: http://blog.51cto.com/michaelkang/2298677
报错内容:
浏览器打开kibana页面后:
左上角提示:
Help us improve the Elastic Stack by providing basic feature usage statistics? We will never share this data outside of Elastic. Read more
点击 yes or no 报错如下:
Config: Request failed with status code: 503
详细报错内容:
Error: Request failed with status code: 503
at _callee$ (https://cnkbhbak.ptmind.com/bundles/commons.bundle.js:3:878828)
at tryCatch (https://cnkbhbak.ptmind.com/bundles/vendors.bundle.js:43:602785)
at Generator.invoke [as _invoke] (https://cnkbhbak.ptmind.com/bundles/vendors.bundle.js:43:606667)
at Generator.prototype.(anonymous function) [as next] (https://cnkbhbak.ptmind.com/bundles/vendors.bundle.js:43:603908)
at step (https://cnkbhbak.ptmind.com/bundles/commons.bundle.js:3:879600)
at https://cnkbhbak.ptmind.com/bundles/commons.bundle.js:3:879726
排查步骤:
打开浏览器工程模式查看浏览器返回错误信息:
{statusCode: 503, error: "Service Unavailable",
message: "Automatic index creation failed",…} 《== 核心报错内容
code: "ES_AUTO_CREATE_INDEX_ERROR"
error: "Service Unavailable"
message: "Automatic index creation failed"
statusCode: 503
以上报错信息基本可以确定是集群不能自动创建索引导致的,先临时打开试一下。
临时开启允许es集群允许创建索引
PUT _cluster/settings
{
"transient" :
{
"action.auto_create_index": "true"
}
}
然后点击 yes or no都将不会再报错 ! 问题解决。
以上是关于Install Kibana with Docker的主要内容,如果未能解决你的问题,请参考以下文章
kibana页面报错:Config: Request failed with status code
Kibana问题搜集---下载源码,执行npm install 报错
Manage Spring Boot Logs with Elasticsearch, Logstash and Kibana
Logging with ElasticSearch, Kibana, ASP.NET Core and Docker
kibana启动报错 Elasticsearch cluster did not respond with license information
ELK 错误: retrying failed action with response code: 403, kibana无log显示