ERROR: Elasticsearch exited unexpectedly, Docker elasticsearch kibana

9 篇文章 0 订阅
8 篇文章 0 订阅

elasticsearch dokcer 镜像下载地址

https://www.docker.elastic.co/r/elasticsearch?limit=50&offset=400&show_snapshots=false

docker network create elastic
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.3.2

这里在运行的时候设置ES的java_opts , discovery.type=single-node 单点模式
docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -e "discovery.type=single-node" --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -t docker.elastic.co/elasticsearch/elasticsearch:8.3.2

...

----------------------------------------------------------------------------------------------------------------------------
-> Elasticsearch security features have been automatically configured!
-> Authentication is enabled and cluster connections are encrypted.

->  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
  SvuY++qbLxwj*c+U_5Gm

->  HTTP CA certificate SHA-256 fingerprint:
  8f160e2f8a672896f0d7fa819b15281018f8771d704f80d949e49159dbce0741

->  Configure Kibana to use this cluster:
* Run Kibana and click the configuration link in the terminal when Kibana starts.
* Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjMuMiIsImFkciI6WyIxNzIuMjUuMC4yOjkyMDAiXSwiZmdyIjoiOGYxNjBlMmY4YTY3Mjg5NmYwZDdmYTgxOWIxNTI4MTAxOGY4NzcxZDcwNGY4MGQ5NDllNDkxNTlkYmNlMDc0MSIsImtleSI6ImVOOE8zWUVCclRGNndwTlhoYXNXOlZVV0xLMzJyUWQ2SnpFS2dWWW8zMFEifQ==

-> Configure other nodes to join this cluster:
* Copy the following enrollment token and start new Elasticsearch nodes with `bin/elasticsearch --enrollment-token <token>` (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjMuMiIsImFkciI6WyIxNzIuMjUuMC4yOjkyMDAiXSwiZmdyIjoiOGYxNjBlMmY4YTY3Mjg5NmYwZDdmYTgxOWIxNTI4MTAxOGY4NzcxZDcwNGY4MGQ5NDllNDkxNTlkYmNlMDc0MSIsImtleSI6ImV0OE8zWUVCclRGNndwTlhoYXRvOkV3WXpWZWxmU2hpYjlXOUlucmxnVUEifQ==

  If you're running in Docker, copy the enrollment token and run:
  `docker run -e "ENROLLMENT_TOKEN=<token>" docker.elastic.co/elasticsearch/elasticsearch:8.3.2`
----------------------------------------------------------------------------------------------------------------------------

...

https://ip:9200, 后输入 用户: elastic 密码:SvuY++qbLxwj*c+U_5Gm (上面打印出的)

{
“name” : “376cbb59a1ba”,
“cluster_name” : “docker-cluster”,
“cluster_uuid” : “OEf4xN4QRZWMgS_lGWaNSQ”,
“version” : {
“number” : “8.3.2”,
“build_type” : “docker”,
“build_hash” : “8b0b1f23fbebecc3c88e4464319dea8989f374fd”,
“build_date” : “2022-07-06T15:15:15.901688194Z”,
“build_snapshot” : false,
“lucene_version” : “9.2.0”,
“minimum_wire_compatibility_version” : “7.17.0”,
“minimum_index_compatibility_version” : “7.0.0”
},
“tagline” : “You Know, for Search”
}

运行kibana

docker run --link YOUR_ELASTICSEARCH_CONTAINER_NAME_OR_ID:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:{version}

docker run --name kib-01 --link es-node01:elasticsearch --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.3.2

root@lsJdqPY6je:~# docker run --rm -p 8080:8080 -itd --name mem-tomcat8.5.20 register.me.ltd/tomcat:8.5.20 
24dcfd9debe231cfbacc0337153b14260ba98559e2c4d813d3d3b74b28dcd9b8
root@lsJdqPY6je:~# docker run --name kib-01 --link es-node01:elasticsearch --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.3.2
[2022-07-08T09:12:33.062+00:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" is disabled.
[2022-07-08T09:12:33.214+00:00][INFO ][http.server.Preboot] http server running at http://0.0.0.0:5601
[2022-07-08T09:12:33.260+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
[2022-07-08T09:12:33.262+00:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection configuration…
[2022-07-08T09:12:33.298+00:00][INFO ][root] Holding setup until preboot stage is completed.


i Kibana has not been configured.

Go to http://0.0.0.0:5601/?code=564214 to get started.


  • code 用于kibana 登录验证 如下图

在这里插入图片描述

Your verification code is: 564 214

  • 如果在Configure Elastic的过程中enrollment-token 过期(30min) 使用如下命令重新生成

docker exec -it es-node01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

root@lsJdqPY6je:~# docker exec -it es-node01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
eyJ2ZXIiOiI4LjMuMiIsImFkciI6WyIxNzIuMjUuMC4yOjkyMDAiXSwiZmdyIjoiNzliYTQyYjc3Yzc2YjIxZWNiNmNlMjZkYzIwNTBkZTFhNTQ1ZTliYjY0ODVlNmYyYzU1M2Y1YzYyMDBhNWRkMCIsImtleSI6ImNTQm0zSUVCdEtmaEF1cEZvbTI2Oldxb3RZX3BOUVdTakhIUVVaR2hGcncifQ==
root@lsJdqPY6je:~# 

在这里插入图片描述
可以用用户名elastic 密码SvuY++qbLxwj*c+U_5Gm 进行登录,elastic的用户名和密码elasticsearch启动的时候控制台有打印。

-> Password for the elastic user (reset with bin/elasticsearch-reset-password -u elastic):
SvuY++qbLxwj*c+U_5Gm

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanghaoyuan.sh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值