2

This isn't that big of a deal, but I build (on an up-to-date Mac) quite often and something like one time out of ten I get an error like that shown below. Running with --debug or --stacktrace is of no avail as the build ALWAYS works by simply re-running.

Anyone know what might be wrong?

Error response from daemon: no active session for e431bb06cd5af92b929085ed1acf1dd1e07907e458f11f5ed622a4d8400403cb: context deadline exceeded

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':docker:my-product-name:my-project-name:docker'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Update per comments

The error occurs when running a gradle build against the product. This build is several years old - passed through many versions of both gradle (currently 3.5) and docker (currently 18.06). I do not use this build alone - many others do as well. This error is transitory. It occurs with a low frequency, say one out of every ten to twenty builds. Simply re-running the build always results in success - hence my statement that "this isn't that big of a deal...."

JoeG
  • 7,191
  • 10
  • 60
  • 105
  • 1
    What are you try to do here, please provide more details and dockerfile – Sohan Apr 04 '19 at 12:44
  • 1
    https://stackoverflow.com/questions/43401645/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock-is-the-docke/45125251#45125251 This might help you. – Aamir M Meman Apr 04 '19 at 12:52

1 Answers1

5

In case it helps anyone, this error seems to occur when the images being built near the max "Disk image size" set on Docker->Preferences->Disk tab. Increasing that limit or doing a docker image prune command seems to avoid the error.

JoeG
  • 7,191
  • 10
  • 60
  • 105