-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Warning Messages in Portainer Logs Caused by docker.sock not Available in Docker Swarm Setting #8806
Comments
Thank you for the information. I am going to further investigate. I will update you as I learn more. Interim, Is this an upgrade or a brand new install? Thanks! |
I am able to reproduce the logging messages. Environment:
I am able to login. I am able to navigate Portainer without issue. I believe these may be OK to ignore for now. I am going to forward to the Product team for review. I will update you as I learn more. Thanks! |
Update: I have a brand new Portainer 2.17.1 install and am seeing the same messages:
Thanks! |
@tamarahenson Thank you for taking care of this!
I use that linux server and portainer since serveral months. So no new install in my case. Only updated the portainer version by executing "docker stack deploy" command from time to time.
Yes, I can confirm that there seem to be no other big issues or problems caused by this. Portainer seems to work normal.
I think the change was introduced by 5cbf523 in December 2022. According to GitHub that commit seems to appear in tag 2.17.0 first. So I guess that log message is there since 2.17.0 or so and I just did not notice it earlier. |
Seeing the same on both 2.17.1 and 2.18.1
|
Just migrated to Portainer |
Any workaround for this? |
The only workaround would be to downgrade. An internal issue has been logged to address. I do not yet have the timeline or release. I will update as I learn more. Thanks! |
I am facing to the some problem with my 2.18.2 new installation. To which version you recommend to downgrade to ? |
The last version that kept working for me was 2.17.0. |
Just a heads-up that this issue is still present in the newly released There are periodic error messages in the console logs:
This has the potential to fill up any logger system in place for Portainer, including the default Docker logger driver that does not rotate/limit logs by default. |
The warning comes periodically as well with 2.18.3 when using Docker Standalone > API with a Docker API URL as environment. |
Hi,
|
Hi and I am not very familiar with Go but I looked up the code and I think the issue is that a simple docker client is created here: In that case the DefaultDockerHost is used which is unix:///var/run/docker.sock. You can override that with the DOCKER_HOST environment variable but that does not work either because the simple client refers to the DefaultDockerHost. The warning occurs also each time the Info-Endpoint is called via REST which is quite often :) IMHO this should not be a warning. We use a docker socket proxy in between, so we don't mount the socket directly: Alternatively it would be nice to make that overridable. |
Hi, - OS Debian 12
In maneger: *docker logs d3e6e3d66e4d*
2023/09/01 05:33PM INF github.com/portainer/portainer/api/cmd/portainer/main.go:359 > encryption key file not present | filename=portainer
2023/09/01 05:33PM INF github.com/portainer/portainer/api/cmd/portainer/main.go:382 > proceeding without encryption key |
2023/09/01 05:33PM INF github.com/portainer/portainer/api/database/boltdb/db.go:125 > loading PortainerDB | filename=portainer.db
2023/09/01 05:33PM INF github.com/portainer/portainer/api/chisel/service.go:197 > Found Chisel private key file on disk | private-key=/data/chisel/private-key.pem
2023/09/01 17:33:49 server: Reverse tunnelling enabled
2023/09/01 17:33:49 server: Fingerprint OVNK17d/Zx8vtoYKk7oUDZf3QGvk0Y5rKqSwLh4suOc=
2023/09/01 17:33:49 server: Listening on http://0.0.0.0:8000
2023/09/01 05:33PM WRN github.com/portainer/portainer/api/platform/platform.go:70 > failed to retrieve docker info | error="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
2023/09/01 05:33PM INF github.com/portainer/portainer/api/cmd/portainer/main.go:634 > starting Portainer | build_number=34280 go_version=1.20.5 image_tag=linux-amd64-2.19.0 nodejs_version=18.17.1 version=2.19.0 webpack_version=5.88.1 yarn_version=1.22.19
2023/09/01 05:33PM INF github.com/portainer/portainer/api/http/server.go:356 > starting HTTPS server | bind_address=:9443
2023/09/01 05:33PM INF github.com/portainer/portainer/api/http/server.go:340 > starting HTTP server | bind_address=:9000
2023/09/01 05:38PM INF github.com/portainer/portainer/api/adminmonitor/admin_monitor.go:62 > the Portainer instance timed out for security purposes, to re-enable your Portainer instance, you will need to restart Portainer |
I was using portainer-ee:218.2 and did not realize any problem, but after upgrading to 2.19.1 2023/09/22 03:22PM WRN platform/platform.go:70 > failed to retrieve docker info | error="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?" I can't say it's harmless, sometimes the portainer is not showing the "stats" and "exec console" icons at container. not sure how to downgrade, if I just deploy the 2.18.2 it's not working, I see the stacks, but cant go into the stack (error was something like it can't read compose.yml file) 2 node docker swarm, Docker version 23.0.6 |
|
Hi there, everyone! I'm experiencing the same issue on version 2.19.3-alpine. Do you have any expectations on when it could be fixed?
I use Docker version 24.0.7
|
same issue on docker swarm use portainer-agent-stack.yml portainer_agent
portainer_portainer
portainer version docker version
|
Not sure if that's helpful and even the fix for the root cause but I came around the issue by adding into the offical portainer-agent-stack.yml yaml: Since then the warning disappered and I was able to connect properly to the portainer environement (before just an empty portainer had been presented) |
Any update on this? When i add, |
I'm seeing the same issue on version 2.19. 4 |
Thiss issue seems to be under the attention of the Portainer team since a while (Sep 2023), but somehow still unresolved? :( |
@jamescarppe @tamarahenson Is there any update on this issue or a time schedule regarding a fix? 🙂 |
in 1.20.5 I see the same issue after shutting down the docker and starting againe
|
I was looking for solution for quite some time, but since there isn't an actual solution or at least I wasn't able to find one, I decided to mount the docker.sock directly to portainer service with read-only access. This way Portainer isn't able to do anything that is not supposed to do to docker.sock and the errors are finally gone.
|
Same problem for me. It works fine with manager + 1 node. But when I add an other node, the UI become "unresponsive" on some pages and I start having some logs : If I remove the new node from the swarm, the problem disapear. Portainer : 2.19.4 |
Sorry for the double post but it may help other people. My problems were ultimately not linked to Portainer but to Docker Swarm, I identified it by observing communication problems on other docker services. |
same |
@jamescarppe Sadly, the recently released 2.20.0 version is still suffering from this issue. Even when using the standard officially documented installation method for Docker Swarm here: Portainer starts to spam the logs frequently (more than once per minute) as seen below:
The problem manifests when the Portainer server container does not have The problem is in the portainer/api/platform/platform.go Lines 39 to 82 in 61642b8
As it can be seen, this function tries to create a client to a Docker daemon unconditionally in line 59. I believe that instead, Portainer should check if I understand the Portainer team is already working on this ( We haven't been able to migrate from Portainer 2.14.x due to this (and another) issue. |
+1 |
+1 ...I got this problem (continual error in my logs) too. |
+1 |
2 similar comments
+1 |
+1 |
@Yanik39 Is right. It's not really resolving the issue. It's rather showing the swarm and local environment. But I actually found a fix for my setup. So it came down to an network issue that had to be fixed by switching off the eth offload-tx on the nic interface that serves the ingress network.
After reboot the ingress network was working properly and (surprise surprise) portainer was able to finally connect to the swarm agents even without docker.sock extension. Hope that helps, in case you have a similar setup ;-) |
Bug description
There are warning messages in the Portainer Container log.
Expected behavior
There should not be such a warning message in the Portainer Container log.
Portainer Logs
2023/04/18 01:07PM WRN platform/platform.go:68 > failed to retrieve docker info | error="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
Steps to reproduce the issue:
Technical details:
Additional information
The changes introduced by #8095 to
DetermineContainerPlatform
inapi/platform/platform.go
(https://github.com/portainer/portainer/pull/8095/files#diff-1de261cf96cf89923c3d864d51e93cb0910700fa0f749bf85ab8167eefdee1b5R37) triggers docker info since that change.Using the recommended install manual for swarm scenario, the docker.sock will not be mounted into the Portainer container but only to the agent container.
I guess this is causing the warning messages in the Portainer Container Log.
The text was updated successfully, but these errors were encountered: