-
Notifications
You must be signed in to change notification settings - Fork 116
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
containers/<id>/attach/ws API not returning logs #1662
Comments
I confirm this is still happening with Docker 17.06.0-ce-rc1. |
I am having this issue now on ubuntu with versions 17.04 through to 17.06 |
Still having the same issue on |
Still having the same issue on |
Works on Version 18.03.0-ce-mac60 (23751), seems to be fixed |
I'm still running into issues on Version 18.03.0-ce-mac60 (23751) whilst the same setup works perfectly on Docker for Ubuntu. Same issue still as OP |
I can confirm that this is still not working with Docker for Mac: 18.03.1-ce-mac65 (24312) Would really like to know if this could have something to do with using @sky-code Could you elaborate how you tested / made it work for you? |
the same as you guys describe. |
I can confirm this is still happening. Version 18.06.1-ce-mac73 (26764) To reproduce, try this python script: https://github.com/aio-libs/aiodocker/blob/master/examples/stdio_stdout.py If I run this on a linux host it works, on mac it does not. |
Having same issue on Windows 10 Enterprise |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
People are still experiencing this issue. |
As a temporary workaround, you can bypass the proxy by setting DOCKER_HOST variable.
If it works correctly, we definitely miss something in our proxy. |
/lifecycle frozen |
I've just tried this with the following script and can confirm that using curl --include \
--no-buffer \
--unix-socket "$HOME/Library/Containers/com.docker.docker/Data/vms/0/00000003.00000948" \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
"http://localhost/containers/my_container/attach/ws?stream=1&stdout=1&stdin=1&logs=1" When connecting to |
Issue still present in docker version 19.03.1, build 74b1e89 on mac (but docker 19 on ubuntu is working like expected). |
Issue still there as of today |
I was unable to use the socket you gave above. However, I did some further research on this. The default socket socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CLIENT:$HOME/Library/Containers/com.docker.docker/Data/docker.raw.sock |
I can confirm the issue is still present on 19.03.5. Using the approach suggested by @MrSerth works. |
WebSocket over Unix socket is still not working Actually doing further tests the workaround was pretty simple.
Can we allow If I add another symlink pointing to By mounting directly with
ok and maybe the easiest fix of it all is to use |
Relates to #126
I'm using macOS Monterey (12.0.1 w/ Intel) with Docker for Mac 4.2.0 (70708) and still experiencing this issue. |
Expected behavior
With
stream=1&stdout=1&logs=1
query parameters, it should return the stdout of the container as websocket messages.In the Linux version (17.05.0-ce), it works as expected.
Actual behavior
But in the macOS version (Docker for Mac, 17.05.0-ce), it does not return anything. Reading the websocket connection indefinitely hangs up.
Information
Used
alpine:latest
container with the command/bin/ash
, created with the following API parameters:My macOS version is Sierra 10.12.5.
Not sure, but I remember that I've experienced this hang-up problem since 10.12.4 and prior Docker versions (may be around API v1.24).
Steps to reproduce the behavior
docker run -d -i -t alpine:latest /bin/ash
socat TCP-LISTEN:5020,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock
ws://localhost:5020/containers/<id>/attach/ws?stream=1&stdout=1&stdin=1&logs=1
and send some shell commands.If it works, the result should be something similar to:
NOTE: In websocket.org echo page, you can append the newline character (so that the container's shell actually execute the command) via developer console:
websocket.send('some command\n');
because the connection is exposed as a globalwebsocket
javascript variable.If I capture the output using Python, the content is the echo-ed shell command, the output of the command, and the shell prompt. (multiple calls to
read()
on websocket may be required)FYI: I took the above screenshot using ssh-ing to a remote Linux server with the SOCKS proxy.
If the right-side logs do not have any "blob"s, it is not working as reported above.
The text was updated successfully, but these errors were encountered: