问题遇到的现象和发生背景
使用 docker 在 mac 中安装 es 集群
遇到的现象和发生背景,请写出第一个错误信息
用代码块功能插入代码,请勿粘贴截图。 不用代码块回答率下降 50%
node2节点出现
{"type": "server", "timestamp": "2022-12-29T09:45:46,742+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "elasticsearch-cluster", "node.name": "es-node2", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [es-node1] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9303] from hosts providers and [{es-node2}{Xe_kGfwwRaCWf1WDoTPdtw}{xxa6ahWHTXGhO6prYnlERg}{127.0.0.1}{127.0.0.1:9302}{ml.machine_memory=4125892608, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
运行结果及详细报错内容
我的解答思路和尝试过的方法,不写自己思路的,回答率下降 60%
我gogle 和 百度搜索了很多的答案,都不可以。容器间采用的同一个 network
单机命令如下
docker run -e ES_JAVA_OPTS="-Xms340m -Xmx340m" --network estestnet -d -p 9201:9201 -p 9301:9301 -v /Users/v_liuxiaojian/Desktop/project/esCluster/es1/es1.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /Users/v_liuxiaojian/Desktop/project/esCluster/es1/data1:/usr/share/elasticsearch/data --name es1 b0e9f9f047e6