Coder Social home page Coder Social logo

Comments (12)

benmccann avatar benmccann commented on April 28, 2024

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.

wkharold avatar wkharold commented on April 28, 2024

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.

progrium avatar progrium commented on April 28, 2024

So maybe it's a docker issue?

from go-dockerclient.

wkharold avatar wkharold commented on April 28, 2024

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.

progrium avatar progrium commented on April 28, 2024

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.

wkharold avatar wkharold commented on April 28, 2024

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.

progrium avatar progrium commented on April 28, 2024

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.

wkharold avatar wkharold commented on April 28, 2024

If you point the clients at the TCP endpoint then there's no CPU issue.

from go-dockerclient.

titanous avatar titanous commented on April 28, 2024

This might be moby/moby#5421.

from go-dockerclient.

chuyeow avatar chuyeow commented on April 28, 2024

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.

fsouza avatar fsouza commented on April 28, 2024

@chuyeow thanks!

@progrium can you try you code again with latest docker version?

from go-dockerclient.

fsouza avatar fsouza commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.