-
Notifications
You must be signed in to change notification settings - Fork 524
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
Extension suddenly does not show images and containers #3783
Comments
@Moae. Do you know the last version that worked for you? Can you run "docker info" and share |
@Moae just to make sure: |
Last version working was the 1.22.2, from 1.23 it stopped. this is my docker info
yes works fine |
Can you try setting |
Sorry for the late reply (you know Christmas holidays 😄 ), anyway i tried but nothing changes |
Can you run Additionally, try running |
Both |
@Moae are you using VSCode remoting to connect to the Ubuntu system? Through Remote - SSH, Remote - WSL, etc.? |
Nope, i use sometimes remote connection to the hubdocker but not to connect to my machine, is this what you wanted to know? |
Yeah. I was thinking that what could be happening is Docker has no images/containers/etc. on the remote system, but does on the host, and the explorer was showing for remote. Or, vice versa. @danegsta is there any part of our parsing logic that would cause it to jump out of the loop, without throwing an error, even when |
One thing that I forgot and is worth mentioning about the remote connection is that if i connect to a remote host that has images and containers i can actually see them with no issue. The problem seems to be with local containers and images. |
With 1.23.0 we made some pretty substantial changes to use only the Docker CLI, instead of a mix of the CLI and the HTTP API. But, it's very strange that the API was giving results, and the CLI gives results on a terminal, but for some reason our extension process isn't able to pick anything up. Can you share the full outputs from these commands, when run from a VSCode bash window? You can censor anything that you need to.
|
|
I'm not seeing any issues with running those responses through our parser, so it really does seem that for some reason when we invoke the Docker CLI commands from VS Code we're not getting responses back, despite there obviously being containers and images when you run the commands from your shell. @Moae there are a couple possible scenarios that would be worth checking next. First, can you check your VS Code settings and see if you've got anything configured for the After that, can you check to see if you have any configuration in a .bashrc, .bash_profile, or similar file that might be setting any Docker environment variables (DOCKER_HOST, etc.) that would apply when running Docker commands in your shell, but might not be getting set for the VS Code process? On a related note, if you normally launch VS Code directly from your IDE, you might try launching it from your shell (via |
@danegsta I checked but nothing is set in docker.environment setting. Also no docker env variables are set in .bashrc, .profile etc... If I start vscode from shell unfortunately nothing change |
I also have the same issue with no containers or images showing up in the extension. |
I found this thread when I searched for Docker extension not working. I downgraded to 1.22.2 and it works again. This is on a remote machine. Both local and remote running ubuntu. |
We're looking to produce a custom build of the extension from a branch with additional telemetry/logging added for the operations that aren't returning the correct results to help troubleshoot this issue. |
I have the same problem (version 1.23.3). Actually, I have a worse problem because not only is nothing listed in each of the sections, but the docker icon is missing from the activity bar (there is just a blank space) and all the section headers say things like "%VSCODE-DOCKER.VIEWS.DOCKERCONTAINERS%" instead of the string that should be there. If I downgrade to 1.22.2, as suggested by @galigutta, it works fine. This is on my laptop. On my desktop machine, which has version 1.23.3, it is fine. |
@Bananas-Are-Yellow That almost sounds like a corrupted install...does it work if you reinstall 1.23.3? |
It breaks for me when it updates, but I keep reverting back when needed. Light user of docker here. |
I've tried uninstalling and reinstalled but that does not fix it. |
Strange. Can you share a screenshot? I'd like to open a bug in https://github.com/microsoft/vscode |
Thanks @Bananas-Are-Yellow. I opened microsoft/vscode#171834 for that. |
Our latest nightly build has support for additional diagnostic logging to help troubleshoot this issue. If anyone running into this problem is willing to install the nightly build (see #1408 for instructions on installing nightly builds) and provide debug logs, that would be a big help. To install the latest nightly, you'll need to be on at least version 1.74.0 of VS Code. To enable debug logging for the Docker extension, open the VS Code command palette (ctrl+shift+p on Windows and Linux) and run the To ensure the logs capture enough events to assist in troubleshooting, click on the refresh icons for at least the CONTAINERS and IMAGES Docker resource views. Finally, open the command palette again and run the Take the generated log output, remove any personal/secret information, save it to disk somewhere, and then email it to my github alias (danegsta) @microsoft.com. Please DO NOT share the logs directly in the issue comments on the off chance that they still contain personal information. |
I just followed the instructions to install the latest nightly which appears to be This is odd (but good) because installing v1.22.2 (as suggested above) and then back to v1.23.3 again did not fix the problem. |
@Bananas-Are-Yellow How strange...shall we agree to blame solar flares? 😄 |
Well, I am still seeing this issue and sent @danegsta my debug logs. lets see. |
@galigutta thanks for the logs; it looks like Docker is failing to connect to a remote host over SSH due to an issue verifying the remote host's SSH key. You may either be missing an entry in ~/.ssh/known_hosts for the ssh connection or have an old configuration that doesn't match the current key. You can follow instructions from a guide such as this or this to ensure your remote SSH server has an up-to-date entry in your local ~/.ssh/known_hosts to unblock the remote connection. |
@danegsta I am still able to get 1.22.2 work. So I am not sure why that would be. Also i have no idea what http://docker.example.com is. This is the site its trying to connect to. |
The weird part of this issue is when I have the extenstion installed, i cannot even do |
@galigutta version 1.22.2 and below were connecting directly to the Docker daemon socket, while from version 1.23.0 on we're running commands via the CLI to better match the behavior of the local Docker install. It looks like the library we were using previously (https://www.npmjs.com/package/dockerode) uses an SSH library that didn't implement connection validation, while the Docker CLI does check known_hosts before allowing a connection. The http://docker.example.com URL seems to be a known issue where Docker gets confused about the hostname (see here for other users wondering why that URL is showing up in Docker error output). Can you try running a Docker CLI command with the same DOCKER_HOST setting you have in vscode |
Since you have a DOCKER_HOST environment variable configured in the vscode docker extension settings that environment config also gets applies to the vscode terminal as well, which would explain why commands aren't working there either with the extension installed. Once you uninstall the extension and reload your terminal session, any environment configs from the extension wouldn't be applied anymore. The common error in the logs appears to be |
You could also try running |
Still cant make any sense out of it. all my docker stuff is local and there are no remote hosts. there is a reference to [ssh -l user -- xxxxxx.lan docker system dial-stdio] in the logs, but it is just the name of the remote host itself to which i am connecting. In any case, i have tried all these things with no luck
|
It seems that you may have ended up with an accidental configuration entry in the vscode docker extension. Can you open the vscode settings (File > Preferences > Settings) and search for I see a DOCKER_HOST environment value in the logs that's coming from that config setting, which is why Docker is trying to make an SSH connection. If you remove it, Docker will use the same connection settings as your system. |
Just to make sure I understand your environment clearly, you have two machines; machine A is your local machine, and machine B you're SSHing into. If you SSH into B and run Docker commands from that session, everything works correctly. But if you run vscode on machine A, Docker commands are failing. Is your goal to run Docker directly on machine A or do you want all Docker commands to run on the remote machine B? If the goal is to just run Docker locally on machine A without involving machine B, then the above instructions to remove the DOCKER_HOST configuration should resolve the problem. On the other hand, if the goal is to run commands on the remote machine B, this guide covers all the options for SSH integration via vscode and the Docker extension. It sounds like your SSH connection is secured via password, which I don't believe is supported by the Docker CLI (it only supports SSH connections secured with SSH keys), but using the vscode SSH remoting extension + the Docker extension could work (I've tested it with the latest Docker extension and a password protected SSH connection and didn't run into any issues). In that case you can still remove the DOCKER_HOST config, but it shouldn't strictly be necessary. |
And finally, if you've already been connecting via the SSH remote extension, then removing the DOCKER_HOST config entry is definitely the right change to make. |
yes, the In my case, A is the local machine. and B is the remote server i connect to and where the docker extension is installed. I don't do anything at all on A other than connect to B. So this is good! |
Glad that got you unblocked! |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
I am facing this problem too. Can I contribute in some way to troubleshooting the problem? |
@marcio-pessoa can you take a look at #3821 and see if that looks like the same issue? #3821 (comment) is especially relevant on that issue. If it's not the same issue can you create a new one? Thanks! |
Thanks @bwateratmsft. The solution proposed by @danegsta on #3821 (comment) (set VS Code Docker Path setting) works perfectly. |
I have another issue with the similar symptom. Turned out In my environment I had >50 containers - in Might be related to this: docker/for-linux#1179 |
I think it is probably indeed related to that. If you minimize the Docker Contexts panel, it should stop executing that command at least. Container listing will probably still be slow due to docker/for-linux#1179. |
Hello there,
I don't know why, but suddenly the extension doesn't show images, container, volumes etc... everything is "No items found"
I never installed Docker Explorer extension as mentioned in #1609. I tried to reinstall both vscode and the extension but nothing.
Docker is working as i can run
docker ps -a
and see my images and containers, i can run docker commands without any issue.OS: Ubuntu 22.04.1 LTS
VSCode Version: 1.74.2
Docker extension version: 1.23.3
Docker version: 20.10.17
Any idea what might be the problem?
The text was updated successfully, but these errors were encountered: