testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

Error waiting for log message with Docker 20.10.1

Open PandarinDev opened this issue 5 years ago • 6 comments

Our E2E test suite uses Testcontainers to run our microservices and their dependencies in containers for the duration of our tests. All of the tests were passing until we updated our build nodes to Docker 20.10.1, at which point we started repeatedly getting STDOUT: $Error grabbing logs: unexpected EOF errors, and our Wait.forLogMessage calls started timing out.

Note however, that this issue seems sporadic as about 1 out of 10 builds still passes. After we reverted to Docker 19.03.14 the issue went away. We're using the latest version of Testcontainers (1.15.1 at the time of reporting the issue).

It's unclear to me if this is a Docker/Moby problem or a Testcontainers problem - I figured I'd report it here first to see if anyone else experienced similar issues, as I couldn't find related bug reports on Docker's issue tracker.

PandarinDev avatar Dec 18 '20 13:12 PandarinDev

Unexpected EOF definitely sounds like Docker's issue :)

bsideup avatar Dec 18 '20 14:12 bsideup

I just observed this message as well using testcontainers 1.15.1 (and we have also been seeing testcontainer startups fail sporadically when waiting for log messages lately).

STDOUT: $Error grabbing logs: unexpected EOF

My docker version:

# docker --version
Docker version 20.10.2, build 2291f61

pjroth avatar Jan 20 '21 22:01 pjroth

I observe the same problem after upgrading do 1.15.1 and Docker 20.10.2

pidzama avatar Jan 21 '21 21:01 pidzama

I'm seeing issues with Wait.forListeningPort(), this is while using docker 20.10.2, downgrading to docker 20.10.1 solves the issue.

Not getting EOF's, but the "wait" part doesn't seem to happen

vossim avatar Jan 22 '21 09:01 vossim

Here's the Docker issue that I filed, please comment there instead: https://github.com/moby/moby/issues/41820

Edit: This applies only to the log EOF issues of course, if you are having problems with other wait strategies please track those in a different issue.

PandarinDev avatar Jan 22 '21 09:01 PandarinDev

The port waiting strategy also uses the command's output (logs), so it is the same issue. I am locking the conversation as it seems to be a regression on Docker itself.

bsideup avatar Jan 22 '21 09:01 bsideup