Swarm mode with mode=host and port is already in use by service on another host. #31249
Comments
Right. checkPortConflicts() must be changed to take that into account. |
I also tripped over this issue. Same scenario as the OP (also docker 1.13). I'm trying to publish a service port with |
I have same issue. |
Any updates on this? I tried version 17.04.0-dev, build 3fe2730, but I'm still getting port-in-use error. Happy to help if there's anything I can do... |
@thaJeztah any chance to get someone from Docker assigned to this issue ? As pointed out by @aboch , the function that need to be patched is checkPortConflicts() |
+1, same issue here |
+1, some issue here too!!! |
Opened docker/swarmkit#2177 for this |
Ok newb question here. I see that this issue appears to be fixed in swarmkit - very exciting! Is there a way I can try the fix in docker swarm-mode? I downloaded the latest docker master binaries, however I don't think swarmkit fixes are merged in yet. Or... is swarmkit a separate binary that needs to be updated along with docker? Sorry, I'm a little confused as to how swarmkit fits in with docker. Edit: sorry... I meant "Moby" |
@thaJeztah Thanks, that makes perfect sense. |
@ginjo: It has been merged now. |
Has anybody got this to work? I rebuilt from the master and still have the error. I only deployed the dev version to one host. Should I deploy to all? |
Yes, works great using master binaries from 5/22 |
Will this come in 17.06 and when? |
Yes, it will be part of the 17.06 release, which is currently near the end of the release candidate phase. |
I see the same issue, running docker engine 17.11 on a worker and 17.12 on master. Swarm has a service (portainer:amd64) deployed on port 9000(ingress), and I wish to deploy a service (portainer:arm64) to a specific node using constraint engine.labels.arch == arm64 and port 9000 host network. Is this expected to work? Should I change the service running on ingress to host networking too? EDIT: Yes, apparently the ingress network requires exclusive use of any port on the network. Switching service to host networking resolves this. |
Using
|
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
The text was updated successfully, but these errors were encountered: