Docker 4.12.0 on Windows throws "The pipe has been ended" error
See original GitHub issueHi team,
We’ve started to see error messages with Docker Desktop v4.12.0 on Windows. We are attaching to the container by calling {container_instance}.attach(stream=True, logs=True, demux=True)
and then iterating through the logs streams. This is working fine with earlier versions but it started to throw following error with Docker Desktop v4.12.0.
Traceback (most recent call last):
File "c:\users\administrator\workplace\aws-sam-cli\samcli\local\docker\container.py", line 401, in _write_container_output
for stdout_data, stderr_data in output_itr:
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\types\daemon.py", line 32, in __next__
return next(self._stream)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\api\client.py", line 406, in <genexpr>
gen = (demux_adaptor(*frame) for frame in gen)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\utils\socket.py", line 94, in frames_iter_no_tty
(stream, n) = next_frame_header(socket)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\utils\socket.py", line 66, in next_frame_header
data = read_exactly(socket, 8)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\utils\socket.py", line 51, in read_exactly
next_data = read(socket, n - len(data))
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\utils\socket.py", line 35, in read
return socket.recv(n)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\transport\npipesocket.py", line 23, in wrapped
return f(self, *args, **kwargs)
File "c:\users\administrator\workplace\aws-sam-cli\venv\lib\site-packages\docker\transport\npipesocket.py", line 117, in recv
err, data = win32file.ReadFile(self._handle, bufsize)
pywintypes.error: (109, 'ReadFile', 'The pipe has been ended.')
A simplified version of how we are reading the logs;
# stdout and stderr are StreamWriter's that is been provided earlier
logs_itr = container.attach(stream=True, logs=True, demux=True)
for stdout_data, stderr_data in output_itr:
if stdout_data and stdout:
stdout.write(stdout_data)
if stderr_data and stderr:
stderr.write(stderr_data)
See related issue here: https://github.com/aws/aws-sam-cli/issues/4222
Thanks!
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Sam Build Fails with pywintypes.error: (109, 'ReadFile', 'The ...
Description: When ever I do a sam build I get an error that says "pywintypes.error: (109, 'ReadFile', 'The pipe has been ended.')".
Read more >docker python package 4.3.1 not working with Docker Desktop ...
error : (109, 'ReadFile', 'The pipe has been ended.') python · docker · Share.
Read more >open \\.\pipe\docker_engine_windows: The system cannot find ...
I've been to many forums and tried many things, it's not working at all. PS C:\temp> docker config ls Error response from daemon:...
Read more >Changelog - Cypress Documentation
Cypress now throws an error if any Cypress commands are invoked from inside a .should() ... This feature had been previously removed in...
Read more >What to Do if Docker Desktop for Windows Does Not Start
I got the Docker command line application in the Command Prompt, but the hello-world example ended with an error:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exact same thing happens for container.exec_run, only downgrade to earlier version of Docker Desktop fixes it.
Works great, updated Docker Desktop to 4.13.1 and my scripts are happy again 😃