-
Notifications
You must be signed in to change notification settings - Fork 109
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
docker-compose down fails because networks have active endpoints #263
Comments
It's a race condition. Run |
Yes, I figured that out, but that still leaves a failing Do you know the cause and what the difficulty is in resolving the race condition? On a side note I actually have the proxy disabled in my |
The best we can do is listen for docker events and leave the network as soon as we see docker-compose stop the container, but there's no way to guarantee that we'll see that event and leave the network before docker-compose tries to drop the network as well. The fix would be to hook into docker-compose directly and force it to pause between those two steps while we do our thing, but I'm not aware of any plans to add that kind of functionality to docker-compose -- they've resisted similar proposals in the past. That said, the fix in #218 has worked surprisingly well so far, so just to verify: are you seeing the exact same On that side note: the proxy container still runs because it's used for DNS as well, it just doesn't bind the ports. I really need to rename that container or something to make it more clear. |
Yes the error I'm seeing is:
It does indeed not always happen, I'll see if I can find a pattern or get an idea on how often it happens. Something that may be of influence and I forgot to mention is that I have two networks defined in my I understand the difficulty here and that unfortunately it's not easily resolved. |
Hm yeah I don't think I've ever set up a compose file with two networks, but it would definitely increase the chances of hitting the race condition on each |
How do you have dinghy-http-proxy enter all the networks that are created right now and do the port bindings? I guess the join-networks script does that, but from where is that running? I'm trying to familiarize myself a bit with dinghy, see if I can think of a useful suggestion :). |
Heh I'm all for that, thanks for looking :) You're right that it's all done in join-networks.go, which is called from the reload-nginx script, which is called by docker-gen whenever a docker event is received because of the Procfile config. |
Hi, I never got the chance to really look into it and due to various reasons also to do with some other problem I had with my computer I stopped using dinghy for a while. Lately I've been using it again and this problem seems to have disappeared. I don't know if it's because of changes to dinghy or my computer, but seeing as this ticket is still open I'll close it :). |
Hi,
It seems like #218 is still an issue (or returned). I'm using Dinghy 4.6.1 and http proxy 2.5 with a docker-compose file version 3.2. Not sure what information I can provide that'd be of use.
The text was updated successfully, but these errors were encountered: