Open ha1o0 opened 2 years ago
@weifengsmile
Looks like tasks.agent
is not being resolved. Most likely to be an issue with Swarm Overlay networking. Do you have the necessary FW ports open between the servers? Is docker DNS working?
FW Port details:
https://www.digitalocean.com/community/tutorials/how-to-configure-the-linux-firewall-for-docker-swarm-on-ubuntu-16-04
Check Swarm Networking:
https://gist.github.com/alexellis/8e15f2ea1af7281268ec7274686985ba
@weifengsmile Looks like
tasks.agent
is not being resolved. Most likely to be an issue with Swarm Overlay networking. Do you have the necessary FW ports open between the servers? Is docker DNS working? FW Port details: https://www.digitalocean.com/community/tutorials/how-to-configure-the-linux-firewall-for-docker-swarm-on-ubuntu-16-04 Check Swarm Networking: https://gist.github.com/alexellis/8e15f2ea1af7281268ec7274686985ba
Thanks for your reply.
1.The Firewall (ufw and iptables) has been closed.
So how can i do to solve the tasks.agent problem?
Have you done any of these tests listed here.. https://gist.github.com/alexellis/8e15f2ea1af7281268ec7274686985ba#file-redis-md How many nodes do you have in your cluster? Where are the nodes hosted? Which Hypervisor or Public cloud?
There are two nodes in my cluster now, and linux node is swarm manager, the other worker node is run on a mac machine.
I have done some swarm test as the link. Here is the test result, i use docker swarm start two zookeeper and redis service on another worker node based on the network testnet
, but only the portainer service does not work. Do you have some ideas? @samdulam
and the portainer yml file is:
@weifengsmile
Are you able to ping anything from your redis or zookeeper containers?
Are they in the same network? From one of those container can you try ping / dig to tasks.<servicename>
Bug description exec
curl -L https://downloads.portainer.io/portainer-agent-stack.yml \ -o portainer-agent-stack.yml
anddocker stack deploy -c portainer-agent-stack.yml portainer
the docker service portainer_portainer and portainer_agent not working
Expected behavior portainer docker service work
Portainer Logs portainer_portainer.1.yfrl6p20s82r@OptiPlex-3020 | level=info msg="2021/12/31 02:51:04 failed initializing environment: Get \"https://tasks.agent:9001/_ping\": dial tcp: lookup tasks.agent on 127.0.0.11:53: read udp 127.0.0.1:56498->127.0.0.11:53: read: connection refused"
Steps to reproduce the issue: There is only one manage node in my docker swarm.
Technical details:
docker run -p 9443:9443 portainer/portainer
):docker stack deploy -c portainer-agent-stack.yml portainer
Additional context ufw and iptables are both closed. I can deploy the portainer as singlone service by
docker run -d -p 8000:8000 -p 9443:9443 --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ce:2.11.0
but it not work when i use docker swarm mode.