Replies: 2 comments 8 replies
-
For what it's worth, I also experienced this issue. I went in and deleted the environment, and manually created a new one within Portainer. I just went to environments, clicked add, and I gave it the same name (primary). I also gave it a URL of socket-proxy:2375. Once I did this, it cleared my error. Hopefully it works for you, too. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. I already have Portainer installed and about 30 containers in it. So I changed the yml file to use socket_proxy and manually added a new environment with the name primary (old was local) and URL socket-proxy:2375. When I open Portainer, I can see the new environment and the correct number of containers etc. and the status is up, but when I click on it, I get the error "Failed load environment. Unable to connect to the Docker environment." :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have my stack up and running using your guide. I did not implement socket-proxy from the start so I am going back to do that now. Using your t2 yaml file (not the blog) for a guide, I set up the socket_proxy network and the socket proxy container. Once that I was up, I edited the compose entries for Traefik and Portainer. Both recreated just fine. Traefik worked as expected. I kept getting an error message when I opened Portainer saying that environments could not be retrieved and when Portainer came up, my stack was "down". I checked the log and this is what I found:
"Instance already has defined environments. Skipping the environment defined via CLI."
I undid my Portainer compose (set it back to what it was without the proxy entries). I checked the environments in Portainer and the Environment URL is locked as "/var/run/docker.sock". The docker-compose file does not seem to be able to edit it. If I enter my socket-proxy IP into the "Public IP" field, and click update, all of my containers still show up.
Does that mean that socket-proxy is setup properly, and just that Portainer cannot be updated via CLI to use it?
I do have a second environment using Agent that I set up directly in Portainer. Is that maybe what caused the failure to update?
Beta Was this translation helpful? Give feedback.
All reactions