Comments (12)
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
from go-dockerclient.
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 docker events
command flips out and starts sucking CPU.
from go-dockerclient.
So maybe it's a docker issue?
from go-dockerclient.
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.
from go-dockerclient.
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.
from go-dockerclient.
Correct. You can run multiple instances of docker -H tcp://x.x.x.x:yyyy events
and multiple event handling clients that use an endpoint of the form http://x.x.x.x:yyyy
and everything works properly. I suspect, but don't know for sure, that unix domain sockets are not "hijackable" in the way that tcp sockets are.
from go-dockerclient.
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?
from go-dockerclient.
If you point the clients at the TCP endpoint then there's no CPU issue.
from go-dockerclient.
This might be moby/moby#5421.
from go-dockerclient.
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.
from go-dockerclient.
@chuyeow thanks!
@progrium can you try you code again with latest docker version?
from go-dockerclient.
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!
from go-dockerclient.
Related Issues (20)
- Can auth and pull image locally, but not on dev servers HOT 1
- How to use the detach option when calling CreateContainer? HOT 1
- Add support SSH protocol for remote docker
- Please add Internal property into ContainerNetwork HOT 1
- With the Latest Docker Engine v25.x the Version Selection Magic Based on the Call Option 'ver` Tags Results in Failing Calls HOT 2
- New release HOT 3
- Looking for an example of Attach. HOT 5
- Error message may leak credentials used for mounting HOT 15
- RemoveEventListener cause connection leak HOT 6
- How to get the value of NAMES field? HOT 1
- Missing some fields to support Stats API on Docker host uses cgroup2
- What would be the best way to specify version of docker api, so that go-dockerclient can adjust requests and response expectations accordingly? HOT 4
- Error trying to run ddev start after configure drupal 9 on windows HOT 3
- How to run a docker container with GPU support? HOT 1
- How to build an image with specific Tag? HOT 1
- Get error if call func updateService HOT 2
- The module name change issues HOT 5
- EndpointIPAMConfig: Unable to Unmarshal using yaml HOT 3
- About the "Remote" arg in the BuildImageOptions may cause the io error HOT 1
- Wrong error propagation in context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-dockerclient.