docker-elk: Discovery not working in swarm when fresh install of 19.03.5

Problem description

Configuring elasticsearch in swarm mode as wiki says results in discovery issue when installing docker 19.03.5 on Debian Buster from scratch.

Installing 19.03.3 and run stack works Then upgrade to 19.03.5, works too.

(did it 10 times)

Extra information

# Install docker
apt update && apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

19.03.5

apt update && apt-get install docker-ce docker-ce-cli containerd.io -y

19.03.3

apt update && apt-get install docker-ce=5:19.03.3~3-0~debian-buster docker-ce-cli=5:19.03.3~3-0~debian-buster containerd.io -y
# Swarm init
docker swarm init

# Sysctl config
sysctl vm.max_map_count=262144

# Project clone and run stack
git clone https://github.com/eoli3n/docker-elk
cd docker-elk
docker stack deploy -c docker-stack.yml elk
docker service logs elk_elasticsearch -f

Stack configuration

Here diff i applied to configure docker-elk https://github.com/deviantony/docker-elk/compare/master…eoli3n:master

Docker logs

19.03.5 fresh

docker service logs elk_elasticsearch

19.03.3 fresh

docker service logs elk_elasticsearch curl -D- ‘http://127.0.0.1:30000/_cluster/health?pretty’ -u elastic:changeme

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18

Most upvoted comments

Changing to network.publish_host: _eth0_ is a better working fix than recreate ingress network.

牛逼,I just follow your conversation, then solved this problem, thanks for sharing!

Here’s a workaround Just after initializing the swarm

docker network rm ingress
docker network create --driver overlay --ingress --subnet=10.255.0.0/16 ingress