Hello,
I am trying to run elasticsearch node on 1 server using docker compose and then another node on different server.
My docker-compose file:
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
container_name: es01
environment:
- node.name=es01
- network.host=0.0.0.0
- network.publish_host=serv1_ip
- discovery.seed_hosts=serv2_ip
- cluster.initial_master_nodes=serv1_ip,serv2_ip
- cluster.name=docker-cluster
- cluster.routing.allocation.enable=all
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata01:/usr/share/elasticsearch/data
networks:
- esnet
volumes:
esdata01:
driver: local
esdata02:
driver: local
networks:
esnet:
Of course the second node on server2 is not running yet, but I'd at least expect this one to start correctly and then I would run similar docker-compose file on another server. Instead that's what I've got:
es01 | {"type": "server", "timestamp": "2019-08-08T11:43:36,744+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "es01", "message": "starting ..." }
es01 | {"type": "server", "timestamp": "2019-08-08T11:43:37,165+0000", "level": "INFO", "component": "o.e.t.TransportService", "cluster.name": "docker-cluster", "node.name": "es01", "message": "publish_address {serv1_ip:9300}, bound_addresses {0.0.0.0:9300}" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:43:37,180+0000", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "docker-cluster", "node.name": "es01", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:43:47,223+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "docker-cluster", "node.name": "es01", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [serv1_ip, serv2_ip] to bootstrap a cluster: have discovered [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [serv2_ip:9300] from hosts providers and [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:43:57,226+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "docker-cluster", "node.name": "es01", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [serv1_ip, serv2_ip] to bootstrap a cluster: have discovered [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [serv2_ip:9300] from hosts providers and [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:44:07,230+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "docker-cluster", "node.name": "es01", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [serv1_ip, serv2_ip] to bootstrap a cluster: have discovered [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [serv2_ip:9300] from hosts providers and [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:44:07,260+0000", "level": "WARN", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "es01", "message": "timed out while waiting for initial discovery state - timeout: 30s" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:44:07,276+0000", "level": "INFO", "component": "o.e.h.AbstractHttpServerTransport", "cluster.name": "docker-cluster", "node.name": "es01", "message": "publish_address {serv1_ip:9200}, bound_addresses {0.0.0.0:9200}" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:44:07,277+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "es01", "message": "started" }
es01 | {"type": "server", "timestamp": "2019-08-08T11:44:17,233+0000", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "docker-cluster", "node.name": "es01", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [serv1_ip, serv2_ip] to bootstrap a cluster: have discovered [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [serv2_ip:9300] from hosts providers and [{es01}{o7AceWa6SJ2H_-ZIT8CEmA}{bo1s5P9JSb-MW12tWcGRZw}{serv1_ip}{serv1_ip:9300}{dim}{ml.machine_memory=3973648384, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
Does anyone know what seems to be a problem?