-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Hijack is incompatible with use of CloseNotifier #12845
Comments
Hmm, this is pretty weird, |
ping @pwaller |
I don't understand how this is happening. There's only one call to https://github.com/docker/docker/search?utf8=%E2%9C%93&q=CloseNotifier&type=Code |
@pwaller Dunno :/ Maybe connection is used for two requests? |
@LK4D4 could it be a go bug then? That is really weird. It would be useful to see the exact sequence of events and connections involved. I'm not likely to spend a lot of time delving into this, though it has piqued my curiosity a bit. |
@pwaller I wonder what about |
@delfick Do you |
@LK4D4 I guess it could be keep-alive, but I would expect the effects of the |
@LK4D4 nice find, good to see it's being fixed in general. However, I still don't understand the sequence of events that is causing the problem as reported here. Do we think someone fires off a build, and at some point later tries to attach, and they're still using the same socket to communicate to the daemon? I'm surprised that this triggers the issue. I guess the workaround is to tell clients to kill their keep-alive after a build or before an attach :( |
@pwaller Yeah, seems like many users of api can trigger this with |
I agree, removing the build step makes it work (my docker client reads yaml that embeds the dockerfile and so it always rebuilds the image before running) I'll put in code that recreates the connection for now. Good to see there's an actual fix in the pipeline. |
Just as info: +1 Stacktrace may help a little: Traceback (most recent call last): |
+1 Exception in thread Thread-1: |
+1 |
+1 (docker 1.6.2) |
ping @aanand |
Yeah, we fixed it in docker/compose#1374. |
+1 |
@aanand I have the latest docker and compose but I still receive the error. Any suggestions? |
Still with the RC? That fixed it here for me. |
+1 |
@aanand how do I upgrade to that version on osx? (new to docker) |
@erichonkanen Follow the instructions here: https://github.com/docker/compose/releases/tag/1.3.0rc1 However, there's a known bug with that RC - if you get an SSL error, hold tight for the fix (docker/compose#1474). |
docker-compose 1.2.0 Do I need to upgrade ? Cause I got this error yesterday many times when building my app up with dc up. However it runs fine when I rerun it just after. |
Yep - 1.2.0 has the bug, and running |
@aanand Ok thanks dude! I've noticed as well when I remove all my stuff related to docker (hard way: |
@catuss-a Sorry to hear - please open an issue on https://github.com/docker/compose for that. |
+1 |
👍 I uninstalled the docker-compose binary installed by Kitematic and installed docker-compose via homebrew and this error went away. |
+1 |
1 similar comment
+1 |
s/docker-compose/docker-compose issue/ ^^ |
Yeah, in my case that's the only change I made to resolve the error (upgrade docker-compose). |
The fix is more of a workaround. Where we just instantiate a new docker client to avoid reusing the same connection. |
I think @pwaller was right in saying it was a Go bug. See https://go-review.googlesource.com/#/c/3821/ Docker-compose worked around it in docker/compose#1374 |
@thaJeztah I personally think this can be closed. I don't think there is anything that can be done docker-side, only "client" side (so, in compose, docker-py, etc etc). There is a workaround available (turn off HTTP connection reuse (aka Keep-Alive)), and it will be fixed when go fixes golang/go#9763 which has been marked 1.6Early. I'll try and create some noise for that when their next release cycle starts. |
Thanks @pwaller, I'll close this issue for now, but others feel free to comment here if you think there's something that can be done in Docker itself. |
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
Cause of the bug is Golang libraby. See moby/moby#12845
I'm getting this error after upgrading today.
For example:
|
@aeikenberry Thanks for the report, this is a bug with docker4mac and is pretty much being tracked in docker/compose#3685 |
Hi,
I upgraded my docker to 1.6 today (I believe it was on 1.5, but I'm not 100% sure).
I now have a problem where my docker client gives me
docker.errors.APIError: 500 Server Error: Internal Server Error ("http: Hijack is incompatible with use of CloseNotifier")
when I try to post to/containers/<container>/attach
(my client uses dockerpty and docker-py)It would appear that compose has a similar problem (docker/compose#1275).
If I run an image with the docker cli it does work (for example, docker run -it ubuntu:14.04 /bin/bash)
I'm not entirely sure how to debug this issue.
Thanks
Stephen.
The text was updated successfully, but these errors were encountered: