docker 集群名称中的 elasticsearch 相同但不是集群

elasticsearch in docker cluster name is same but not clustering

$ curl localhost:9200/_cat/health?v

epoch 时间戳集群状态 node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1469016273 12:04:33 jh-簇绿色 1 1 0 0 0 0 0 0 - 100.0%

$ curl localhost:9201/_cat/health?v

epoch 时间戳集群状态 node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1469016277 12:04:37 jh-簇绿色 1 1 0 0 0 0 0 0 - 100.0%

不知道为什么会这样。节点的配置文件相同,

粘贴你的弹性配置,顺便说一句,这是我在本地的集群配置(1 master-for-write 1 slave-for-read):

主节点:

cluster.name: musement
network.bind_host: 0.0.0.0
transport.tcp.port: 9301
http.port: 9201

node.master: true
node.data: false
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.timeout: 3s
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["pippo.int:9300"]

从节点:

cluster.name: musement
network.bind_host: 0.0.0.0
transport.tcp.port: 9300
http.port: 9200
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.timeout: 3s
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["pippo.int:9301"]

其中pippo.int是我电脑的eth0