portainer: Failure: Unable to query endpoint

Bug description

Failure: Unable to query endpoint on endpoints list on portainer home page after connecting to the console of any container on an endpoint using the portainer agent. The docker host is still online and available directly through ssh. Happens exclusively with endpoints using the portainer agent. A 2nd endpoint with the alternative socket method to the same host still works, while the agent doesn’t.

Expected behavior No errors

Steps to reproduce the issue:

  1. Connect to any container console on any docker host configured with the portainer agent
  2. Disconnect
  3. Return to home page
  4. Do not refresh the browser
  5. Click any endpoint that is configured with the portainer agent and isn’t the one you just used.
  6. Failure: Unable to query endpoint error shows

Endpoints configured over TCP still work fine.

Technical details:

  • Portainer version: 1.20.0
  • Portainer agent version: 1.2.0 and 1.1.2
  • Docker version: Docker version 18.06.1-ce, build e68fc7a
  • Platform: Ubuntu 16.04.4 x64
  • Command used to start Portainer: docker run --name portainer -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer:1.20.0
  • Browser: Google Chrome Version 73.0.3667.0 (Official Build) canary (64-bit)

Additional context

  • Same issue happens in various other browsers I tried.
  • Refreshing the browser before connecting to a different endpoint prevents this from happening.
  • Over time the unavailable endpoint becomes available again on its own.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 38 (11 by maintainers)

Most upvoted comments

Hi there, I was able to reproduce this bug and we have a fix on the way!

I’m still seeing this in 1.22. I think this has not been resolved.

+1 for having the same issue. I am also running the version indicated that is supposed to fix this problem.

@paulcalabro @wangkai1994 Does it fix the problem permanently or does it just remove the error? In my case the error goes away on its own, after 10 minutes (or so) the inaccessible endpoint is available again as if nothing went wrong in the first place. But the issue always comes back when I go through the required steps.

Hi. I had a very similar issue with the 1.21.0, and using the image portainerci/portainer:fix2556-frequent-offline-mode fixed my issue. Does the 1.21.0 contains the fix of portainerci/portainer:fix2556-frequent-offline-mode ? Thanks.

@deviantony I thought so too at first so I tried using the portainerci/portainer:fix2556-frequent-offline-mode image before I created this issue. I tried again just now and the issue still persists.