-
Notifications
You must be signed in to change notification settings - Fork 71
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
Portainer Agent: Unable to retrieve local agent IP address #161
Comments
Hi @kevdogg The agent must be part of an overlay network to work properly on a Swarm cluster. Have you tried to update the |
I have this same problem, I've got a feeling that it's to do with the fact that my server has a Wi-Fi connection and Ethernet connection both with different IP addresses, is there a way to get the agent to just bind to one of the IP addresses. eg: |
I don't think that's the issue. My homeserver has a (internal) static ip address (via ethernet, no Wi-Fi connection), however, my public IP address changes (but I'm using DynDNS, so this shouldn't be a problem).
That's possible via the -p/publish argument: https://docs.docker.com/config/containers/container-networking/ |
I am still getting this issue, I have tried many different version of the agent:
Any ideas? It's running on a bridge network, I have tried to change it over to an overlay network but it does not let me select any overlay networks from the drop-down box in the Portainer UI. |
nvm, this fixed it here: #95 (comment)
|
this isn't a solution for many of us who use docker swarm. |
With the merge of #239 this shouldn't be an issue anymore I believe. Give a try to |
Sorry @deviantony does this mean that in the next version of the portainer, this won't be a problem anymore. I'm using portainer 2.14.2 on both Desktop PC (with linux subsystem docker) and Synology Server. Have been trying to connect both to each other via using the agent, but it gives the following error log on the Desktop PC. Both dockers are not srawm enabled. They are stand alone dockers, and I'm purely trying to connect them via the agent which was the easiest way. Is there a solution to this yet? I even added network host option to agent, but that did not solve the issue too.
|
Any updates on this issue? |
Found a solution in the #95 (here), TL;DR: add the env var
|
Modifying the stack like this fixed both my issues(set your tag as needed):
|
@jsorondo’s solution of creating an overlay network for the agents to share with the portainer host is what fixed it for me. My environment is a portainer manager and two portainer agents, which were setup prior to creating the docker swarm. I’m betting that the issue is due to this. It’s also possible that reinstalling portainer on the swarm as a stack using the swarm install docs would fix this. |
Hi I'm running Agent version 2.0.0 on Arch linux host with Docker
I'm running docker in swarm mode, however I'm just connecting single instances (no replicas) over the swarm network:
The actual portainer installation is on a different Docker Daemon.
My docker compose file appears as the following (these are snippets):
I'm getting the following errors starting the portainer agent:
I've seen this error reported about 1 year ago (#95), however I didn't see what the actual solution was. Obviously if I use the TCP/Direct Route with OpenSSL self-signed client server certs -- I bypass the agent and don't get the error.
The text was updated successfully, but these errors were encountered: