【发布时间】:2020-09-16 16:46:35
【问题描述】:
我正在尝试使用 t2.medium 实例在 docker 容器中运行 elasticsearch 7.7,并通过了this SO 问题和official ES docs on installing ES using docker,但即使在给出discovery.type: single-node 之后,它也没有绕过几篇文章中提到的引导检查。
我的elasticsearch.yml 文件
cluster.name: scanner
node.name: node-1
network.host: 0.0.0.0
discovery.type: single-node
cluster.initial_master_nodes: node-1 // tried explicitly giving this but no luck
xpack.security.enabled: true
我的Dockerfile
FROM docker.elastic.co/elasticsearch/elasticsearch:7.7.0
COPY elasticsearch.yml /usr/share/elasticsearch/elasticsearch.yml
USER root
RUN chmod go-w /usr/share/elasticsearch/elasticsearch.yml
RUN chown root:elasticsearch /usr/share/elasticsearch/elasticsearch.yml
USER elasticsearch
这就是我构建和运行图像的方式。
docker build -t es:latest .
docker run --ulimit nofile=65535:65535 -p 9200:9200 es:latest
及相关错误日志
75", "message": "绑定或发布到非环回地址, 执行引导检查”} 错误:1 引导检查失败 1: 默认发现设置不适合生产使用;在 [discovery.seed_hosts、discovery.seed_providers、 cluster.initial_master_nodes] 必须配置错误:Elasticsearch 没有正常退出 - 检查日志 /usr/share/elasticsearch/logs/docker-cluster.log
【问题讨论】:
-
如果我需要提供任何其他信息,请告诉我?
-
尝试将 transport.host: localhost 添加到 elasticsearch.yml 文件。取自github.com/elastic/elasticsearch/issues/…
-
@AbhishekJebaraj 感谢尝试但没有用
标签: amazon-web-services docker elasticsearch