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

Build Pack Error when deploying dokku #125

Closed
devjsaon opened this issue Dec 18, 2019 · 8 comments
Closed

Build Pack Error when deploying dokku #125

devjsaon opened this issue Dec 18, 2019 · 8 comments

Comments

@devjsaon
Copy link

Hello,

I'm over 2 days trying to figure out what can be happening on my environment
When trying to rebuild an existing aplication I'm getting the following error:
/tmp/buildpacks/heroku-buildpack-java/bin/compile: line 43: detect_java_version: command not

Below is the command I'm executing...

dokku rebuild:force myapp

Cloning into '/tmp/tmp.VjWEqvvaUa'...
done.
HEAD is now at 1924c62... Merge branch 'backlog#1234' into master_homolog
-----> Building myapp using buildstep...
-----> Installing ENV in build environment ...
-----> Using u1000 to run an application
-----> Java app detected
/tmp/buildpacks/heroku-buildpack-java/bin/compile: line 43: detect_java_version: command not found

Any help is more than welcome.

@jkutner
Copy link
Contributor

jkutner commented Dec 18, 2019

@devjsaon it looks like you might be using an old version of the buildpack--there is no line 43 in the current version of the Java buildpack.

Can you confirm that you're running the latest code in the master branch of this repo?

@devjsaon
Copy link
Author

hi @jkutner

thanks for you quick reply. :)

Yes I'm using old version of buildpack.
I added the following line to my procfile to force specific version of buildpack.

dokku config:set myapp BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-java/releases/tag/v33

and then I've tried to deploy again and I see same error.

Command below...
$ git push
Enter passphrase...
Counting objects: 170, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (170/170), 20.01 KiB | 1.67 MiB/s, done.
Total 170 (delta 81), reused 133 (delta 57)
remote: Cloning into '/tmp/tmp.rSP1fxZgjk'...
remote: done.
remote: HEAD is now at d0a3138... procfile edited
remote: -----> Building myapp using buildstep...
remote: -----> Installing ENV in build environment ...
-----> Using u1000 to run an application
-----> Java app detected
remote: /tmp/buildpacks/heroku-buildpack-java/bin/compile: line 43: detect_java_version: command not found
To 127.0.0.1:myapp
! [remote rejected] master_desenv -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@127.0.0.1:myapp'

@jkutner
Copy link
Contributor

jkutner commented Dec 18, 2019

Can you use a newer version of the buildpack? v33 is almost 5 years old now.

@devjsaon
Copy link
Author

Yes I can, the point is how do I do that?
Before the problem, my procfile had only 1 line. - the one below
web: java -jar target/*.jar -Dserver.port=$PORT --spring.profiles.active=deploy
But since my deploys started to fail, I decided adding it in a try to resolve the problem.
I'm open to any suggestion or change.

@jkutner
Copy link
Contributor

jkutner commented Dec 18, 2019

I think you update the buildpack by running:

$ dokku config:set myapp BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-java/releases/tag/v66

(note the v66)

@devjsaon
Copy link
Author

and the command will be inside my procfile, right?

@devjsaon
Copy link
Author

devjsaon commented Dec 18, 2019

After running the config set from my ubuntu machine I'm still getting error.
Full command below

$ git push docker-d master_desenv:master -f
Enter passphrase for key '/c/Users/.ssh/id_rsa':
Counting objects: 170, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (170/170), 20.02 KiB | 1.82 MiB/s, done.
Total 170 (delta 81), reused 146 (delta 63)
remote: Cloning into '/tmp/tmp.Oz7RqiUKC4'...
remote: done.
remote: HEAD is now at 88b86ab... Teste Julio
remote: -----> Building myapp using buildstep...
remote: -----> Installing ENV in build environment ...
-----> Using u1000 to run an application
-----> Fetching custom buildpack
To 127.0.0.1:myapp
! [remote rejected] master_desenv -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@127.0.0.1:myapp'

@devjsaon devjsaon reopened this Dec 18, 2019
@devjsaon
Copy link
Author

devjsaon commented Dec 18, 2019

I was using the wrong URL for the buildpack.
Insted of usng the url in the command below
dokku config:set myapp BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-java/releases/tag/v66

I changed for
dokku config:set myapp BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-java.git

I'm now being able to deploy again. :)

Thank you @jkutner for following this with me. :)

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

2 participants