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
Failed to connect. Is Docker installed and running? #1582
Comments
|
I can reproduce. Investigating... |
|
Thank you so much for looking into this. I'm glad that you can reproduce
and look forward to hearing about your findings.
…On Fri, Jan 24, 2020 at 5:28 PM Karol Zadora-Przylecki < ***@***.***> wrote:
I can reproduce. Investigating...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1582?email_source=notifications&email_token=AD3ZZAAZMAUPQJEMROQFPRTQ7OIT5A5CNFSM4KK6GBW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4RXRY#issuecomment-578362311>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3ZZAEGR3DDKGPZMNMMSMTQ7OIT5ANCNFSM4KK6GBWQ>
.
|
|
So at least for me the issue seems to be that VS Code (incorrectly) does not offer me the option to install Docker extension on the remote machine. I found a workaround:
@workermonkeyrobot can you let us know if this workaround works for you? |
|
Karol,
I have tried to uninstall the Docker extension then reinstall while making
sure that the installation is directed at the remote target. This still
gave me the same errors. I wanted to make sure that there were no problems
with my Ubuntu / Docker installation so I started a new Droplet on
DigitaOcean. I found that they have a Docker Droplet that has the
recommended installation already performed. The attached pictures show the
pre and post installation screens.
I currently have the same situation on both of my remote servers. The first
was an Ubuntu 18.04 server that I installed Docker on. The 2nd was the
Docker Droplet which is an Ubuntu 18.04 VM with Docker version 19.03.1 pre
installed. Both give me the same DOCKER_HOST env errors when I attempt to
use the Docker extension on the remote vscode servers.
Please let me know if there is anything else that you can suggest for me to
try.
…On Mon, Jan 27, 2020 at 10:19 AM Karol Zadora-Przylecki < ***@***.***> wrote:
So at least for me the issue seems to be that VS Code (incorrectly) does
not offer me the option to install Docker extension on the remote machine.
I found a workaround:
1. Uninstall Docker extension from VS Code. Close all VS Code windows.
2. Start VS Code again. Use `Remote-SSH: Connect to Host..' to connect
to remote machine (new VS Code instance will open).
3. Open extension marketplace and install Docker extension *on the
remote machine* (see screenshot below)
[image: install-docker]
<https://user-images.githubusercontent.com/15271049/73201358-b9fcca00-40ed-11ea-8d22-c8e17e39e4a2.png>
1. Once the Docker extension is installed remotely, it can also be
installed locally.
@workermonkeyrobot <https://github.com/workermonkeyrobot> can you let us
know if this workaround works for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1582?email_source=notifications&email_token=AD3ZZAHIHNPXI7SXYNCVXXTQ74QRTA5CNFSM4KK6GBW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKAQW7A#issuecomment-578882428>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3ZZAAWXHNQYJ6OERYF4LDQ74QRTANCNFSM4KK6GBWQ>
.
|
|
@workermonkeyrobot understood. I cannot reproduce the issue that you are observing. What is the exact error message that you are seeing (the one related to DOCKER_HOST)? Also, how exactly are you setting up your Docker environment? I followed instructions from Docker https://docs.docker.com/install/linux/docker-ce/ubuntu/ pretty much verbatim and don't see a problem one over the Docker extension remote installation hurdle. I do not have access to DigitalOcean environments but maybe you can provide us with step-by-step instructions, or a Vagrant file that will help us reproduce the issue in-house? |
|
The error message reads "Error: DOCKER_HOST env variable should be something like tcp://localhost:1234". This message comes up when I expand any of the "Failed to connect. Is Docker installed and running?" warnings. Last week when I was using Docker extension 0.9.0, the DOCKER_HOST message would remain expanded after I click. Now with 0.10.0 it only expands for less than 1 second then collapses. That's why I couldn't get it in the screenshot. SSH:billyboy is my Droplet that I started with Ubuntu 18.04 then followed the same instructions from the link that you suggested. I like your suggestion of the Vagrant file. I plan to install Vagrant and VirtualBox to see if the issue may have something to do with DigitalOcean. It may be a few days before I get to it but I hope to post some feedback by early next week. |
|
Roger. Is the DOCKER_HOST variable set in your environment? |
|
I followed the instructions from https://docs.docker.com/install/linux/linux-postinstall/ . These instructions say to unset the DOCKER_HOST env variable. I also tried to set: |
|
Yeah, on my machine the DOCKER_HOST variable is not set and it is working ... |
|
I installed Vagrant / VirtualBox and ran the following command: Unless you see any problem with my Vagrant init command, it looks like my problem is likely to be on my local installation of VS Code (running on Windows 10 Home). I have confirmed that the Docker extension is installed on my SSH:vagrant box and not on the local instance. Later this evening I may try to uninstall VS Code and reinstall to see if that helps. Please let me know if there is anything else that you can think of for me to check. |
|
I tried the box you listed above and was able to get the VS Code Docker extension to work with it without any difficulties. This was from yet another client machine (an Ubuntu box). Please let us know if VS Code re-installation helps! You might want to try the portable mode that isolates the whole VS Code installation really well. Please let us know if that helps! |
|
I uninstalled VS Code then installed the following version using the .exe installer: The Docker extension still had the same problem. Then I downloaded VSCode-win32-x64-1.41.1.zip. After unzipping the contents, I was able to log into my vagrant box and the Docker extension works just fine! I also created a new Digital Ocean droplet with Ubuntu 18.04 and Docker... The Docker extension worked just fine there as well. It looks like the portable mode installation was the solution. I would like to get the installed version of VS Code to work if possible. I'm not too thrilled about the portable mode because I like to right click in File Explorer and select "open with VS Code". I also like to access VS Code from the Start menu. Is there anything that I can do to fix the installed instance of VS Code? |
|
Glad the extension is working for you Try installing VS Code portable via scoop. scoop bucket add extras
scoop install vscode-portableThis should take care of Start Menu/Open With shortcuts. It is the way I run VS Code on Windows. |
|
I have the same problem on my first droplet, but when connected to another droplet everything works fine, and I don’t understand why so |
|
@AlexSerbinov can you check out https://github.com/microsoft/vscode-docker/wiki/Troubleshooting#the-extension-does-not-find-docker-on-a-remote-machine-failed-to-connect-is-docker-installed-and-running-error and let us know if that helped? |




I am having trouble connecting to the Docker viewer on the left hand side of the screen. When I remote SSH into my linux Ubuntu 18.04 machine, I get the following errors in the Docker viewer:
Failed to connect. Is Docker installed and running?
Error: DOCKER_HOST env variable shoule be something like tcp://localhost:1234
I have verified that the Docker extension v0.9.0 is installed on the SSH - Remote target machine as well as my local machine.
I have also followed the instructions from:
https://docs.docker.com/install/linux/linux-postinstall/
The post installation instructions helped me so that I can run "docker run hello-world" without the sudo command. I have also tried unsetting the DOCKER_HOST env as well as setting:
export DOCKER_HOST=tcp://127.0.0.1:2375
in my ~/.bashrc file. In both conditions, the Docker viewer would not populate.
Please let me know what I can do to proceed.
Thank you,
Aaron
The text was updated successfully, but these errors were encountered: