Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Docker build #12

Open
tineo opened this issue Mar 23, 2020 · 9 comments
Open

Error Docker build #12

tineo opened this issue Mar 23, 2020 · 9 comments

Comments

@tineo
Copy link

tineo commented Mar 23, 2020

Error docker building in https://github.com/xfthhxk/cambada

Step 5/35 : RUN clojure -R:native-image
 ---> Running in c63c08282b6d
Downloading: org/clojure/clojure/1.10.1/clojure-1.10.1.pom from https://repo1.maven.org/maven2/
Downloading: http-kit/http-kit/2.3.0/http-kit-2.3.0.pom from https://repo.clojars.org/
Downloading: metosin/jsonista/0.2.4/jsonista-0.2.4.pom from https://repo.clojars.org/
Cloning: https://github.com/xfthhxk/cambada
Checking out: https://github.com/xfthhxk/cambada at 8fdc7d29a41620ad3e9e6210fd7140f3a4c7936b
Error building classpath. Missing unknown 8fdc7d29a41620ad3e9e6210fd7140f3a4c7936b
org.eclipse.jgit.api.errors.JGitInternalException: Missing unknown 8fdc7d29a41620ad3e9e6210fd7140f3a4c7936b
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:329)
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:133)
	at clojure.tools.gitlibs.impl$call_with_auth.invokeStatic(impl.clj:50)
	at clojure.tools.gitlibs.impl$call_with_auth.invoke(impl.clj:41)
	at clojure.tools.gitlibs.impl$call_with_auth.invokeStatic(impl.clj:43)
	at clojure.tools.gitlibs.impl$call_with_auth.invoke(impl.clj:41)
	at clojure.tools.gitlibs.impl$git_checkout.invokeStatic(impl.clj:117)
	at clojure.tools.gitlibs.impl$git_checkout.invoke(impl.clj:113)
	at clojure.tools.gitlibs$procure.invokeStatic(gitlibs.clj:52)
	at clojure.tools.gitlibs$procure.invoke(gitlibs.clj:41)
	at clojure.tools.deps.alpha.extensions.git$eval925$fn__927.invoke(git.clj:41)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:189)
	at clojure.tools.deps.alpha$expand_deps.invoke(alpha.clj:172)
	at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:239)
	at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:221)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invokeStatic(make_classpath.clj:59)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invoke(make_classpath.clj:52)
	at clojure.tools.deps.alpha.script.make_classpath$run.invokeStatic(make_classpath.clj:70)
	at clojure.tools.deps.alpha.script.make_classpath$run.invoke(make_classpath.clj:64)
	at clojure.tools.deps.alpha.script.make_classpath$_main.invokeStatic(make_classpath.clj:109)
	at clojure.tools.deps.alpha.script.make_classpath$_main.doInvoke(make_classpath.clj:84)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.main$main_opt.invokeStatic(main.clj:491)
	at clojure.main$main_opt.invoke(main.clj:487)
	at clojure.main$main.invokeStatic(main.clj:598)
	at clojure.main$main.doInvoke(main.clj:561)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:37)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 8fdc7d29a41620ad3e9e6210fd7140f3a4c7936b
	at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:169)
	at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:236)
	at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:877)
	at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:790)
	at org.eclipse.jgit.api.CheckoutCommand.checkoutPaths(CheckoutCommand.java:432)
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:205)
	... 31 more
The command '/bin/sh -c clojure -R:native-image' returned a non-zero code: 1
Makefile:30: recipe for target 'deploy-lambda-via-container' faile
@FrizzyBlues
Copy link

FrizzyBlues commented Jul 12, 2020

Step 7/35 : RUN clojure -A:native-image
---> Running in 26cc3f3205fd
Cleaning target
Creating target/classes
Compiling lambda.core
Creating target/app
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ERROR! Error: Image build request failed with exit status 137

The command '/bin/sh -c clojure -A:native-image' returned a non-zero code: 1
make: *** [deploy-lambda-via-container] Error 1

@dainiusjocas
Copy link
Contributor

Probably out of memory. How much RAM do you have?

@FrizzyBlues
Copy link

@dainiusjocas running on a MBP
Screen Shot 2020-07-13 at 12 05 25 PM

@dainiusjocas
Copy link
Contributor

Give the docker service more memory, like 8gb and try again

@dainiusjocas
Copy link
Contributor

Oh, I see another issue, the fork of cambada is no longer available. This means that the either you or someone at @tokenmill should fix the issue. Or of course, we should use another GraalVM native image builder

@zmedelis
Copy link
Contributor

@dainiusjocas thanks for spotting this. It is now fixed.

@FrizzyBlues
Copy link

FrizzyBlues commented Jul 15, 2020

@dainiusjocas I am new to docker.
I ran the command docker build --target builder -t graalvm-compiler -m 8g . which is still giving me the same error.
Here is the complete log:
`FLaSH:hello-world flash$ docker build --target builder -t graalvm-compiler -m 8g .
Sending build context to Docker daemon 52.22kB
Step 1/10 : FROM tokenmill/clojure:graalvm-ce-19.0.0-tools-deps-1.10.0.442 as builder
---> e9772afd2ed8
Step 2/10 : RUN mkdir -p /usr/src/app
---> Using cache
---> a5a42a551944
Step 3/10 : WORKDIR /usr/src/app
---> Using cache
---> 1fc800d0ead5
Step 4/10 : COPY deps.edn /usr/src/app/
---> Using cache
---> fd8fe54be7b8
Step 5/10 : RUN clojure -R:native-image
---> Using cache
---> 5d3fe8e0b4ce
Step 6/10 : COPY . /usr/src/app
---> d5a32cc49f18
Step 7/10 : RUN clojure -A:native-image
---> Running in 55b8a49ec61c
Cleaning target
Creating target/classes
Compiling lambda.core
Creating target/app
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ERROR! Error: Image build request failed with exit status 137

The command '/bin/sh -c clojure -A:native-image' returned a non-zero code: 1
FLaSH:hello-world flash$`

@FrizzyBlues
Copy link

@zmedelis the update u made was not published to clojars?
lein new clojure-graalvm-aws-lambda your-lambda seems to pull in the same old change

@FrizzyBlues
Copy link

I finally was able to run using
docker build --target builder -t graalvm-compiler -m 8g -c 2 --memory-swap -1 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants