springboot第63集:Netty,docker,elasticsearch,kibana一文让你走出微...

共 11294字,需浏览 23分钟

 ·

2024-04-11 06:50

26ca6f3b34e518f4adc44cca241d383d.webpimage.png 55dbbd72651e73823b5d1fafcb8e57ac.webpimage.png 928a7068dfdbf3bf4ad5f4f34bc007f8.webpimage.png eb950f6bb206e23afd60524becd33d71.webpimage.png 89e281ad4f9f588532ac509613503db5.webpimage.png 6dd5b9b683a6ec6d5389509db67af759.webpimage.png 772cd7b7cfd024b32b59dd9e3ab350d2.webpimage.png 664d8c855b63d6a5fdd2e46cad751119.webpimage.png feac34832e348aec00c7bad11a736816.webpimage.png 8886f68b4d375e84409c7a15cc3e63d0.webpimage.png 756741fb32c3d27c05749110024fa73a.webpimage.png f2d6f9bdbaa1124908cb32b855dc8515.webpimage.png f44b399c045bab5b33958b6e876d3244.webpimage.png 3fbe7fc1bd0b03281e56ef1a0f3c270e.webpimage.png 887417e92d32ef694b478f927d333e97.webpimage.png 6d61bf03fc3a11c0d77707d52739bded.webpimage.png a875b4e8ed793ac954204db2d209ce11.webpimage.png c186f344322f3f39dc160e94ff116cbf.webpimage.png 8fc7f36b68953608f5f22259d31571b5.webpimage.png 4999f7d2be90ca97759b5e92e867c74c.webpimage.png 3bac868be8cb3c0a17b651ed495b913a.webpimage.png 3aeb7b38c841aca2b9ac907cc05d86c9.webpimage.png 7cce0e3957a7469ce7a5f26dce8a4f7d.webpimage.png 896d1bbea1210fa71f1c7a65c068208a.webpimage.png 48ea0f0a861562530f6c6c0713e62569.webpimage.png 081bcd78056ba0c667b11c356788f720.webpimage.png 3e6beb9b235a435c81953b31c6b55846.webpimage.png a8a54a1317896fc7f27651849114ded3.webpimage.png 5f92517a7e5082e7ef4545244ad0bf05.webpimage.png ff9aa39e44f82cc4afde4d8bfd61b9fe.webpimage.png ff2c4f2735a631d0a8bdc3869544cf5c.webpimage.png eead04d21eb1ede1d570718fa94bbb0f.webpimage.png f2682137654b4ac4afd7465e7892a1d7.webpimage.png d12111103077821307230d17ff4953ce.webpimage.png 7c0536c958d29327a639d9e32ed1e6dd.webpimage.png 13b5f09d009ec306e894ccb92762d8bb.webpimage.png da47b5f3da50e5c976ec7d5c4721bf4e.webpimage.png 9e094b807c1bea96ff01258a759d141e.webpimage.png a29ddb6e7ae5f6174c74e62dcaa87074.webpimage.png 9adbb94e43dca546e5ddac920fd5d88c.webpimage.png 6141d8fc9d9f91b5e370ae9c99b6fb1c.webpimage.png 811cb2c5c14e5cbf3a8d877ae712d40a.webpimage.png 4be7009d323191bd789399370c834305.webpimage.png 1bdfd7a7144bfdd074664251064439a2.webpimage.png 1ac0a0869d4ebad8b1bb3532b7e8f5d2.webpimage.png 2b37414171c7a6510dbf6b745848901a.webpimage.png 4df4f2fec3c089c2f27e7bdaac693c0f.webpimage.png 4db9e2f85c1a9f555cc0b307aef56277.webpimage.png f014e86a596abff5a80977e1349e1726.webpimage.png b14ead6d2975246def3d354a85914659.webpimage.png e31f6db9138bf0d6dd380fb8dd793d30.webpimage.png 6c9ee35b88010247e1b7c5d9f2cee11f.webpimage.png c83cb3c15d3def60a95794ba79195586.webpimage.png 96446f8098acc97c931521def4645a3b.webpimage.png 0832c3f890b2ec14fb1086662347f4be.webpimage.png c98b78811ceee5d15cb5f8fd76c44bfd.webpimage.pngimage.pngimage.pngimage.png
      
      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
image.pngimage.png
      
      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

image.png

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

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"
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

image.pngimage.pngimage.pngimage.pngimage.pngimage.pngimage.png
      
      **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.pngimage.pngimage.pngimage.pngimage.png

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

http://localhost:5601/app/home

      
      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
image.png

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

加群联系作者vx:xiaoda0423

仓库地址:https://github.com/webVueBlog/JavaGuideInterview

浏览 14
点赞
评论
收藏
分享

手机扫一扫分享

分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

分享
举报