Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing up on Docker Swarm doesn't work #1246

Closed
mcowart123 opened this issue Dec 19, 2022 · 2 comments
Closed

Bringing up on Docker Swarm doesn't work #1246

mcowart123 opened this issue Dec 19, 2022 · 2 comments

Comments

@mcowart123
Copy link

mcowart123 commented Dec 19, 2022

Describe the bug
When trying to bring up a simple cluster (1 server/1 agent) on our production docker swarm cluster the agent can never connect to the server; it even tries connecting to the wrong IP address. Doing the exact same thing on our standalone test box (minus the deploy restrictions in the compose file) works flawlessly. I even added a placement restriction for the swam to force them to the same node and it doesn't work.

To Reproduce
Production swarm stack file:

`
version: '3.8'

services:
dkron-server:
image: centricdocker.azurecr.io/thirdparty/dkron
ports:
- "10120:8080"
volumes:
- /var/apps/docker-shared/shared-dkron/root:/root
- /media/scripts:/media/scripts
- /var/apps/docker-shared/shared-dkron/dkron-server/data:/data
command: dkron agent --server --log-level=debug --bootstrap-expect=1 --data-dir=/data --node-name dkron-primary
stop_grace_period: 3m
deploy:
replicas: 1
placement:
constraints:
- node.labels.dkron==allowed

dkron-agent:
image: centricdocker.azurecr.io/thirdparty/dkron
depends_on:
- dkron-server
volumes:
- /var/apps/docker-shared/shared-dkron/root:/root
- /media/scripts:/media/scripts
command: dkron agent --retry-join=dkron-server:8946 --log-level=debug --tag agent=true
stop_grace_period: 3m
deploy:
replicas: 1
placement:
constraints:
- node.labels.dkron==allowed
`
Does not work.

Standalone server stack file:
`
version: '3.8'

services:
dkron-server:
image: centricdocker.azurecr.io/thirdparty/dkron
ports:
- "10120:8080"
volumes:
- /var/apps/docker-shared/shared-dkron/root:/root
- /media/scripts:/media/scripts
- /var/apps/docker-shared/shared-dkron/dkron-server/data:/data
command: dkron agent --server --log-level=debug --bootstrap-expect=1 --data-dir=/data --node-name dkron-primary
stop_grace_period: 3m

dkron-agent:
image: centricdocker.azurecr.io/thirdparty/dkron
depends_on:
- dkron-server
volumes:
- /var/apps/docker-shared/shared-dkron/root:/root
- /media/scripts:/media/scripts
command: dkron agent --retry-join=dkron-server:8946 --log-level=debug --tag agent=true
stop_grace_period: 3m
`
This works perfectly.

Expected behavior
The swarm should work and the agent should try to connect to the correct internal IP of 10.0.61.9, but it is trying to connect to 10.0.61.2 instead. The server/web-ui is up.

Screenshots
web-ui
stack_layout
server_container_ip
server_container_logs
agent_container_logs

** Specifications:**

  • OS: Linux
  • VersionLatest
@kennykarnama
Copy link

kennykarnama commented Mar 30, 2023

I think it is related to this issue: moby/moby#41766

@vcastellm
Copy link
Member

Long time since I used docker swarm, but not sure if this is a Dkron error, I guess it should be related to swarm, so closing this at this time.

Feel free to reopen in case it's related to Dkron.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants