前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >springboot第63集:Netty,docker,elasticsearch,kibana一文让你走出微服务迷雾架构周刊...

springboot第63集:Netty,docker,elasticsearch,kibana一文让你走出微服务迷雾架构周刊...

作者头像
达达前端
发布2024-03-07 09:02:01
1470
发布2024-03-07 09:02:01
举报
文章被收录于专栏:达达前端
3db9ef0c8f2786f7fb13955d17affe75.png
3db9ef0c8f2786f7fb13955d17affe75.png
8f2ead4354840d8bced5ba40d23bacfd.png
8f2ead4354840d8bced5ba40d23bacfd.png
55c75ae5b6a82e4c82619d3c9a9ef359.png
55c75ae5b6a82e4c82619d3c9a9ef359.png
cd17a04cabf5ac0fad35c4a744f1b300.png
cd17a04cabf5ac0fad35c4a744f1b300.png
99daa5e4e60e43fcce94b4cb21e7278f.png
99daa5e4e60e43fcce94b4cb21e7278f.png
8f03f165f1f8386dd679d9e856fd0546.png
8f03f165f1f8386dd679d9e856fd0546.png
2a70ef431e459dd3dba3d4ea1c09699c.png
2a70ef431e459dd3dba3d4ea1c09699c.png
e5140a3d75ff95a32ce360790cfbd920.png
e5140a3d75ff95a32ce360790cfbd920.png
d23307ee02a8396dd20444f9534ee0a7.png
d23307ee02a8396dd20444f9534ee0a7.png
8c7de2c6cf952bc24873a5349c1e6280.png
8c7de2c6cf952bc24873a5349c1e6280.png
8da882c87801c3d38b1a5c484b41cd4b.png
8da882c87801c3d38b1a5c484b41cd4b.png
08d6dddd1f56f71ce93afad2e965147e.png
08d6dddd1f56f71ce93afad2e965147e.png
cadefdff01752007ab00cefc74b6b663.png
cadefdff01752007ab00cefc74b6b663.png
520944be37ebb162ed1def1b8d48d9bd.png
520944be37ebb162ed1def1b8d48d9bd.png
19d55b525e4934ce25aec1186a7e53cd.png
19d55b525e4934ce25aec1186a7e53cd.png
1171c9f0355d98743df4fefda00e23f6.png
1171c9f0355d98743df4fefda00e23f6.png
d289122a271dbc3de7af91cb108e77e1.png
d289122a271dbc3de7af91cb108e77e1.png
1cf18b3280b9907beebdd8ea7a8ba964.png
1cf18b3280b9907beebdd8ea7a8ba964.png
e6b920fc3527ab9324cd88d9610c5746.png
e6b920fc3527ab9324cd88d9610c5746.png
de94de4b48f2bff2dd44a2d67a39a516.png
de94de4b48f2bff2dd44a2d67a39a516.png
fbb24a6ff536a74fa68e18247f3120ba.png
fbb24a6ff536a74fa68e18247f3120ba.png
72f9cf3678c3a266621fa1a9bd027172.png
72f9cf3678c3a266621fa1a9bd027172.png
c3ccebed2b67358215be296b63580d96.png
c3ccebed2b67358215be296b63580d96.png
63427ef978202b1a9ae86a34f69c8347.png
63427ef978202b1a9ae86a34f69c8347.png
a9fd77f6f47dea6cdd697cb2c87cd6ce.png
a9fd77f6f47dea6cdd697cb2c87cd6ce.png
a455de19651f24df06e695a5113b3033.png
a455de19651f24df06e695a5113b3033.png
e4bea72d04fa91923cd8958d1fe52c89.png
e4bea72d04fa91923cd8958d1fe52c89.png
1db5c6eb4506056b016cc884650b57f9.png
1db5c6eb4506056b016cc884650b57f9.png
78c1a16176ceaafad75adf40fac93494.png
78c1a16176ceaafad75adf40fac93494.png
561f50f15502fa871233e9e3c3f86c65.png
561f50f15502fa871233e9e3c3f86c65.png
bdeea3619363935789367edaa5e7b9c4.png
bdeea3619363935789367edaa5e7b9c4.png
ca63596dca6ed1e71fd8c48670e05043.png
ca63596dca6ed1e71fd8c48670e05043.png
190c68e98ffabf9b8dccc04587ef6413.png
190c68e98ffabf9b8dccc04587ef6413.png
d322395c62ce39390ae93ebe4e975944.png
d322395c62ce39390ae93ebe4e975944.png
efe8db81428c0d441a3342fdd39748aa.png
efe8db81428c0d441a3342fdd39748aa.png
61a68f5564bfd26cb94c793585004718.png
61a68f5564bfd26cb94c793585004718.png
cfd626ddfdbc18569eb30a265bcb8f34.png
cfd626ddfdbc18569eb30a265bcb8f34.png
2716688a9f42af50334f29f913e8d891.png
2716688a9f42af50334f29f913e8d891.png
ae73132bea07a0114fdd89e99d61357c.png
ae73132bea07a0114fdd89e99d61357c.png
a79aaf572ddebbf760ac3e4bf14f40a2.png
a79aaf572ddebbf760ac3e4bf14f40a2.png
06b7851fd9dd445b7d4bf34400421548.png
06b7851fd9dd445b7d4bf34400421548.png
066bc136a571e2520681295a365c6abc.png
066bc136a571e2520681295a365c6abc.png
45ad20ad8eb43a2f72f151f8ac5f8cfb.png
45ad20ad8eb43a2f72f151f8ac5f8cfb.png
a6e942f3d6a87bdea0df126092a85dc2.png
a6e942f3d6a87bdea0df126092a85dc2.png
6b97243097b5833cb71f5137707fa166.png
6b97243097b5833cb71f5137707fa166.png
94358d111f1a82aa1877acef0637486a.png
94358d111f1a82aa1877acef0637486a.png
7d6fd3a3ab0de9e9728a4e29d2987f78.png
7d6fd3a3ab0de9e9728a4e29d2987f78.png
946a2385603774bf65fe6ce896742cb5.png
946a2385603774bf65fe6ce896742cb5.png
2a3115d5ab75a01a8b4eb2bd53bcca24.png
2a3115d5ab75a01a8b4eb2bd53bcca24.png
a94630b117afcf6f7039a9fe72467df9.png
a94630b117afcf6f7039a9fe72467df9.png
2b0b65008c5a0df7013b51d1e06508c7.png
2b0b65008c5a0df7013b51d1e06508c7.png
cab604950ee6c379fb9d6c42473acfdc.png
cab604950ee6c379fb9d6c42473acfdc.png
50ce67f1667b558a89fb52c64a5d6fc3.png
50ce67f1667b558a89fb52c64a5d6fc3.png
c48ccb4a7c4f2b5681b58f421751e4d5.png
c48ccb4a7c4f2b5681b58f421751e4d5.png
bfbcc4cdfa1bf072fc67e07087965d2a.png
bfbcc4cdfa1bf072fc67e07087965d2a.png
9960c43f52e883d1c640e1480a640929.png
9960c43f52e883d1c640e1480a640929.png
287a6dacd2a83f7862423c533b150135.png
287a6dacd2a83f7862423c533b150135.png

image.png

1278397d3b4dd58d10395533ac69458c.png
1278397d3b4dd58d10395533ac69458c.png
9343860473bbf3b2266619ea01955501.png
9343860473bbf3b2266619ea01955501.png
代码语言:javascript
复制
docker pull elasticsearch:7.17.1
docker pull kibana:7.17.1
docker run -d --name elasticsearch  -p 9200:9200 -p 9300:9300 -e  "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms256m -Xmx256m" elasticsearch:7.17.1

docker pull elasticsearch:7.17.1
docker pull kibana:7.17.1
docker run -d --name elasticsearch  -p 9200:9200 -p 9300:9300 -e  "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms3g -Xmx3g" elasticsearch:7.17.1

docker ps

CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS                                            NAMES

3d668e6cae1d   elasticsearch:7.17.1   "/bin/tini -- /usr/l…"   46 seconds ago   Up 44 seconds   0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   elasticsearch

mkdir -p /data/elasticsearch/{config,data,logs,plugins}
mkdir -p ./data/elasticsearch/{config,data,logs,plugins}
yml

docker cp elasticsearch:/usr/share/elasticsearch/config /data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/logs /data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/data /data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/plugins /data/elasticsearch

docker cp elasticsearch:/usr/share/elasticsearch/config /Users/jeskson/data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/logs /Users/jeskson/data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/data /Users/jeskson/data/elasticsearch
docker cp elasticsearch:/usr/share/elasticsearch/plugins /Users/jeskson/data/elasticsearch

vi ./data/elasticsearch/config/elasticsearch.yml

cluster.name: "docker-cluster"
network.hosts:0.0.0.0
# 跨域
http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

docker stop elasticsearch
docker rm elasticsearch

docker run -d --name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms256m -Xmx256m" \
-v /data/elasticsearch/logs:/usr/share/elasticsearch/logs \
-v /data/elasticsearch/data:/usr/share/elasticsearch/data \
-v /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /data/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
elasticsearch:7.17.1

docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -v ./data/elasticsearch/logs:/usr/share/elasticsearch/logs -v ./data/elasticsearch/data:/usr/share/elasticsearch/data -v ./data/elasticsearch/plugins:/usr/share/elasticsearch/plugins -v ./data/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml elasticsearch:7.17.1


docker run -d --name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms256m -Xmx256m" \
-v /Users/jeskson/data/elasticsearch/logs:/usr/share/elasticsearch/logs \
-v /Users/jeskson/data/elasticsearch/data:/usr/share/elasticsearch/data \
-v /Users/jeskson/data/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /Users/jeskson/data/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
elasticsearch:7.17.1

docker run -d --name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms1g -Xmx1g" \
-v /Users/jeskson/data/elasticsearch/logs:/usr/share/elasticsearch/logs \
-v /Users/jeskson/data/elasticsearch/data:/usr/share/elasticsearch/data \
-v /Users/jeskson/data/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /Users/jeskson/data/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
elasticsearch:7.17.1
7adb89c576ab3eb3cca3222ecb623dc2.png
7adb89c576ab3eb3cca3222ecb623dc2.png
2ea8aea8946442d168acf20049b1829a.png
2ea8aea8946442d168acf20049b1829a.png
代码语言:javascript
复制
docker run -d --name kibana -p 5601:5601 kibana:7.17.1

mkdir -p /data/kibana/config
docker cp kibana:/usr/share/kibana/config /data/kibana/

mkdir -p ./data/kibana/config
docker cp kibana:/usr/share/kibana/config /Users/jeskson/data/kibana/

vim /data/kibana/config/kibana.yml

  
# # ** THIS IS AN AUTO-GENERATED FILE ** # # Default Kibana configuration for docker target server.host: "0" server.shutdownTimeout: "5s" elasticsearch.hosts: [ "http://localhost:9100" ] # 记得修改ip monitoring.ui.container.elasticsearch.enabled: true i18n.locale: "zh-CN"

docker stop kibana 
docker rm kibana

docker run -d --name kibana -p 5601:5601 -v /Users/jeskson/data/kibana/config:/usr/share/kibana/config kibana:7.17.1

访问kibana发现需要token 进入es容器获取token

docker exec -it {elastic_search_container_id} /bin/bash bin/elasticsearch-create-enrollment-token --scope kibana

docker exec -it elasticsearch /bin/bash

elasticsearch-setup-passwords auto

找到你的 Elasticsearch 配置文件(通常位于 /etc/elasticsearch/elasticsearch.yml),然后确保以下配置被正确设置:

xpack.security.enabled: true

重新启动 Elasticsearch:保存修改后,重新启动 Elasticsearch 服务以使配置生效。你可以使用以下命令重启 Elasticsearch:

systemctl restart elasticsearch

curl -XGET "http://localhost:9200/_security/_authenticate?pretty"

root@bd8e7cc3d03e:/usr/share/elasticsearch/bin# elasticsearch-setup-passwords auto Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user. The passwords will be randomly generated and printed to the console. Please confirm that you would like to continue [y/N]y

3ecd8a12cddb4caea1afb5dadc083f3e.png
3ecd8a12cddb4caea1afb5dadc083f3e.png

在本地就能看到拷贝出来的kibana.yml文件

vim /data/kibana/config/kibana.yml

修改配置为

代码语言:javascript
复制
# ** THIS IS AN AUTO-GENERATED FILE **
#
 
# Default Kibana configuration for docker target
server.host: "0"
server.shutdownTimeout: "5s"
elasticsearch.hosts: [ "http://localhost:9100" ] # 记得修改ip
monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: "zh-CN"
elasticsearch.username: elastic
elasticsearch.password: ""

停掉旧的

docker stop kibana

docker rm kibana

重新启动挂载了地址的新的容器

docker run -d --name kibana -p 5601:5601 -v /Users/jeskson/data/kibana/config:/usr/share/kibana/config kibana:7.17.1

b79061d35132421e7e71ca9d88149c03.png
b79061d35132421e7e71ca9d88149c03.png
ec612d52a6b34ab0662de6bb2b41fb3d.png
ec612d52a6b34ab0662de6bb2b41fb3d.png
6210dd39aa54248239a2fee307cdfe7a.png
6210dd39aa54248239a2fee307cdfe7a.png
39df601ebf9105e63ba68bfd2763dac4.png
39df601ebf9105e63ba68bfd2763dac4.png
代码语言:javascript
复制
**Closed.**  This question is [not about programming or software development](https://stackoverflow.com/help/closed-questions). It is not currently accepting answers.  
闭。这个问题与编程或软件开发无关。它目前不接受答案。

* * *

This question does not appear to be about [a specific programming problem, a software algorithm, or software tools primarily used by programmers](https://stackoverflow.com/help/on-topic). If you believe the question would be on-topic on [another Stack Exchange site](https://stackexchange.com/sites), you can leave a comment to explain where the question may be able to be answered.  
这个问题似乎不是关于特定的编程问题、软件算法或程序员主要使用的软件工具。如果您认为该问题将在另一个 Stack Exchange 站点上成为主题,您可以发表评论以解释在哪里可以回答该问题。

Closed 10 months ago. 10个月前关闭。

[Improve this question  
改进此问题](https://stackoverflow.com/posts/58011088/edit)

I have just installed Kibana 7.3 on RHEL 8. The Kibana service is active (running).  
我刚刚在 RHEL 7.3 上安装了 Kibana 8。Kibana 服务处于活动状态(正在运行)。  
I receive `Kibana server is not ready yet` message when i curl to [http://localhost:5601](http://localhost:5601/). My Elasticsearch instance is on another server and it is responding with succes to my requests. I have updated the kibana.yml with that  
当我卷曲到 http://localhost:5601 时,我会收到 `Kibana server is not ready yet` 消息。我的 Elasticsearch 实例位于另一台服务器上,它正在响应我的请求并成功响应。我已经更新了kibana.yml

> elasticsearch.hosts:["[http://EXTERNAL-IP-ADDRESS-OF-ES:9200](http://external-ip-address-of-es:9200/)"]  
> elasticsearch.hosts:[“http://EXTERNAL-IP-ADDRESS-OF-ES:9200”]

image.png

2863424795d1b42441491f422da3b66b.png
2863424795d1b42441491f422da3b66b.png
d333b16cd72c6190cd5d9522a5ec93e3.png
d333b16cd72c6190cd5d9522a5ec93e3.png

http://127.0.0.1:9100/?auth_user=elastic&auth_password=

http://localhost:5601/app/home

代码语言:javascript
复制
docker run -d \
--name=elasticsearch-head \
-p 9100:9100 \
mobz/elasticsearch-head:5-alpine

docker run -d --name=elasticsearch-head -p 9100:9100 mobz/elasticsearch-head:5-alpine
ab70f7f9c13853e4e0bfb6e8a80e839d.png
ab70f7f9c13853e4e0bfb6e8a80e839d.png

磁盘使用率超过洪水水位,索引有只读允许删除块];;

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-03-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
Elasticsearch Service
腾讯云 Elasticsearch Service(ES)是云端全托管海量数据检索分析服务,拥有高性能自研内核,集成X-Pack。ES 支持通过自治索引、存算分离、集群巡检等特性轻松管理集群,也支持免运维、自动弹性、按需使用的 Serverless 模式。使用 ES 您可以高效构建信息检索、日志分析、运维监控等服务,它独特的向量检索还可助您构建基于语义、图像的AI深度应用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档