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

Cannot start service service-name: driver failed programming external connectivity on endpoint container-name: Error starting userland proxy: listen tcp <ip>:port: bind: cannot assign requested address #8106

Closed
messutied opened this issue Feb 8, 2021 · 2 comments

Comments

@messutied
Copy link

messutied commented Feb 8, 2021

Description of the issue

Error when running docker-compose with port bind to external IP address.

Looks related to #3277 but running systemctl restart docker as advised there did not help.

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.18.0, build 8dd22a9
docker-py version: 2.6.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

Output of docker version

Client: Docker Engine - Community
 Version:           20.10.0
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        7287ab3
 Built:             Tue Dec  8 18:59:53 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.0
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       eeddea2
  Built:            Tue Dec  8 18:57:44 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker-compose config
(Make sure to add the relevant -f and other flags)

services:
  postgres:
    image: postgres:9.5
    ports:
    - 127.0.0.1:5432:5432/tcp
    volumes:
  statushq:
    depends_on:
    - postgres
    environment:
      ...
    image: messutiedd/statushq
    ports:
    - 5000:5000/tcp
    - <ip>:4369:4369/tcp
    - 9001:9001/tcp
    - 25:2525/tcp
    restart: always
    volumes:
    ...

Steps to reproduce the issue

  1. Change a port bind in docker-compose.yaml from 4369:4369 to <ip>:4369:4369 (<ip> is a real life external IP which should be the only one with allowed access to that port).
  2. Run docker-compose up

Observed result

docker-compose errors and container fails to start.

Expected result

Container should start successfully and allow connections only on the given IP.

Stacktrace / full error message

Recreating 35e93f062be7_35e93f062be7_docker_statushq_1 ... error

ERROR: for 35e93f062be7_35e93f062be7_docker_statushq_1  Cannot start service statushq: driver failed programming external connectivity on endpoint docker_statushq_1 (79fe33198b8b1933c14706d0bc81dabcfc48111df4fca90d6c2a532a13da28de): Error starting userland proxy: listen tcp <ip>:4369: bind: cannot assign requested address

ERROR: for statushq  Cannot start service statushq: driver failed programming external connectivity on endpoint docker_statushq_1 (79fe33198b8b1933c14706d0bc81dabcfc48111df4fca90d6c2a532a13da28de): Error starting userland proxy: listen tcp <ip>:4369: bind: cannot assign requested address
ERROR: Encountered errors while bringing up the project.

Additional information

OS version / distribution, docker-compose install method, etc.

Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-65-generic x86_64)
docker-compose installed through docker-ce package
@stale
Copy link

stale bot commented Aug 10, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 10, 2021
@stale
Copy link

stale bot commented Aug 18, 2021

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant