Docker Community Forums

Share and learn in the Docker community.

Cannot run Hello World | No connection can be made because the target


(Briantweir) #1

Hi,

I’m just getting started with Docker and attempted to follow the install instructions to the T.

Win7 x64
Virtualization enabled & tested with the MS tool
Never had any docker tools installed before today.
The only thing I installed was the docker toolbox

Attempt to run hello world failed.

$ docker run hello-wolrd
An error occurred trying to connect: XXXXXXXXXXX_2375/v1.21/containers/create: dial tcp 127.0.tEx tcp: No connection could be made because the target machine actively refused it.

I also read this where the user has a similar issue.

I ran docker version … RESULTs

$ docker version
Client:
Version: 1.9.0
API version: 1.21
Go version: go1.4.3
Git commit: 76d6bc9
Built: Tue Nov 3 19:20:09 UTC 2015
OS/Arch: windows/amd64
An error occurred trying to connect: Get XXXXX_ocalhost:2375/v1.21/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it.

Any advice would be hugely appreciated. Based on the output it appears the server is not running, just the client. I don’t think I missed any steps. I’m just barely getting started.

Thanks!

Brian


(Briantweir) #2

Solved:

To fix the issue I did the following:

  1. Uninstall both Docker Toolbox and Virtual Box and Git
  2. Remove folders .docker and .VirtualBox under folder c:\Users{windows account username}\
  3. Remove all “VirtualBox Host-Only Ethernet Adapter” from Device Manager window
  4. Restart machine
  5. Re-install Docker Toolbox WITH “RUN AS ADMINISTRATOR” enabled.
  6. Click Docker Quick Start Terminal

It is working now. The only difference seems to be running the setup as a full admin, something I never usually need to do in Windows 7.


(Jeff Anderson) #3

Generally this error happens if your shell does not have the environment variables that tell your docker client how to connect to the docker service.

It is entirely possible that something went wrong during your first installation attempt, and the virtualbox docker vm wasn’t 100% set up and running, causing there to be nothing to configure your shell for in the quickstart terminal.

Glad you got it working. :slight_smile: