• Register
0 votes
114 views

Problem  :

I am using Mac. I want to run my docker code.

Following is my command:

docker run -d -p 80:80 --name webserver nginx

However I am facing below error:

docker: Error response from daemon: driver failed programming external connectivity on endpoint webserver (bd57efb73c738e3b271db180ffbee0a56cae86c8193242fbc02ea805101df21e): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE).

Please let me know if any solution on my error.

6 5 3
7,540 points

2 Answers

0 votes

Solution :

I have gone through your post. I understood your problem with docker. I had also faced the similar error in the past. This error is related to the incompatibility problem with windows "fast-boot".

This error is generally caused by the incompatibility with Docker and fastboot. You should either make sure that you stop all the containers before shutting your Windows down or else you should disable the fastboot in your Windows' power settings by performing the procedure given below:

CTRL+R > "powercfg.cpl" > "Choose what the power buttons do" > "Change settings that are currently unavailable" > Deselect "Turn on fast start-up"

You can also try to disable the fastboot with the single command in powershell if you are comfortable in doing so then use the command as given below:

Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power\' -Name HiberbootEnabled -Value 0

9 7 4
38,600 points
0 votes

Solution:

From your error message, the EADDRINUSE strikes port 80 is meanwhile in use on either the docker VM or probably directly on your laptop. You can either stop whatever is running on that port, or alter the port employed in your Docker, command. To alter to the external port 8080, Employ:

docker run -d -p 8080:80 --name webserver nginx

I had the similar problem with one of my containers. I attempted everything however at the time nothing performed, I attempted the following and launched the container again with success

 sudo service docker stop
 sudo rm /var/lib/docker/network/files/local-kv.db
 sudo service docker start

Latterly this issue started to occur a lot on Windows. You can attempt restarting docker or you can manually stop docker before Windows shutdown - docker begins cleanly on reboot.

Stop all the running containers docker ps -a -q  thereafter Stop the Docker on your machine & restart it.

I got past most of the hurdles bar one. I copied reJSON employing git then compiled the module, then added it in the redis.conf file.

Now the one hurdle left which is possibly the same as what the logs in my post above also tell, where it couldn't connect to IP/port 0.0.0.0:6379 as it was in exercise meanwhile.

redis.conf has "bind 127.0.0.1" defined. At the time including in the line "loadmodule /path/to/file/rejson.so" (where /path/to/file/ is the correct path), the redis-cli command doesn't link, with the loadmodule command commented out I can link with redis-cli to 127.0.0.1:6379 fine

10 6 4
31,120 points

Related questions

0 votes
1 answer 59 views
59 views
Problem : After I tried to update my Docker version to 0.8.0, I face an error message while I try to enter sudo docker version as below : Client version: 0.8.0 Go version (client): go1.2 Git commit (client): cc3a8c8 2020 ... 12:55:57 initserver: open /var/lib/docker/aufs/layers/cf2414da53f9bcfaa48bc3d58360d7f1cfd3784e4fe51fbef95197709dfc285d: no such file or directory How can I resolve the issue?
asked Jan 3 alecxe 7.5k points
0 votes
2 answers 579 views
579 views
Problem : I have installed docker-machine 0.1.0 and docker-compose 1.1.0 on my Mac OS 10.8.5. My Docker-machine is running normally and it can be connected by docker-machine ssh as follows: $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox ... Dockerfile FROM centos:centos7 DOCKER_HOST tcp://192.168.99.100:2376 docker-compose.yml web: build: . Why can't I connect? Any clues?
asked Nov 24, 2019 alecxe 7.5k points
0 votes
1 answer 435 views
435 views
Problem : I installed the docker-machine 0.1.0 and docker-compose 1.1.0 on the Mac OS 10.8.5. Docker-machine is running normally and able to connect by the docker-machine ssh. But can't connect from docker-compose getting following error: $ docker-compose up ... running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. Why can't I connect? Any clues?
asked Jan 20 jwilliam 3.9k points
1 vote
1 answer 141 views
141 views
Problem : Facing the weird following issue cannot connect to the docker daemon at unix:///var/run/docker.sock. is the docker daemon running?
asked Nov 8, 2019 peterlaw 6.9k points