Skip to content
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

Streaming output only happens for -ti flag #56

Open
binocarlos opened this issue Feb 16, 2015 · 5 comments
Open

Streaming output only happens for -ti flag #56

binocarlos opened this issue Feb 16, 2015 · 5 comments

Comments

@binocarlos
Copy link
Contributor

When I do this using DOCKER_HOST=tcp://127.0.0.1:2375 (i.e. pointing @ powerstrip):

docker run --rm -ti ubuntu echo hello - it outputs hello

But when I do this:

docker run --rm ubuntu echo hello - it outputs nothing

Whereas when I do the same thing without pointing at powerstrip - it outputs hello for both scenarios.

There must be a flag in powerstrip that depends on either -t or -i that enables streaming mode - we need to do this for any attach mode - hope this makes sense.

aanm added a commit to aanm/powerstrip that referenced this issue Feb 19, 2015
aanm added a commit to aanm/powerstrip that referenced this issue Feb 19, 2015
@lukemarsden
Copy link
Contributor

We've dug into this and the really weird thing is that docker run ubuntu echo hello works (which, I think, relies on the TCP half-close trick here) when powerstrip is run outside a container. When powerstrip is run inside a container, and port 2375 exposed via -p "2375:2375", docker run ubuntu echo hello does not work.

@lukemarsden
Copy link
Contributor

Current hypothesis is that something to do with the Docker iptables NAT rules is interfering with the TCP half-close.

@lukemarsden
Copy link
Contributor

screenshot 2015-02-20 17 24 29

FTR, this is the difference between powerstrip running outside a container (LHS) vs powerstrip running inside a container. This behaviour is the same both with the golang and Twisted versions.

@lukemarsden
Copy link
Contributor

Proposed workaround presently is to make Docker bind to a UNIX socket rather than a port, bypassing the (currently unproven) Docker NAT half-close issues.

@lukemarsden
Copy link
Contributor

Demonstrated working in https://github.com/ClusterHQ/powerstrip/compare/unix-socket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants