Skip to content
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

"driver failed programming external connectivity on endpoint" (1.7.0-rc1) #3277

Closed
jamshid opened this issue Apr 6, 2016 · 284 comments
Closed

"driver failed programming external connectivity on endpoint" (1.7.0-rc1) #3277

jamshid opened this issue Apr 6, 2016 · 284 comments

Comments

@jamshid
Copy link

@jamshid jamshid commented Apr 6, 2016

I'm pretty sure this was working on docker-compose 1.7.0-rc1 before I installed the latest Docker for Mac beta, which upgraded to docker 1.11.0-rc3. I'm trying to get the socat service to run on port 172.17.0.1:8123, so that it's available to docker builds. My real yml uses an environment variable for the IP address, but it happens even when hardcoded.

ERROR: for socat_httpcache  driver failed programming external connectivity on endpoint test_socat_httpcache_1 (5d973ed559d63a5561b715248f797a336915a44960b5e32e622ac8349b16e5d2): Error starting userland proxy: failed to bind port: Unix.Unix_error(Unix.EADDRNOTAVAIL, "bind", "")
version: '2'
services:
  httpcache:
    restart: always
    image: clue/polipo
    command: proxyAddress=0.0.0.0 allowedClients=0.0.0.0/0 disableIndexing=false disableServersList=false
    mem_limit: 500m
    memswap_limit: 500m
    volumes:
      - /var/cache/polipo

  socat_httpcache:
    restart: always
    hostname: POLIPO1
    image: bobrik/socat
    mem_limit: 50m
    command: TCP-LISTEN:8123,fork,reuseaddr TCP:httpcache:8123
    depends_on:
      - httpcache
    ports:
      - "172.17.0.1:8123:8123"

verbose.txt

@aboch
Copy link

@aboch aboch commented Apr 6, 2016

@jamshid
Can you post the o/p of sudo netstat -nlp | grep 8123. Thanks.

@jamshid
Copy link
Author

@jamshid jamshid commented Apr 6, 2016

My mac says -p requires an argument, so I think this is what you want:

$ sudo netstat -nl -p tcp  | grep 8123
(nothing)
$ sudo netstat -nl -p tcp  | head    # to confirm mac output is what you expect
Active Internet connections
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4       0      0  192.168.2.4.52918      216.58.194.34.80       ESTABLISHED
tcp4       0      0  192.168.2.4.52917      23.199.236.147.80      ESTABLISHED
tcp4       0      0  192.168.2.4.52916      192.229.163.25.443     ESTABLISHED
tcp4       0      0  192.168.2.4.52915      192.229.163.175.80     ESTABLISHED
...
$ docker ps -a | grep 8123
7baf5b2ec0eb        clue/polipo               "polipo proxyAddress="   26 minutes ago      Up 12 minutes                  8123/tcp            test_httpcache_1
3fea15e3d5b4        clue/polipo               "polipo proxyAddress="   33 minutes ago      Up 19 minutes                  8123/tcp            buildenv_httpcache_1
@bezelga
Copy link

@bezelga bezelga commented Apr 29, 2016

same thing happening to me.

@leeahoward
Copy link

@leeahoward leeahoward commented May 3, 2016

I am getting the same issue when restarting using docker-compose up. In my case it's an nginx proxy service that fails to start. Must be related to the Docker for Mac beta. It started after I installed the beta and hasn't happened after switching back over to Virtualbox.

docker-compose version 1.7.0, build 0d7bf73
Docker version 1.11.0, build 4dc5990

@geniousphp
Copy link

@geniousphp geniousphp commented May 4, 2016

I encouner the same error when I try to start my stack using docker-compose. All the containers start correctly except one (consul). I'm getting this error

ERROR: for consul driver failed programming external connectivity on endpoint devas_consul_1 (6ceba32c51cb70b354f 2f4b68d173ca97a65d6a0bfd308d3137e2a7069abd1b6): Error starting userland proxy: Failed to bind: EADDRNOTAVAIL

I'm sure it has something to do with my docker version beta for mac.

docker-compose -v docker-compose version 1.7.0, build 0d7bf73

I'm using the last docker beta version for mac

`
docker version
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Wed Apr 27 00:34:20 2016
OS/Arch: darwin/amd64

Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 8b63c77
Built: Fri Apr 29 14:13:26 2016
OS/Arch: linux/amd64
`

@zhangandyx
Copy link

@zhangandyx zhangandyx commented May 5, 2016

Following the above message, I get Error starting userland proxy: Failed to bind: EADDRINUSE.
Confused as to where the conflict is where none existed before

@mattgi
Copy link

@mattgi mattgi commented May 7, 2016

How does one "release" the port that is in use so that compose can bring up the container again? First time it happened, I waited for a minute or so and it worked on second attempt. Second time, its been about an hour. Docker compose kill, down, rm --all, etc. and something still has a hold of it.

@mattgi
Copy link

@mattgi mattgi commented May 7, 2016

@geniousphp
Copy link

@geniousphp geniousphp commented May 13, 2016

I figure out what the problem is about, the container (consul) causing the issue has this binding port 172.17.0.1:53:8600/udp. I replaced it with 53:8600/udp and it's working now. I didn't understand yet why the first binding doesn't work. BTW, How can I know the bridge ip address?

@rsilveira65
Copy link

@rsilveira65 rsilveira65 commented May 30, 2016

Hello, I had the same problem with Docker version 1.11.1 on Mac OSX.
ERROR: for nginx driver failed programming external connectivity on endpoint managercentralapp_nginx_1 (e11d19ee8f486a2e12c9c87802dca7ea5f541f026645f69e338e94732ac1eb56): Error starting userland proxy: Failed to bind: EADDRINUSE

@madjam002
Copy link

@madjam002 madjam002 commented Jun 20, 2016

I too am getting this after upgrading to Docker 1.12-rc2, not sure if this is the right place to post this.

Client:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd
 Built:        Fri Jun 17 20:35:33 2016
 OS/Arch:      darwin/amd64
 Experimental: true

Server:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd-unsupported
 Built:        Fri Jun 17 21:12:28 2016
 OS/Arch:      linux/amd64
 Experimental: true
@madjam002
Copy link

@madjam002 madjam002 commented Jun 21, 2016

Full error:

Error response from daemon: driver failed programming external connectivity on endpoint xxx_xxx_1 (xxx): Bind for 0.0.0.0:2224 failed: port is already allocated

netstat:

tcp6       0      0 :::2224                 :::*                    LISTEN      9083/docker-proxy
@deg
Copy link

@deg deg commented Jun 22, 2016

I'm seeing this sporadically. Retrying the command after a minute usually "fixes" the problem.
This is after moving to Docker for Mac yesterday.

$ docker version
Client:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd
 Built:        Fri Jun 17 20:35:33 2016
 OS/Arch:      darwin/amd64
 Experimental: true

Server:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   a7119de
 Built:        Fri Jun 17 22:09:20 2016
 OS/Arch:      linux/amd64
 Experimental: true

@kausik93
Copy link

@kausik93 kausik93 commented Jun 29, 2016

I've also been getting the same error as you guys. I believed it was because nginx was binding it ports that were already taken up but I don't think so now. Did anyone find any solutions to this? :)

@briankelleher
Copy link

@briankelleher briankelleher commented Jul 6, 2016

+1 Same error on mac

@joemewes
Copy link

@joemewes joemewes commented Jul 6, 2016

I had this happening after a move to Docker for Mac, but after stopping and removing All containers after the move, restarting docker, recreating container etc etc. It was fixed.

I had this again today after an update of Docker for Mac , but repeating the above scenario fixed. I assume the port (and "other" things) I'm assigning to particular containers is not being released until completely cleaned up.

eg:

ERROR: for nginx driver failed programming external connectivity on endpoint dev_nginx (4c340c55f7402c7b265803ea64541ebdf8613f4b43dfa816001d27bdc4f513b3): Error iptables FORWARD: Another app is currently holding the xtables lock; waiting (1s) for it to exit... ERROR: Encountered errors while bringing up the project.

@krim
Copy link

@krim krim commented Jul 7, 2016

+1 have the same problem on mac

@leifdejong
Copy link

@leifdejong leifdejong commented Jul 7, 2016

@TuningGuide MacBook Pro (15-inch, Late 2011), 2.2 GHz Intel Core i7, 8GB 1333 MHz DDR3
Running Node 4.4.7 extended to support Ember CLI. Setup is below:

FROM node:4.4.7

# expose ember-cli ports
EXPOSE 4200 35729 49152

# install ember-cli dependencies
RUN npm install -q -g ember-cli
RUN npm install -q -g bower
RUN npm install -q -g phantomjs-prebuilt

# install watchman
# http://ember-cli.com/user-guide/#watchman
RUN \
  git clone https://github.com/facebook/watchman.git &&\
  cd watchman &&\
  git checkout v3.5.0 &&\
  ./autogen.sh &&\
  ./configure &&\
  make &&\
  make install

Ran with mounted volume of the ember-cli files using 'ember serve' as the command.

@luki3k5
Copy link

@luki3k5 luki3k5 commented Jul 8, 2016

+1 same problem on the mac with docker for mac

@TuningGuide
Copy link

@TuningGuide TuningGuide commented Jul 8, 2016

Please stop sending +1, as it spams all subscriber inboxes. Either use the emoticons (smiley on the right of each comment) or at least give your full setup, version numbers and so on. Thx

@miraage
Copy link

@miraage miraage commented Jul 8, 2016

➜  ~ docker info
Containers: 2
 Running: 0
 Paused: 0
 Stopped: 2
Images: 2
Server Version: 1.12.0-rc3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 21
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.14-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.954 GiB
Name: moby
ID: GZAT:26TX:PYCM:KKNA:JSWY:AMEL:RQYI:O23B:QGSQ:WBVB:3Q7E:XDPJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 18
 Goroutines: 30
 System Time: 2016-07-08T17:41:26.03558348Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
➜  ~ cat docker-compose-local.yml
version: '2'
services:
  cache:
    image: redis
    command: redis-server --appendonly yes
    ports:
      - "6379:6379"
  db:
    image: postgres:9.4
    ports:
      - "5432:5432"
    volumes:
      - ./tmp/dump.gz:/tmp/dump.gz
      - ./tmp/dump.sh:/docker-entrypoint-initdb.d/dump.sh
    environment:
      POSTGRES_DB: dbname
      POSTGRES_USER: dbuser
      POSTGRES_PASSWORD: dbpass

Got next errors:

ERROR: for cache  driver failed programming external connectivity on endpoint carsaver_cache_1 (253054ef6864bdcb5377bd1690173fa352021d505dc05c3aafecf66b02c0b73d): Error starting userland proxy: write /port/tcp:0.0.0.0:6379:tcp:172.18.0.2:6379/ctl: errno 526

ERROR: for db  driver failed programming external connectivity on endpoint carsaver_db_1 (8a5990bd06a50d87c7db96de84367bb01b71c971d5a4b9e578fea7d75d893d59): Error starting userland proxy: write /port/tcp:0.0.0.0:5432:tcp:172.18.0.3:5432/ctl: errno 526
ERROR: Encountered errors while bringing up the project.
@miraage
Copy link

@miraage miraage commented Jul 8, 2016

Found solution for people with same error as I shown above.
I was previously using Docker Toolbox, but I did not delete Virtualbox. It was using my ports so I can not start. After complete removing VirtualBox, docker-compose worked awesome.

@aanand @dnephin please, add to Getting Started a warning like explained above.

@FrenchBen
Copy link
Contributor

@FrenchBen FrenchBen commented Jul 8, 2016

@miraage happy to hear you solved your issue.
I didn't have your volume data+dump.sh but did a quick compose without issues:

Creating driverfailed_cache_1
Creating driverfailed_db_1
Attaching to driverfailed_cache_1, driverfailed_db_1

@jamshid Why are you specifying an IP for socat (not familiar with it)? How are you using it?
Doing a docker-compose up without the IP I don't have any issues:

Creating socat_httpcache_1
Creating socat_socat_httpcache_1
Attaching to socat_httpcache_1, socat_socat_httpcache_1
docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
f2e3b3767982        bobrik/socat        "socat TCP-LISTEN:812"   2 seconds ago       Up 1 seconds        0.0.0.0:8123->8123/tcp   socat_socat_httpcache_1
43dbd35629e0        clue/polipo         "polipo proxyAddress="   3 seconds ago       Up 2 seconds        8123/tcp                 socat_httpcache_1

If your goal is for your http_cache to talk to the socat container, why not put them on the same network and be done with it?

version: '2'
services:
  httpcache:
    restart: always
    image: clue/polipo
    command: proxyAddress=0.0.0.0 allowedClients=0.0.0.0/0 disableIndexing=false disableServersList=false
    mem_limit: 500m
    memswap_limit: 500m
    volumes:
      - /var/cache/polipo
    networks:
      - socatnet

  socat_httpcache:
    restart: always
    hostname: POLIPO1
    image: bobrik/socat
    mem_limit: 50m
    command: TCP-LISTEN:8123,fork,reuseaddr TCP:httpcache:8123
    depends_on:
      - httpcache
    networks:
      - socatnet
networks:
  socatnet:
@marcelmfs
Copy link

@marcelmfs marcelmfs commented Jul 11, 2016

Well, I'm using docker engine 1.11.2 in centos7 in a Continuous Build/Integration flow to automate tests and as far as I can tell, eventually this error pops up even though no container is running (while re-deploying a specific version of the whole service stack). Also it seems related to the fact that sometimes docker engine gets an error on trying to cleanup after the removal of running containers, and some iptables rules might be kept allocating network ports for some reason, maybe related to moby/moby#23371 (comment) - but I'm still not sure about that.

djs55 added a commit to djs55/vpnkit that referenced this issue Jul 11, 2016
…ases

Previously we lacked a function to convert from Uwt.error to Unix.error.
Happily uwt.0.0.3 contains such a useful error converting function, so
we use it.

When a port forward is requested, use `Lwt.catch` to handle the exception
at the top-level and pretty-print the error message for the expected cases

- EADDRINUSE: the port was already 'allocated'
- EADDRNOTAVAIL: the interface IP was not found (probably it exists in a
  VM but not on the host)
- EPERM: insufficient privileges to bind a privileged port

The pretty-printing is intended to match the output of `docker` on
regular Linux.

This is related to [docker/compose#3277]

Signed-off-by: David Scott <dave.scott@docker.com>
djs55 added a commit to djs55/vpnkit that referenced this issue Jul 12, 2016
…ases

Previously we lacked a function to convert from Uwt.error to Unix.error.
Happily uwt.0.0.3 contains such a useful error converting function, so
we use it.

When a port forward is requested, use `Lwt.catch` to handle the exception
at the top-level and pretty-print the error message for the expected cases

- EADDRINUSE: the port was already 'allocated'
- EADDRNOTAVAIL: the interface IP was not found (probably it exists in a
  VM but not on the host)
- EPERM: insufficient privileges to bind a privileged port

The pretty-printing is intended to match the output of `docker` on
regular Linux.

This is related to [docker/compose#3277]

Signed-off-by: David Scott <dave.scott@docker.com>
@igorrKurr
Copy link

@igorrKurr igorrKurr commented Jul 12, 2016

I've had pretty same issue, with Docker for Mac, running postgresql container. So, for me it was caused by postgres running on same port on host system as port specified in my compose config file. Pretty obvious thing, but could be helpful for someone I guess.
Thanks for cool tool. 👍

@marcosalberto
Copy link

@marcosalberto marcosalberto commented Jul 12, 2016

I had a similar problem Docker for Mac running nginx container, my port 80 was being used by apache (native). I used telnet and netstat to see the running service.

@surajadh
Copy link

@surajadh surajadh commented Jul 12, 2016

For me it was squid, I stopped squid and didn't see that anymore. So I think it may have to do with whatever is taking up the port and if we force docker to map that port.

@arimourao
Copy link

@arimourao arimourao commented Nov 18, 2019

3 years and this bug is still alive and well...

@crazyrabbitLTC
Copy link

@crazyrabbitLTC crazyrabbitLTC commented Nov 24, 2019

I have the same bug. So surprised this thread runs all the way till now.

@doughlass
Copy link

@doughlass doughlass commented Nov 26, 2019

sudo apachectl stop this worked for me as it seemed that apache was running on Mac

@FirestarterUA
Copy link

@FirestarterUA FirestarterUA commented Dec 6, 2019

Windows 10:
docker ps -a
docker rm $(docker ps -a -q)
docker-compose up

@abdaizs
Copy link

@abdaizs abdaizs commented Dec 12, 2019

I have the same bug. So surprised this thread runs all the way till now.

This worked for me:

cd /usr/libexec/docker/
ln -s docker-proxy-current docker-proxy
service docker restart
@Jason-2020
Copy link

@Jason-2020 Jason-2020 commented Dec 17, 2019

Having same issues on Oracle Linux. Restarting Docker service helped.

@BearKid
Copy link

@BearKid BearKid commented Dec 26, 2019

This solved my issue on windows :

  • docker-compose down
  • Close docker desktop.
  • Kill docker service
    image
  • Start docker, a popup will ask you to activate docker service via net.exe, accept
  • docker-compose up

the solution above works for me, thanks.

when docker is running, I got this below.
when docker restarted, I still got this below.
when docker service killed and restarted, port occupacy gone, docker works again.

**netstat -aon|findstr "5601"**
  TCP    0.0.0.0:5601           0.0.0.0:0              LISTENING       9512
  TCP    192.168.6.202:55601    203.208.41.75:443      TIME_WAIT       0
  TCP    [::]:5601              [::]:0                 LISTENING       9512

**tasklist|findstr 9512**
com.docker.backend.exe        9512 Services                   0     10,916 K
@morales2k
Copy link

@morales2k morales2k commented Jan 31, 2020

I was having this issue on Ubuntu 18.04, same as for @Jason-2020, restarting the docker service freed the port for me as well in my system.

@Torxed
Copy link

@Torxed Torxed commented Feb 7, 2020

As illogical as it sounds, simply restarting the service worked.

(Did not need to clear any caches, old files or anything.)

@Maoravitan
Copy link

@Maoravitan Maoravitan commented Feb 16, 2020

for windows problem easily can solve:
just restart your docker and try to run again the server.
image

@pollingerMaxi
Copy link

@pollingerMaxi pollingerMaxi commented Feb 23, 2020

As of today, using W10 still having this issue.
Restarted docker, still have the issue.
Closed docker and re opened, still have the issue.

None of the others solutions worked for me :/

@Zedronar
Copy link

@Zedronar Zedronar commented Mar 2, 2020

As of today, using W10 still having this issue.
Restarted docker, still have the issue.
Closed docker and re opened, still have the issue.

None of the others solutions worked for me :/

Try with LoiCha's solution. It's the only workaround that actually worked for me.

@GusAntoniassi
Copy link

@GusAntoniassi GusAntoniassi commented Jun 19, 2020

Just a heads up, I had this problem with Amazon ECS (EC2 mode), when trying to launch a new Task Definition. Turns out something else was already listening on that port in the EC2 host. I stopped the process and the task definition was able to start normally.

@NYCJames
Copy link

@NYCJames NYCJames commented Jun 30, 2020

Stopping the docker service in task manager solved my problem on W10

@fede-r1c0
Copy link

@fede-r1c0 fede-r1c0 commented Jul 8, 2020

@tsantos84 Docker will be running inside a VM when you're using Docker for Mac.

Try the following (I haven't tested this though):

* `docker rm -f $(docker ps -aq)` (will remove all of your containers)

* `docker network rm $(docker network ls -q)` (will remove all of your networks)

* `docker run --rm -v /var/lib/docker/network/files:/network busybox rm /network/local-kv.db`

Then restart Docker for Mac and you should be good to go +1

Thank you! It helped me to quickly solve the problem.

@tsantos84
Copy link

@tsantos84 tsantos84 commented Jul 9, 2020

@tsantos84 Docker will be running inside a VM when you're using Docker for Mac.
Try the following (I haven't tested this though):

* `docker rm -f $(docker ps -aq)` (will remove all of your containers)

* `docker network rm $(docker network ls -q)` (will remove all of your networks)

* `docker run --rm -v /var/lib/docker/network/files:/network busybox rm /network/local-kv.db`

Then restart Docker for Mac and you should be good to go +1

Thank you! It helped me to quickly solve the problem.

Hi @fede-r1c0, I don't know why you mentioned me and probably you wanted to mark another user. Anyway, I'm happy you solve your problem. 👍

@douglasrosa0110
Copy link

@douglasrosa0110 douglasrosa0110 commented Jul 22, 2020

@jamshid
Can you post the o/p of sudo netstat -nlp | grep 8123. Thanks.

and sudo service {nameOfService} stop

@chief93
Copy link

@chief93 chief93 commented Aug 5, 2020

I've encountered same behavior, but for overriding of the service, by creating the docker-compose.override.yml. The files used:

docker-compose.yml:

version: '3.2'
services:
  app:
    build:
      context: ./
    ports:
     - "8000:80"
    volumes:
     - ./:/app

docker-compose.overrride.yml:

version: '3.2'
services:
  app:
    ports:
     - "8001:80"

That gives me following UNEXPECTED error:

ERROR: for my_app_1  Cannot start service app: driver failed programming external connectivity on endpoint my_app_1 (9235372fe636fba32be67f9f101a3432139c691a41fc6d207e53c98e25139a29): Bind for 0.0.0.0:8000 failed: port is already allocated

ERROR: for app  Cannot start service app: driver failed programming external connectivity on endpoint my_app_1 (9235372fe636fba32be67f9f101a3432139c691a41fc6d207e53c98e25139a29): Bind for 0.0.0.0:8000 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

I expected that ports directive in docker-compose.override.yml will override same in the docker-compose.yml (the 8000 port on my machine is already allocated by another application, that's why I tried the overriding) but this does not happen, which is wrong and seems like a bug.

OS: Windows 10
Docker: 19.03.12, build 48a66213fe

@maxvonhippel
Copy link

@maxvonhippel maxvonhippel commented Sep 28, 2020

In my case the issue was due to running consul locally but also in a container.

@salSB
Copy link

@salSB salSB commented Oct 8, 2020

For me it was firewall related, on CentOS 7, run your docker normally when working, then stop firewalld or just restart it, now try to restart that docker container, fails with this error. Restart docker service and try again... works fine.

@FanYikang
Copy link

@FanYikang FanYikang commented Oct 20, 2020

I've encountered same behavior.
This solved my issue on centos7:
ps -ef | grep docker
kill the "...dockerd -H fd:// --containerd=/run/containerd/containerd.sock" process

@JackOfSpade
Copy link

@JackOfSpade JackOfSpade commented Oct 23, 2020

Found this thread, and none of the above helped me.

I am running Ubuntu and I had to use:

sudo service docker restart

I tried prune and all the other commands and docker was sure it had nothing running, but after restarting the service, it all started working again.

THANK YOU! HOLY FK, I SPENT A WHOLE DAY TRYING TO FIX THIS.
THE YEAR IS 2020, THAT'S 4 YEARS AND THIS PROBLEM STILL EXISTS. WTF

@Slisarenko
Copy link

@Slisarenko Slisarenko commented Dec 9, 2020

/etc/init.d/redis-server stop
I'm using docker, in my case, It helped me

@vakenbolt
Copy link

@vakenbolt vakenbolt commented Dec 22, 2020

Just had encountered the same issue complaining about a Postgres container. Curiously, exiting Docker for Mac (desktop) did not solve the trick, I had to actually select Restart from the menu and that fixed the issue.

@nagy135
Copy link

@nagy135 nagy135 commented Jan 24, 2021

just read through this thread, and what seems to be the best answer in 2021 is to restart docker service (sv restart docker, systemctl restart docker, etc ....)
That indeed makes it work again, but why this is happening is unclear still from this thread

@kris-nova
Copy link

@kris-nova kris-nova commented Jan 30, 2021

run;

systemctl restart docker

happened to be kernel networking debugging at the same time - a previous container instance was the culprit

iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8081 -j DNAT --to-destination 172.17.0.2:2342 ! -i docker0: iptables: No chain/target/match by that name.

was what gave it away when iptables couldn't DNAT on the docker0 interface

@torresfelicio
Copy link

@torresfelicio torresfelicio commented Feb 4, 2021

I got it by doing the command
sudo systemctl stop httpd or sudo /etc/init.d/apache2 stop

@mortensassi
Copy link

@mortensassi mortensassi commented Feb 22, 2021

I got it by doing the command
sudo systemctl stop httpd or sudo /etc/init.d/apache2 stop

same here. Reinstalled PHP on my Ubuntu 20.04 and had a simple test running. Seems like apache runs per default on port 80:

# $ sudo netstat -nlp | grep 80
tcp6       0      0 :::80                   :::*                    LISTEN      848/apache2         
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet