Skip to content

Swarm mode with mode=host and port is already in use by service on another host. #31249

@tlvenn

Description

@tlvenn

Hi,

I am using docker swarm mode (1.13) and I have 2 services A and B.
Both services publish ports using exclusively mode=host and both services have placement constraint on a different server.

Now the issue is that both services listen of port 443. Once the first service starts, the second is failing to start with the following error:

Error response from daemon: rpc error: code = 3 desc = port '443' is already in use by service 'A' (pjo2sx4wx3apaejqhgevpkvqs)

I am guessing there is a check somewhere that does not take into account that service A is using mode=host and so it's not mutually exclusive to run services on the same port anymore as far as the services are not running on the same host.

docker version

Client:
 Version:      1.13.0
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   49bf474
 Built:        Tue Jan 17 09:58:26 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.0
 API version:  1.25 (minimum version 1.12)
 Go version:   go1.7.3
 Git commit:   49bf474
 Built:        Tue Jan 17 09:58:26 2017
 OS/Arch:      linux/amd64
 Experimental: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingarea/swarmkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/1.13

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions