portainer: Unable to retrieve image details or access container console after update of Docker to v26
EDIT FOR TLDR (April 5, 2024)
Portainer 2.20.3 has now been released, which includes a fix for these issues under Docker 26 and above. We recommend updating to 2.20.3 if you need to use Docker 26 or above.
Original report
Before you start please confirm the following.
- Yes, I’ve searched similar issues on GitHub.
- Yes, I’ve checked whether this issue is covered in the Portainer documentation or knowledge base.
Problem Description
Inability to see image information and to use container consoles.
Expected Behavior
Image info is accessible and container consoles are functional
Actual Behavior
Clicking on an image causes the error message “Error Unable to retrieve image details” and clicking on container consoles also produce this same error.
Steps to Reproduce
- SSH into host server
- apt update && apt upgrade
- (Update updates docker-ce alongside any dependencies)
Portainer logs or screenshots
No response
Portainer version
2.19.4
Portainer Edition
Community Edition (CE)
Platform and Version
Docker 5:26.0.0-1~ubuntu.20.04~focal
OS and Architecture
Ubuntu 22.04
Browser
No response
What command did you use to deploy Portainer?
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:latest
Additional Information
Info seen online for this issue states to execute the following for recreating the portainer container:
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce:latest
This does not work, and the issue persists even after a reinstall of Ubuntu and reinstall of docker/portainer.
Only feasible fix is to rollback docker-ce version.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 73
- Comments: 184 (28 by maintainers)
Links to this issue
Commits related to this issue
- fix(docker): Update portainer-docker-compose.yml Added "ce" version to avoid errors when trying to access cli interface from Portainer. https://github.com/portainer/portainer/issues/11436#issuecomme... — committed to mrsof/full-stack-nginx-wordpress-for-everyone-with-docker-compose by mrsof 3 years ago
This is indeed an issue with Docker 26 compatibility - this version removed some functionality we rely on to display the image details. As Docker 26 has only just come out we were unable to test against it for any past releases, but I am discussing with the team as to our next steps.
Same here, it may be related to Docker Swarm 26.0.0
Same issue when I click to access the console.
I encountered the same problem as everyone else. Instead of downgrading Docker, I simply updated to Portainer 2.20.1. Interestingly, this version doesn’t come with a ‘latest’ tag (where ‘latest’ today corresponds to v19).
Attention: Despite the update, the error persisted. However, with version v20, I used CTRL+R in the container window, and everything worked perfectly.
I removed the old container (using docker stop and docker rm) and installed the new one:
Working perfectly:
Same issue here,
until issue solved or new version of docker to try.
Same here when accessing console for any container in Portainer BE
The most recent version of the 2.19 branch (2.19.4) was released in December, prior to the Docker 25 release that contained the deprecation notice for this functionality. As such it was not tested against Docker 25 or Docker 26 as neither was released at the time.
We’re currently working on a fix for this issue which we intend to roll out in our next patch release.
Docker provides instructions for installing specific versions - these are the instructions for Ubuntu (select the Specific version tab in step 2) but there are other installation processes available for other distros. 25.0.5 is the most recent version in the version 25 release. For example, on a Ubuntu 20.04 server:
To identify the version strings available on your particular Ubuntu version, you can use:
Pick the most recent non-Docker 26 version string and proceed from there.
Note also that if you perform an
apt upgradeafter downgrading Docker like this, it will upgrade back to the latest version again. To prevent this you can pin Docker to the version you’re running to prevent this from happening. As a superuser, create a file named/etc/apt/preferences.d/dockerwith the following content (replace the version string with yours):Debian Bookworm here… no console access. Seems like the image update indicator (red/green) is also affected, as all containers are “green”… very unusual. To work around I did this (borrowing from ubuntu above):
Use this version fixed this console issue for me too Many thanks
Looking a bit at the issue, it seems to be that it’s due to the deprecated “Container and ContainerConfig fields in Image inspect” which got removed in v26: https://github.com/docker/cli/blob/v26.0.0/docs/deprecated.md#container-and-containerconfig-fields-in-image-inspect
This feature was already deprecated in Docker v25 (Released in January) and was due for removal for v26. A fix is also provided in the documentation. Somebody dropped the ball here.
big thanks, it works!
sudo apt install --allow-downgrades docker-ce=5:25.0.5-1~debian.12~bookwormThanks a lot man for the command !
Before i was able to use i did a force remove first !
A force refresh using <kbd>Ctrl + R</kbd> worked for me
Commenting to help others and to get visibility to quickly fix this issue.
For Ubuntu 20.04 Focal Fossa use this command to fix the issue by downgrading docker
VERSION_STRING=5:25.0.5-1~ubuntu.20.04~focal sudo apt install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING docker-ce-rootless-extras=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-pluginAs others have suggested commenting out docker from the sources.list until there’s a fix may be a good idea since any time you run an apt update or apt-get update this will update docker again.
Alternatively you can set a hold on the packages by running “sudo apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io docker-buildx-plugin docker-compose-plugin”
To undo the hold run “sudo apt-mark unhold docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io docker-buildx-plugin docker-compose-plugin”
same here: debian 12 fresh install Docker version 26.0.0, build 2ae903e Portainer Business Edition 2.19.4
If you’re running ubuntu 22.04, then set the version as follows. VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
Rolling back makes console etc available again.
As has already been mentioned in this thread, and is displayed at the top of the original issue:
Update to 2.20.3 and clear your browser cache.
Why is this issue closed??
This one did the job for my version of debian:
I have AlmaLinux 8 as my OS. The instructions for downgrading are in the Specific version tab at https://docs.docker.com/engine/install/centos/
So I did it like this:
Then my Portainer Business Edition 2.19.4 the exec console started working again.
This is primarily due to historical reasons - we started the STS/LTS process with 2.20, and we were already where we were with 2.19 before that, and then the Docker 26+ issue appeared. This will be resolved with the 2.21 issue, which should only be a few weeks away.
I’ve added warning boxes to the Docker installation pages in docs now. Hopefully this should help.
@jmessy919 You must use the
Docker 2.20.3 or sts tag. I’m observing that you are still using version 2.19.5 You also need to make sure you clear your browser cache ThanksAs mentioned in this thread already, clear your browser cache fully and this should resolve.
2.20.3 fixed it here too
Solved my problem too, thanks!
2.20 is based off 2.19.4 and was also not built with Docker 26 support (2.20.0 was released just before Docker 26 was).
For me - only using 2.20.3 helped to get the console working again.
Based on the feedback from multiple people here, I think the easiest temporary fix is to rename the latest tag to match v2.20.1 which addresses the problem. (I guess for the majority of people, this will fix the problem) You can do so, using:
Then you can run your regular portainer setup commands.
Edit: @corasaniti my comment was not referring to you, this is why I didn’t mention you.
Upgrading Portainer to image
portainer/portainer-ce:stsworks on Raspberry Pi 5 arm64 Debian Bookworm. Thank you devs.@jeremyjohn Portainer has been updated no need to downgrade anymore just pull and update portainer (make sure to use the
ststag)Portainer 2.20.1 has now been released, which includes a fix for these issues under Docker 26. We recommend updating to 2.20.1 if you need to use Docker 26.
Same issue here!
I also spot that when I click on the image sha link in the images list page, it refreshes a bit and returns to the same list page. I’m still using Debian 10 in my old server. Base on the info above, I revert to docker-ce v25 and confirm it works now.
sudo apt install docker-ce=5:25.0.5-1~debian.10~busterFor ubuntu 22.04, the correct version should be VERSION_STRING=5:25.0.5-1~ubuntu.22.04~jammy
Just figured out my backup site was still running on
portainer:latest. For anyone else, make sure you haveceversionWe’re currently in code freeze for 2.21 with testing underway. I don’t have an exact release date for you but we’re targeting July at this stage.
Is there a reason why 2.20.3 isnt “latest”? when will the latest tag be updated?
Deploying with: portainer/portainer-ce:sts you will get Portainer CE 2.20.2
Issue “unable to exec console” it is solved.
It should be great to have a LTS version with that patch.
@prichardsondev Unfortunately, the fix is only available at the Short Term Support (STS) branch. Officially supported Docker versions are 23.0.6 through 24.0.4. Try the following image.
portainer/portainer-ce:sts
@mamama1 For business you need to switch to Short-Term Support (STS) branch. - https://www.portainer.io/blog/portainer-2.20-release
Switch to portainer/portainer-ee:sts from latest in your docker compose or pull
@jamescarppe
I tried again, but unfortunately with the following new version of Docker 26.0.2, the problem remains. Also, is still present the dangerous bug , that an image with container “stopped” state is shown as “unused”
We are very far from a definitive solution, I hope it won’t be long until the next LTS. In the meantime I was forced downgrade to Docker 25.0.5 and the latest LTS of Portainer 2.19.4
Previously downgraded Docker to 25.0.5 to make it work with Portainer. Somehow Docker got updated to 26.0.1 at some point, and ran into the issue again with portainer-ce:latest. Restarted with portainer-ce:sts which pulled 2.20.1, but it did not work. Updating Docker to 26.0.2 solved it.
It work after i upgrading to
portainer/portainer-ce:stsverison. Just follow this documentation: https://docs.portainer.io/v/2.20/start/upgrade/dockerAs an alternative there is dockge: https://github.com/louislam/dockge
This one was unaffected by the docker upgrade. If you are having issues with rollback, check this out.
for those like myself who don’t know, for ubuntu and debian style systems this will allow all other upgrades to happen except the docker upgrade
apt-mark hold docker-ce*I also was having DNS issues. Downgrading Docker to 25 fixed images issue but DNS one persisted. Rolled back to Docker 24 - and DNS started to work without a hassle
Armbian (Debian)
apt install --allow-downgrades docker-ce=5:24.0.9-1~debian.12~bookwormfor ubuntu 23.10 the command below works:
The same problem for Debian 12 - another one also when uploading Portaine with
docker stack deploy -c portainer.yaml portainemessage: (Since --detach=false was not specified, tasks will be created in the background. In a future release, --detach=false will become the default.) I worked around it with:docker stack deploy --detach=false -c portainer.yaml portainerHere as well.
EDIT: saw your response now @jamescarppe, thank you.
The issue in 2.19 is due to a return value that was removed in Docker 26, so yes, Docker 27 will have the same issue.
so LTS users are being punished by not getting patches or what? since when LTS can’t get bugfixes, until the next LTS release has been released? isn’t this all just about getting a bug fixed in LTS?
Glad to see that I am not the only one with this issue. I tried upgrading my Portainer to:
Standalone 26.1.3 and I still get that error. Docker version 26.1.3, build b72abbb Ubuntu 20.04.6 LTS
Maybe I should upgrade UBUNTU and just reinstall a newer version of Docker ?
As per this comment:
God bless this fix
I have portainer 2.20.1 and Docker 26.1.0, until further notice it runs ok.
Still had that issue on portainer 2.20.1 with docker 26.0.0
Updating docker to 26.0.1 fixed that issue.
This is another repeated cycle of unintentional Docker updates with OS updates. #10983 I would recommend :
to cancel the hold:
apt-mark unhold docker-ce*until Portainer predicts what’s docker is up to next. https://www.portainer.io/blog/portainer-and-docker-26
Downgrading the docker version worked for now
Ubuntu 22.04:
@jamescarppe There is a bug in version 20.01 of portainer. An image is marked as “unused” when the container has been “exited” 😦
With previous versions of Portainer, if the container was “exited” the image was unused. With version 20.01 am I set container in “paused” to see its unused image?
Is this the correct behavior? Thanks PC
You will need to use the version-specific
:2.20.1tag or the:stsmeta tag, as the 2.20 branch is a STS (Short-Term Support) release and as such is not referenced by the:latesttag. You can find more information about what this means in our 2.20 release blog post .Thank you
Please read here https://www.portainer.io/blog/portainer-and-docker-26
We’ve just pushed out a MOTD update (which you’ll see in-app when you next log in) which links to our new blog post on the topic. We’ll be updating the blog post (and this thread) as the fix proceeds.
Thanks man!!! Worked!!!
What others are you considering?
on raspberry with official OS
Having the same, also my IPVLAN network in docker doesn’t resolve names anymore, so no internet access for my dockers since the update. Updated 2 machines with OMV-Portainer, same problem with both of them instantly after the update.
STS stands for Short-Term Support, whereas LTS is for Long-Term Support. The
latesttag points to the most recent LTS build. We cover this in depth in our lifecycle policy document.Instead of latest, use sts tag. Worked out for me
@jamescarppe Hello james I’m also experiencing this issue after upgrading Docker to version 27.1.0.
Due to the security vulnerability CVE-2024-41110, I was forced to upgrade to version 27.1.0. Currently, I’m having trouble accessing the console and images through Portainer.
Portainer version 2.16.2
Portainer Edition Business Edition (BE)
Docker version: 27.1.0
I am running Portainer 2.20.3 on Docker 27.0.3 and do not have this issue. The change that caused this was in Docker 26, and the fix applies to versions 26 and above, including 27. Make sure you clear your browser cache / local storage, and/or try from another browser or incognito.
Thank you @corasaniti.
ststag worked like a charm.Also, I want to ask for a favor to Portanier team. Can you guys please update YML files referenced inside the official guideline “Install Portainer CE with Docker on Linux”?
This will save others’ time. Thanks
Thanks @corasaniti - didn’t know it wasn’t yet pushed to the
latesttag. I learned something new, and after applying theststag instead, everything works as intended. Cheers.As mentioned in the Portainer and Docker 26 blog post that has been linked many times in this thread, 2.21 will be our first LTS release and at this point is due in the next month or so. I don’t have an exact date to share at this stage as there is a substantial amount of testing required to ensure 2.21 is as stable as it can be.
Any information regarding other already-raised bugs will be provided in the issues for those bugs. I would recommend checking there rather than re-raising it multiple times in unrelated issue threads.
@GramThanos Is there a reason why I need to rename (tag) version 2.20.1 with the latest tag? The version 2.20.1 also does not fix the following bug
https://github.com/portainer/portainer/issues/11511
@jamescarppe It’s very frustrating to follow this conversation. We are waiting for a new stable version of Portainer but we still don’t know when it will be released. In addition to the one discussed there are many bugs that the sts version has not yet solved, such as this annoying bug
https://github.com/portainer/portainer/issues/11511
Do you have any news on when the stable version will be released? Thank you
This worked perfectly for me
Deployed portainer/portainer-ce:sts on Raspberry Pi4 8GB and worked like a glove. Just clear the browser cache or use a diff browser to validate.
Thanks! I actually already downgraded Docker CE which solved the issue as well and did apt-mark hold docker-ce*. Since this is now working, I think I’ll stick to the old Docker version, until Portainer Business LTS supports the new Docker version. Is there an estimate on when this will be true?
what about business edition? it says 2.19.5 is the latest version and I’m still having this issue. thanks
We have seen some users still experiencing the issue after updating to 2.20.1 that have resolved the issue through clearing their browser cache and/or doing a force refresh of the page. Those that are still seeing it, are you able to try this (or try in a different browser)?
As the problem referred to in this issue has been resolved with the release of 2.20.1, I am closing the issue. Other problems should be raised in separate tickets where appropriate.
I personally confirmed console access was fixed so you should be good to go. Try clearing your browser cache, or perhaps the image your container uses doesn’t support consoling in.
@jamescarppe Thank you for the blog post and especially for the in-app banner notification about it. You saved us a lot of time and effort. https://www.portainer.io/blog/portainer-and-docker-26
From the Portainer itself :
So, we have to wait until 2.20.1 for the resolution.
Same happening for me on Ubuntu 22.04, Docker 26.0. Fix from @gsanchez2004 worked.
For anyone getting issues: Checking the OS version first.
Then, said fix.
And expected output:
Restarted the Portainer container and I am able to access my container’s shell now.
Same error here too… just when it’s time to update everything… I’d rather wait for an update to fix it than to revert a version, I hope it arrives quickly
For now I have downgraded to docker 25.0.5 by apt removing and auto cleaning docker. Then using dockers install script with the —version tag. Then commenting out docker from its sources.list.d until there’s a fix