-
Notifications
You must be signed in to change notification settings - Fork 564
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
event listener sometimes doesn't work #101
Comments
One potential fix would be to use Flynn's events. I thought that it was decided that was going to be done originally, but I'm not quite sure what happened. For the discussion see #72 |
I see the exact same problem with the flynn fork of go-dockerclient. What's more if you're running $docker events when you execute code that uses either event mechanism the |
So maybe it's a docker issue? |
It looks like it's a Unix domain socket issue. If you make Docker bind to an additional TCP port: http://docs.docker.io/use/basics/#bind-docker-to-another-hostport-or-a-unix-socket, and then use that as your client endpoint everything works fine. |
You're saying you've found that it works over TCP and not over Unix domain sockets ... but you don't know what the issue is with domain sockets? It could still be an issue with how Docker is using sockets, but least that clarifies it's not a problem with the client. |
Correct. You can run multiple instances of |
Hijacking is just going from HTTP to a TCP stream, which shouldn't be different than what domain sockets are capable of. Btw, this doesn't resolve the CPU issue does it? |
If you point the clients at the TCP endpoint then there's no CPU issue. |
This might be moby/moby#5421. |
We can probably close this issue now. The cause was moby/moby#5421 and it's been fixed a few months ago by moby/moby#5827. |
I just tried multiple times (about 20 times) and was enable to reproduce the issue. Please reopen if you find it again. Thanks for reporting! |
Working on logspout, I found that every other time it runs, it doesn't consume events. I couldn't figure out any other variable. Literally, every other time I'd run the program that just listens for events, it would show events, the other time it would not.
Here is the test program I made to try and reproduce:
https://github.com/progrium/logspout/blob/master/utils/docker-listener.go
Running this will work half the time. Half the time it doesn't. But it doesn't seem like a race just because of how consistently it's every other time.
However, I discovered that by adding and removing an event listener first (uncomment those two lines), it works quite consistently. I cannot figure this out.
The text was updated successfully, but these errors were encountered: