Closed damienmarshall closed 4 years ago
Thanks @damienmarshall for the bug report :smile: . It would be helpful to fill out the default issue template to get a better understanding.
Having that said. Is there any output before this exception? sbt native packager uses the native docker binary so you can reproduce step by step what the plugin does.
sbt docker:stage
target/docker/stage
sbt "show dockerBuildCommand"
returns, e.g. something like docker build --force-rm .
This should trigger the same error and give you more logs if they are not in sbt itself.
Thanks for the feedback @muuki88, sorry for the missing details. We tried version 1.7.3 with the same issue (was happening also with 1.1.5).
Its a little bit tricky for us to recreate this manually as its happening within GKE itself. We did run sbt with debug logs in Jenkins and seen the following:
[0m[[32msuccess[0m] [0mAll package validations passed[0m
[0m[[0mdebug[0m] [0mExecuting Native docker build --force-rm -t <redacted_name>.[0m
[0m[[0mdebug[0m] [0mWorking directory /home/jenkins/agent/workspace/<redacted_name>/target/docker/stage[0m
[0m[[0mdebug[0m] [0mForcing garbage collection...[0m
java.lang.RuntimeException: Nonzero exit value: 139
So the native docker command being run is
docker build --force-rm -t <redacted_name> .
We will keep digging here to see if can recreate it too, any advice on extra flags or the like we can set to help determine the issue is very much appreciated!
Thank you again for your help!
Damien
That super good to know that this issue both hits 1.1.5
and 1.7.3
, because a lot of work as been done on the docker plugin between those releases. So it's probably a general issue with the Dockerfile
that is being created.
Speaking of the Dockerfile
. It's located under target/docker/stage/Dockerfile
. You could use this to check for errors.
I google for error code 139 and there seem to be quite some issues
Ok, looks like this is an environment issue. In gke 1.13 it appears that the ability to run the host docker executable from within a docker container has been broken, which causes the segfault: https://laupow.github.io/2019/05/gke-v1.13-upgrade/
I was able to get a partial successful build by having the docker binary in the container itself, so this isn't a library issue/
Thank you for your help @muuki88 ! Appreciate it.
When executing
sbt --debug docker:publish
on Kubernetes version 1.14 in GKE (which enforces docker version 18.09) we're seeing the following error on the latest version:We've tried a few different optoins to no avail! This doesn't happen on an earlier version of Kubernetes in GKE on Docker version 17.03.2-ce.
Any advice on how to proceed with helping to debug whats happening or has anyone seen this issue before?