I have some issue in heroku deploy
2020-05-29T00:59:40.015516+00:00 app[web.1]: Error: Unable to access jarfile target/barbershop-0.0.1-SNAPSHOT.jar
2020-05-29T00:59:40.082046+00:00 heroku[web.1]: Process exited with status 1
2020-05-29T00:59:40.135944+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-29T00:59:44.102979+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=powerful-taiga-48681.herokuapp.com request_id=759de18f-db81-47ca-8108-452945494b3d fwd="179.180.253.131" dyno= connect= service= status=503 bytes= protocol=https
Error: Unable to access jarfile target/barbershop-0.0.1-SNAPSHOT.jar
Did you check if target/barbershop-0.0.1-SNAPSHOT.jar is in your file system?
I'm deploying by github, but when the deploy is finished is not generating my jar file, so I needed to create an sh file to menage that for me, like this:
start.sh
./mvnw clean package
./mvnw build
./mvnw package
java -Dserver.port=$PORT -jar target/barbershop-0.0.1-SNAPSHOT.jar
Procfile
web: chmod a+x ./mvnw; chmod a+x ./start.sh; ./start.sh
Related
I followed the different pages to deploy a voila ipynb app on heroku:
https://pythonforundergradengineers.com/deploy-jupyter-notebook-voila-heroku.html
https://medium.com/analytics-vidhya/deploying-jupyter-notebook-as-a-web-app-with-heroku-d157b68bcccc
https://github.com/voila-dashboards/voila-heroku
Unfoprtunately, it seems that there is a persisting bug this last month (saw here for instance https://forums.fast.ai/t/heroku-app-wont-deploy/92875/4)
You can find the github repo I am trying to deploy here:
https://github.com/vpicouet/fireball2-etc
The app is base on this Procfile
web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
Unfortunately I get this error
2022-03-27T15:17:49.880973+00:00 app[web.1]: [Voila] Using /tmp to store connection files
2022-03-27T15:17:49.881302+00:00 app[web.1]: [Voila] Storing connection files in /tmp/voila_yih2j7ic.
2022-03-27T15:17:49.881356+00:00 app[web.1]: [Voila] Serving static files from /app/.heroku/python/lib/python3.8/site-packages/voila/static.
2022-03-27T15:17:49.890735+00:00 app[web.1]: [Voila] Voilà is running at:
2022-03-27T15:17:49.890737+00:00 app[web.1]: http://localhost:7758/
2022-03-27T15:17:58.000000+00:00 app[api]: Build succeeded
2022-03-27T15:18:48.015586+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-03-27T15:18:48.055996+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-27T15:18:48.227953+00:00 heroku[web.1]: Process exited with status 137
2022-03-27T15:18:48.274554+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-27T15:24:44.773897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=0b0c1707-d6ae-449a-9059-f2d1d3f8c652 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
2022-03-27T15:39:30.626492+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=af5c3e4a-019f-47c3-a047-e5115ebd5fc7 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
Do you know fow to solve this?
Thanks a lot!
I already tried some ideas on the web:
change
web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
by
worker: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
The answer can be found here: issue 1047
From 0.3.0, Voila will not listen on all interfaces by default (#926) for security reasons. In the case of Heroku, you need to add --Voila.ip=0.0.0.0 to your command in the Procfile to make it work.
See also: https://github.com/voila-dashboards/voila-heroku
Have a working React App that can run locally using the command:
npm start
However, after deploying on Heroku, i receive an application error message.
The application URL is:
https://earth-weather.herokuapp.com/
The Application Log is as follows:
2021-05-12T08:05:27.430345+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2021-05-12T08:05:27.430467+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2021-05-12T08:05:27.430577+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2021-05-12T08:05:27.430864+00:00 app[web.1]: Starting the development server...
2021-05-12T08:05:27.430866+00:00 app[web.1]:
2021-05-12T08:05:27.554932+00:00 heroku[web.1]: Process exited with status 0
2021-05-12T08:05:27.631647+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-12T08:05:28.728857+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=earth-weather.herokuapp.com request_id=f067160f-79fc-4336-8488-ded7e7eb5ddb fwd="183.90.36.67" dyno= connect= service= status=503 bytes= protocol=https
2021-05-12T08:05:30.511115+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=earth-weather.herokuapp.com request_id=059ee61d-fe00-4a69-9966-61506da73911 fwd="183.90.36.67" dyno= connect= service= status=503 bytes= protocol=https
2021-05-12T08:05:31.219414+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=earth-weather.herokuapp.com request_id=0f53eee2-39a0-4311-b8a3-62cb9ffcde3c fwd="35.185.241.102" dyno= connect= service= status=503 bytes= protocol=http
The forked (public) repository is on GitHub.
Grateful for any assistance that can be rendered. - Benjamin
According to your application logs the line Starting the development server, indicates that the application is running on development mode which shouldn't happen as it is a production environment.
The reason,
According to https://devcenter.heroku.com/changelog-items/370
A Procfile is no longer required to run a Node.js app on Heroku. If no Procfile is present in the root directory of your app during the build process, we will check for a scripts.start entry in your package.json file. If such an entry is present, a default Procfile is generated automatically
$ cat Procfile
web: npm start
In your repository, since you have not specified a Procfile. Heroku automatically generates a Procfile that runs your app on development.
Currently, your react-app is treated as a regular node.js application as the node.js buildpack is used which is automatically inferred due to the presence of package.json in the root.
To fix this, you need to use the create-react-app-buildpack on Heroku.
Refer: https://elements.heroku.com/buildpacks/nhutphuongit/create-react-app-buildpack
I need some help deploying Voila app on Heroku. I'm using a free Heroku account.
The GitHub repository can be found here https://github.com/ostasis/One-dimensional-heroku
The notebook runs fine locally using Voila and runs on
Not sure if it helps but its currently at https://nameless-coast-24689.herokuapp.com/
heroku logs --tail
Shows the following
2020-06-28T05:51:24.602001+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-28T05:51:36.982425+00:00 app[web.1]: Traceback (most recent call last):
2020-06-28T05:51:36.982443+00:00 app[web.1]: File "/app/.heroku/python/bin/voila", line 8, in <module>
2020-06-28T05:51:36.982603+00:00 app[web.1]: sys.exit(main())
2020-06-28T05:51:36.982619+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/traitlets/config/application.py", line 663, in launch_instance
2020-06-28T05:51:36.982943+00:00 app[web.1]: app.initialize(argv)
2020-06-28T05:51:36.982944+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/voila/app.py", line 342, in initialize
2020-06-28T05:51:36.983141+00:00 app[web.1]: raise ValueError('provided more than 1 argument: %r' % self.extra_args)
2020-06-28T05:51:36.983159+00:00 app[web.1]: ValueError: provided more than 1 argument: ['—-port=47763', 'one-dimensional-bin-packing.ipynb']
2020-06-28T05:51:37.090291+00:00 heroku[web.1]: Process exited with status 1
2020-06-28T05:51:37.569126+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-28T05:51:51.000000+00:00 app[api]: Build succeeded
2020-06-28T05:53:26.592423+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=nameless-coast-24689.herokuapp.com request_id=8f3e8daa-5127-48cf-a1d0-c819a4e3a820 fwd="203.57.213.219" dyno= connect= service= status=503 bytes= protocol=https
2020-06-28T05:53:27.219010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=nameless-coast-24689.herokuapp.com request_id=3587c11e-08bc-4d88-a715-43534a9e7169 fwd="203.57.213.219" dyno= connect= service= status=503 bytes= protocol=https
On mybinder.org I've used environment.yml below
name: python 3.7.4
channels:
- conda-forge
dependencies:
- python=3.7.4
- appmode=0.7.0
- pandas=0.25.1
- matplotlib=3.1.1
- pip=19.2.3
- pip:
- mip==1.8.2
and on Heruko I've have the following requirements.txt
appmode
matplotlib
mip
pandas
voila
Is there an issue with requirements.txt?
Procfile below
web: voila —-port=$PORT --no-browser one-dimensional-bin-packing.ipynb
runtime.txt below
python-3.7.6
I had the same problem. Managed to fix it by adding the --enable_nbextensions=True option to the voila command in Procfile, so it becomes in your case:
web: voila —-port=$PORT --no-browser --enable_nbextensions=True one-dimensional-bin-packing.ipynb
Found this fix in this example repo: https://github.com/voila-dashboards/voila-heroku
I few days ago I was trying to deploy a docker image of a spring boot app into heroku.
I have the following docker file:
FROM openjdk:8-jdk-alpine
LABEL maintainer="gabigarciagar#gmail.com"
VOLUME /tmp
COPY ./target/*.jar PetApp_Auth.jar
CMD [ "java","-Xmx300m","-Xss512k","-XX:CICompilerCount=2","-Dfile.encoding=UTF-8","-Dspring.profiles.active=heroku","-Djava.security.egd=file:/dev/./urandom","-jar","/PetApp_Auth.jar" ]
also in my application.properties for a heroku profile i have:
spring.profiles.active=heroku
server.port=${PORT}
server.servlet.context-path=/
then i execute the following commands and everithig looks nice:
$ heroku container:push petapp-authserver -a petapp-authserver
Your image has been successfully pushed. You can now release it with the 'container:release' command.
$ heroku container:release petapp-authserver -a petapp-authserver
Releasing images petapp-authserver to petapp-authserver... done
Also the heroku log show that the app is up and also heroku ps
the database connection is perfect also
$ heroku ps -a petapp-authserver
=== petapp-authserver (Free): java -Xmx300m -Xss512k -XX:CICompilerCount\=2 -Dfile.encoding\=UTF-8 -Dspring.profiles.active\=heroku -Djava.security.egd\=file:/dev/./urandom -jar /PetApp_Auth.jar (1)
petapp-authserver.1: up 2020/03/06 21:09:51 +0100 (~ 1m ago)
Then when i try to see swagger-ui o /actuator/health i get the following:
2020-03-06T20:11:58.149484+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=petapp-authserver.herokuapp.com request_id=e88c2499-b1de-4284-a649-1d8df19ae6c0 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=https
2020-03-06T20:11:59.443315+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=petapp-authserver.herokuapp.com request_id=9fa4951a-365c-4b9b-bf63-94f8d6792249 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=https
2020-03-06T20:12:08.185495+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/actuator/health" host=petapp-authserver.herokuapp.com request_id=c4c3382b-43b7-494c-9259-630ce24eb8a4 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=https
2020-03-06T20:12:08.697245+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=petapp-authserver.herokuapp.com request_id=b044b6fe-ba8d-4b3d-8c7c-8e477ea7b609 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=https
2020-03-06T20:12:12.943276+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/actuator/health" host=petapp-authserver.herokuapp.com request_id=6ac05b16-148d-4849-a857-c3d6bed9fe01 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=http
2020-03-06T20:12:13.637589+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=petapp-authserver.herokuapp.com request_id=2c01dbaa-18c5-46f8-8f43-f91ee372a5eb fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=http
2020-03-06T20:12:23.492570+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/swagger-ui.html" host=petapp-authserver.herokuapp.com request_id=2850eb70-1bd5-4737-9505-d59184e95946 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=http
2020-03-06T20:12:23.878827+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=petapp-authserver.herokuapp.com request_id=f83acdef-840a-4e2e-824c-183cfdc50273 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=http
as heroku web said https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running
i execute:
heroku ps:scale petapp-authserver=1 -a petapp-authserver
Scaling dynos... done, now running petapp-authserver at 1:Free
And same error
What I am doing wrong??
I was able to deploy the jar directly and it works
heroku deploy:jar PetApp_AuthServer-V-0.0.0.jar -a petapp-authserver
Uploading PetApp_AuthServer-V-0.0.0.jar
-----> Packaging application...
- app: petapp-authserver
- including: PetApp_AuthServer-V-0.0.0.jar
-----> Creating build...
- file: slug.tgz
- size: 46MB
-----> Uploading build...
- success
-----> Deploying...
remote:
remote: -----> heroku-deploy app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 96.8M
remote: -----> Launching...
remote: Released v12
remote: https://petapp-authserver.herokuapp.com/ deployed to Heroku
remote:
-----> Done
2020-03-13T19:25:13.683982+00:00 heroku[router]: at=info method=POST path="/auth/login" host=petapp-authserver.herokuapp.com request_id=ef9a29b6-c10c-4b82-8088-711d448c3a32 fwd="88.17.74.86" dyno=web.1 connect=1ms service=362ms status=200 bytes=878 protocol=https
2020-03-13T19:25:13.780163+00:00 heroku[router]: at=info method=GET path="/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-600.woff2" host=petapp-authserver.herokuapp.com request_id=f2f6334d-2663-49b0-bd28-b5d287e79b68 fwd="88.17.74.86" dyno=web.1 connect=1ms service=13ms status=200 bytes=12634 protocol=https
Why it perfecty works with jar deploy and not with docker??
I have also tried:
Gabi#MSI MINGW64 /d/Proyectos/PetApp/Back/PetApp_AuthServer (develop)
$ heroku container:release web petapp-authserver -a petapp-authserver
! Expected response to be successful, got 404
Gabi#MSI MINGW64 /d/Proyectos/PetApp/Back/PetApp_AuthServer (develop)
$ heroku container:release web petapp-authserver -a petapp-authserver
! Expected response to be successful, got 404
Gabi#MSI MINGW64 /d/Proyectos/PetApp/Back/PetApp_AuthServer (develop)
$ heroku container:release petapp-authserver -a petapp-authserver
Releasing images petapp-authserver to petapp-authserver... done
Thanks in advance
Finally I solved the question.
The point is that the image in heroku must be named same as the process type, in this case web!
so there are two options. Build and pushing the image by using:
heroku container:push web -a petapp-authserver
or create the image locally and the tag it as registry.heroku.com/petapp-authserver/web
docker tag petapp-authserver registry.heroku.com/petapp-authserver/web
docker push registry.heroku.com/petapp-authserver/web
The push refers to repository [registry.heroku.com/petapp-authserver/web]
eb03575d1edf: Preparing
ceaf9e1ebef5: Preparing
9b9b7f3d56a0: Preparing
f1b5933fe4b5: Preparing
eb03575d1edf: Layer already exists
9b9b7f3d56a0: Layer already exists
f1b5933fe4b5: Layer already exists
ceaf9e1ebef5: Layer already exists
latest: digest: sha256:4c0ae2bba092c07bbd89394216b0bf78f458ba3583e63c8d15e01f6b07d6933e size: 1159
heroku container:release web -a petapp-authserver
Releasing images web to petapp-authserver... done
Now my containers are perfectly running in docker!!
Thank you all
In your Procfile or your heroku.yml you have not specified a web worker.
2020-03-06T20:12:23.878827+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=petapp-authserver.herokuapp.com request_id=f83acdef-840a-4e2e-824c-183cfdc50273 fwd="79.147.107.220" dyno= connect= service= status=503 bytes= protocol=http
For containers you should use heroku.yml. Procfile might even be ignored.
https://devcenter.heroku.com/articles/build-docker-images-heroku-yml
Doing this will get rid of your current H14 errors.
Key point is the process type.
For example, when you deploy the jar and runs it, you can see at your logs:
remote: -----> Discovering process types
remote: Procfile declares types -> web
But you don't see it when using release because you haven't specified a process type.
Can you try to run the release command like this and see if it works?
heroku container:release web petapp-authserver -a petapp-authserver
web is the process type!
So, I am just trying to get a simple Heroku server running Dashing up. So far, I have the dashing and gemlock committed to heroku. Whenever I open the site, I get an error. My logs give me this:
2015-03-14T04:05:37.617789+00:00 heroku[api]: Deploy 2447a74 by #gmail.com
2015-03-14T04:05:37.617789+00:00 heroku[api]: Release v8 created by #gmail.com
2015-03-14T04:05:38.099916+00:00 heroku[web.1]: State changed from crashed to starting
2015-03-14T04:05:41.184158+00:00 heroku[web.1]: Starting process with command bundle exec thin start -R config.ru -e pr
oduction -p 12627
2015-03-14T04:05:43.367997+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:32
:in read': No such file or directory - config.ru (Errno::ENOENT)
2015-03-14T04:05:43.368046+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/rack/adapter/load
er.rb:32:inload'
2015-03-14T04:05:43.368055+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/runner.rb:20
0:in run_command'
2015-03-14T04:05:43.368051+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/controllers/
controller.rb:182:inload_rackup_config'
2015-03-14T04:05:43.368053+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/controllers/
controller.rb:72:in start'
2015-03-14T04:05:43.368064+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/bin/thin:6:in'
2015-03-14T04:05:43.368066+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/thin:23:in load'
2015-03-14T04:05:43.368062+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/thin-1.6.3/lib/thin/runner.rb:15
6:inrun!'
2015-03-14T04:05:43.368069+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/thin:23:in `'
2015-03-14T04:05:44.164461+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-14T04:05:44.157004+00:00 heroku[web.1]: Process exited with status 1
2015-03-14T04:06:01.687293+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-d
awn-3700.herokuapp.com request_id=902320e9-1789-4099-94b2-8b4431d59495 fwd="66.190.95.133" dyno= connect= service= statu
s=503 bytes=
2015-03-14T04:06:02.015965+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" hos
t=pacific-dawn-3700.herokuapp.com request_id=6563d675-9732-4a21-84f4-c486fb6d792e fwd="66.190.95.133" dyno= connect= ser
vice= status=503 bytes=
A config.ru file was never created...I'm new to Ruby and Dashing and Heroku. I've even tried creating a blank config.ru, but even more errors occur...
Found the config file in anothjer directory somehow. Popped it in, it works!