You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tracked this down to demuxStream in docker-modem, but I'm having trouble making sense of how it's supposed to work. In my testing, nextDataLength is always a very large integer that is much larger than the buffer.length, so the conditional statement that then writes to the streams is never called. I don't really understand buffers much, so I'm not sure if I'm just implementing something incorrectly, or if there is a bug.
I was wondering if it had something to do with endianess, as I am on an arm processor, but I had a coworker try on an intel processor and they had the same issue.
The text was updated successfully, but these errors were encountered:
Banging my head on this some more, I decided to hack the code in demuxStream, specifically changing this:
}else{if(buffer.length>=nextDataLength){varcontent=bufferSlice(nextDataLength);if(nextDataType===1){stdout.write(content);}else{stderr.write(content);}nextDataType=null;// It's possible we got a "data" that contains multiple messages// Process the next oneprocessData();}}
to this:
}else{varcontent=bufferSlice(nextDataLength);if(nextDataType===1){stdout.write(content);}else{stderr.write(content);}nextDataType=null;if(buffer.length>=nextDataLength){// It's possible we got a "data" that contains multiple messages// Process the next oneprocessData();}}
With this change, I actually received output in stderr! The output I received was this:
pen 'tugboat': no such pool\r\n
If I run the same command using docker run ... the stderr is:
cannot open 'tugboat': no such pool
So the first 8 characters are missing from the stream with my hack. Does this give any clues as to what might be wrong?
I am trying to pass in a stdout and stderr array of streams from docker.run() in dockerode. Something like this:
When I pass things in this way, nothing gets output to stdout or stderr streams. However, when I do the following, I do get the output I expect:
I've tracked this down to demuxStream in docker-modem, but I'm having trouble making sense of how it's supposed to work. In my testing,
nextDataLength
is always a very large integer that is much larger than thebuffer.length
, so the conditional statement that then writes to the streams is never called. I don't really understand buffers much, so I'm not sure if I'm just implementing something incorrectly, or if there is a bug.I was wondering if it had something to do with endianess, as I am on an arm processor, but I had a coworker try on an intel processor and they had the same issue.
The text was updated successfully, but these errors were encountered: