Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker says: No connection could be made because the target machine actively refused it

I was using docker everyday but today a problem occurred without changing anything. I opened docker terminal and tried to start one of my containers. But it gave this error:"No connection could be made because the target machine actively refused it" I am using Windows 10.

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/

docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com


admin@samsung MINGW64 ~
$ docker ps
An error occurred trying to connect: Get http://127.0.0.1:2375/v1.22/containers/json: dial tcp 127.0.0.1:2375: connectex: No connection could be made because the target machine actively refused it.

admin@samsung MINGW64 ~
$ docker version
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 22:37:33 2016
 OS/Arch:      windows/amd64
An error occurred trying to connect: Get http://127.0.0.1:2375/v1.22/version: dial tcp 127.0.0.1:2375: connectex: No connection could be made because the target machine actively refused it.
like image 330
Uchiha Itachi Avatar asked May 15 '16 03:05

Uchiha Itachi


People also ask

How do you fix no connection could be made because the target machine actively refused it 10061?

Try running netstat -anb from the command line to see if there's anything listening on the port you were entered. If you get nothing, try changing your port number and see if that works for you. In Windows operating systems, you can use the netstat services via the command line (cmd.exe) .

Could not connect to mail server no connection could be made because the target machine actively refused it?

“No connection could be made because the target machine actively refused it.” Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port.

How do you enable the expose daemon on TCP localhost 2375 without TLS?

on the Notification bar, select Settings from the context menu, and then select the Expose daemon on tcp://localhost:2375 without TLS checkbox in the General section of your system Docker settings. Docker for Mac: The recommended option when using Docker Desktop for Mac.


1 Answers

  1. Right-click on your PC
  2. Properties
  3. Advanced system settings
  4. Environment Variables
  5. Add new Variable: DOCKER_HOST
    Value: tcp://127.0.0.1:2375
  6. Run Docker Desktop
  7. bottom-right, right-click on Docker-Desktop
  8. Settings
  9. Enable the following option: "Expose daemon on tcp://localhost:2375 without TLS"
like image 58
Confidenc3 Avatar answered Sep 19 '22 09:09

Confidenc3