作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试通过 AZURE 虚拟机中的 docker-compose 在 Elasticsearch opendistro 中运行 Kibana opendistro 当我运行 docker-compose 时,我可以在浏览器上访问 kibana:http://myipadress:5601/app/kibana但我不能用于 ElasticSearch。
我的 docker-compose :
version: '3'
services:
odfe-node1:
image: amazon/opendistro-for-elasticsearch:1.7.0
container_name: odfe-node1
environment:
- cluster.name=odfe-cluster
- node.name=odfe-node1
- discovery.seed_hosts=odfe-node1
- cluster.initial_master_nodes=odfe-node1
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the Elasticsearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- odfe-elasticdata:/usr/share/elasticsearch/data
- odfe-elasticconfig:/usr/share/elasticsearch/config
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- odfe-net
kibana:
image: amazon/opendistro-for-elasticsearch-kibana:1.7.0
container_name: odfe-kibana
ports:
- 5601:5601
expose:
- "5601"
volumes:
- odfe-kibanaconfig:/usr/share/kibana/config
environment:
ELASTICSEARCH_URL: https://odfe-node1:9200
ELASTICSEARCH_HOSTS: https://odfe-node1:9200
networks:
- odfe-net
volumes:
odfe-elasticdata:
odfe-elasticconfig:
odfe-kibanaconfig:
networks:
odfe-net:
错误信息:
odfe-kibana | {"type":"log","@timestamp":"2020-05-28T18:23:11Z","tags":["error","elasticsearch","admin"],"pid":1,"message":"Request error, retrying\nGET https://odfe-node1:9200/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip => connect ECONNREFUSED 172.22.0.3:9200"}
odfe-kibana | {"type":"log","@timestamp":"2020-05-28T18:32:24Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: https://odfe-node1:9200/"}
odfe-kibana | {"type":"log","@timestamp":"2020-05-28T18:32:24Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
odfe-kibana | {"type":"log","@timestamp":"2020-05-28T18:32:24Z","tags":["error","elasticsearch-service"],"pid":1,"message":"Unable to retrieve version information from Elasticsearch nodes."}
如果我执行 docker ps 和 curl 测试,它会给我以下信息:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
41ded49c03e5 amazon/opendistro-for-elasticsearch:1.7.0 "/usr/local/bin/dock…" 48 minutes ago Up 2 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9600->9600/tcp, 9300/tcp odfe-node1
84bed086ab5c amazon/opendistro-for-elasticsearch-kibana:1.7.0 "/usr/local/bin/kiba…" 48 minutes ago Up 2 seconds 0.0.0.0:5601->5601/tcp odfe-kibana
-------------------------------
[root@ServerEFK _data]# curl -XGET https://localhost:9200 -u admin:admin --insecure
{
"name" : "odfe-node1",
"cluster_name" : "odfe-cluster",
"cluster_uuid" : "Ax2q2FrEQgCQHKZoDT7C0Q",
"version" : {
"number" : "7.6.1",
"build_flavor" : "oss",
"build_type" : "tar",
"build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
"build_date" : "2020-02-29T00:15:25.529771Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
--------------------------------------
[root@ServerEFK _data]# curl -XGET https://localhost:9200/_cat/nodes?v -u admin:admin --insecure
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.22.0.3 22 72 4 0.16 0.81 0.86 dim * odfe-node1
--------------------------------------
[root@ServerEFK _data]# curl -XGET https://localhost:9200/_cat/plugins?v -u admin:admin --insecure
name component version
odfe-node1 opendistro-anomaly-detection 1.7.0.0
odfe-node1 opendistro-job-scheduler 1.7.0.0
odfe-node1 opendistro-knn 1.7.0.0
odfe-node1 opendistro_alerting 1.7.0.0
odfe-node1 opendistro_index_management 1.7.0.0
odfe-node1 opendistro_performance_analyzer 1.7.0.0
odfe-node1 opendistro_security 1.7.0.0
odfe-node1 opendistro_sql 1.7.0.0
---------------------------------------
[root@ServerEFK _data]# curl -XGET https://localhost:9200/_cat/indices?pretty -u admin:admin --insecure
yellow open security-auditlog-2020.05.28 6xPW0yPyRGKG1owKbBl-Gw 1 1 18 0 144.6kb 144.6kb
green open .kibana_92668751_admin_1 mgAiKHNKQJ-sgFDXw7Iwyw 1 0 1 0 3.7kb 3.7kb
green open .kibana_92668751_admin_2 VvRiV16jRlualCWJvyYFTA 1 0 1 0 3.7kb 3.7kb
green open .opendistro_security NHxbWWv0RJu8kScOtsejTw 1 0 7 0 36.3kb 36.3kb
green open .kibana_1 s2DBw7Y_SUS9Go-u5qOrjg 1 0 1 0 4.1kb 4.1kb
green open .tasks 0kVxFOcqQzOxyAYTGUIWDw 1 0 1 0 6.3kb 6.3kb
谁能帮忙
最佳答案
好的,我能够使用此 docker-compose.yml
获得单个节点 elastic 和 kibana:
version: '3'
services:
odfe-node1:
image: amazon/opendistro-for-elasticsearch:1.8.0
container_name: odfe-node1
environment:
- cluster.name=odfe-cluster
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the Elasticsearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- odfe-data1:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- odfe-net
kibana:
image: amazon/opendistro-for-elasticsearch-kibana:1.8.0
container_name: odfe-kibana
ports:
- 5601:5601
expose:
- "5601"
environment:
ELASTICSEARCH_URL: https://odfe-node1:9200
ELASTICSEARCH_HOSTS: https://odfe-node1:9200
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
networks:
- odfe-net
volumes:
odfe-data1:
networks:
odfe-net:
我从这个 yaml file 开始& 将弹性环境变量更改为:
- cluster.name=odfe-cluster
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
我还覆盖了 kibana.yml
文件:
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
用这个:
server.name: kibana
server.host: "0"
elasticsearch.hosts: https://odfe-node1:9200
elasticsearch.ssl.verificationMode: none
elasticsearch.username: admin
elasticsearch.password: admin
elasticsearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opendistro_security.multitenancy.enabled: true
opendistro_security.multitenancy.tenants.preferred: ["Private", "Global"]
opendistro_security.readonly_mode.roles: ["kibana_read_only"]
newsfeed.enabled: false
telemetry.optIn: false
telemetry.enabled: false
我提取默认的 kibana.yml
并更改:
elasticsearch.hosts: https://odfe-node1:9200
elasticsearch.username: admin
elasticsearch.password: admin
但是文档中的 2 节点示例对我仍然不起作用。
希望对你有帮助
关于docker - kibana opendistro 无法连接到 Docker 上的 ElasticSearch open distro 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62072910/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!