docker-maven-plugin: waiting on log randomly doesn't work

Description

The wait on logging will often fail even though the logging statement is plainly visible in the logs. This is most often observed when running in Jenkins. There doesn’t appear to be any pattern as running the build manually afterwards will usually fix it, but not always. Sometimes we have to rerun it two or three times in a row until it decides to see the logging.

Info

  • d-m-p version : 0.20.1
  • Maven version (mvn -v) : 3.3.9
  • Docker version : Docker version 1.13.1, build 092cba3
  • Simply running the build will fail about half of the time. We have a dockerized DropWizard service starting up and then we wait for the service to come up using the following setting:
                                    <wait>
                                        <log>(.*)(org\.eclipse\.jetty\.server\.Server: Started)(.*)</log>
                                        <time>60000</time>
                                    </wait>

We’ve tried various permutations from simply looking for “Started” to the regex noted above. The issue is never resolved. As often as not the following failed build output can be observed:

omitted> INFO  [2017-05-01 19:16:45,229] org.eclipse.jetty.server.AbstractConnector: Started admin@3804a9a8{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
omitted> INFO  [2017-05-01 19:16:45,229] org.eclipse.jetty.server.Server: Started @7161ms
[ERROR] DOCKER> [omitted] "omitted": Timeout after 120039 ms while waiting on log out '(.*)(org\.eclipse\.jetty\.server\.Server: Started)(.*)'
[ERROR] DOCKER> Error occurred during container startup, shutting down...

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 3
  • Comments: 31

Most upvoted comments

I’m still having this issue, with version 0.29.0.

Next try: There’s an update of the unix socket library in release 0.29.0, so it might be worth to check this out whether it fixes this issue.