0

I've made a simple Java web app using Maven and I'm trying to deploy it. At first, I've got an error:

error: src refspec master does not match any.
error: failed to push some refs to 'git@heroku.com: etc ...'

however, I found a solution to it here: I want make push and get error: src refspec master does not match any

After a while I get the following information in my terminal:

remote:        [INFO] BUILD SUCCESS
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Total time: 11.039 s
remote:        [INFO] Finished at: 2018-10-03T12:25:10+00:00
remote:        [INFO] Final Memory: 24M/172M
remote:        [INFO] ------------------------------------------------------------------------
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote:        Done: 63.5M
remote: -----> Launching...
remote:        Released v3
remote:        https://immense-falls-73440.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.

But when I try heroku open or just go the URL there is just info: Application Error.

Here are my heroku logs:

2018-10-02T20:55:00.135902+00:00 app[api]: Release v1 created by user mymail@mail.com
2018-10-02T20:55:00.225698+00:00 app[api]: Enable Logplex by user mymail@mail.com
2018-10-02T20:55:00.225698+00:00 app[api]: Release v2 created by user mymail@mail.com
2018-10-02T20:55:00.135902+00:00 app[api]: Initial release by user mymail@mail.com
2018-10-02T20:56:51.945196+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=97651816-2e92-4196-add2-4cdd5325ca30 fwd="87.206.210.121"
dyno= connect= service= status=502 bytes= protocol=https
2018-10-02T20:56:52.583382+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=ca3e65a7-6ef1-4253-a946-2d0cc2e99dc1 fwd="87.20
6.210.121" dyno= connect= service= status=502 bytes= protocol=https
2018-10-02T20:56:52.583849+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=9ae591af-d87c-4224-9832-dff44ea68fd1 fwd="87.20
6.210.121" dyno= connect= service= status=502 bytes= protocol=https
2018-10-03T12:24:54.000000+00:00 app[api]: Build started by user mymail@mail.com
2018-10-03T12:25:18.147522+00:00 app[api]: Release v3 created by user mymail@mail.com
2018-10-03T12:25:18.147522+00:00 app[api]: Deploy 6d354e57 by user mymail@mail.com
2018-10-03T12:25:20.000000+00:00 app[api]: Build succeeded
2018-10-03T12:26:45.829110+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=8ebfefdc-d2a9-438d-a224-11f39ec21781 fwd="
87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:26:46.544850+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=2af704d0-9703-4fe6-a173-2691ca0
fdd39 fwd="87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:26:46.538716+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=11cd4e6d-f850-4687-bc6a-863f30e
667f8 fwd="87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https

It is my 1st time ever deploying any Java project to the web and I get confused, I don't really understand what is wrong and how to fix it.

After adding Procfile: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

I've got error again and here are my logs:

2018-10-02T20:55:00.135902+00:00 app[api]: Release v1 created by user mymail@gmail.com
2018-10-02T20:55:00.225698+00:00 app[api]: Enable Logplex by user mymail@gmail.com
2018-10-02T20:55:00.225698+00:00 app[api]: Release v2 created by user mymail@gmail.com
2018-10-02T20:55:00.135902+00:00 app[api]: Initial release by user mymail@gmail.com
2018-10-02T20:56:51.945196+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=97651816-2e92-4196-add2-4cdd5325ca30 fwd="87.206.210.121"
dyno= connect= service= status=502 bytes= protocol=https
2018-10-02T20:56:52.583382+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=ca3e65a7-6ef1-4253-a946-2d0cc2e99dc1 fwd="87.20
6.210.121" dyno= connect= service= status=502 bytes= protocol=https
2018-10-02T20:56:52.583849+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=9ae591af-d87c-4224-9832-dff44ea68fd1 fwd="87.20
6.210.121" dyno= connect= service= status=502 bytes= protocol=https
2018-10-03T12:24:54.000000+00:00 app[api]: Build started by user mymail@gmail.com
2018-10-03T12:25:18.147522+00:00 app[api]: Release v3 created by user mymail@gmail.com
2018-10-03T12:25:18.147522+00:00 app[api]: Deploy 6d354e57 by user mymail@gmail.com
2018-10-03T12:25:20.000000+00:00 app[api]: Build succeeded
2018-10-03T12:26:45.829110+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=8ebfefdc-d2a9-438d-a224-11f39ec21781 fwd="
87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:26:46.544850+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=2af704d0-9703-4fe6-a173-2691ca0
fdd39 fwd="87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:26:46.538716+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=11cd4e6d-f850-4687-bc6a-863f30e
667f8 fwd="87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:29:48.298049+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=4fe1f9d8-e616-4018-8f66-3496194563ee fwd="
87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T12:32:38.432481+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=1b50b089-1aa9-449e-b2f2-7d10182e4955 fwd="
87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T13:01:22.328331+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=83248761-74af-4fa4-b26b-f69a9d8da7b6 fwd="
156.114.128.11" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T13:01:23.283855+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=immense-falls-73440.herokuapp.com request_id=cdc081f2-193a-4490-8e79-7d2c6d8
725a3 fwd="156.114.128.11" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T13:22:47.102561+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=bc9ef838-d37d-4db5-9fb1-338bb5b4cdd2 fwd="
52.32.223.31" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T14:01:33.109607+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=bd761dab-f0fa-439f-9141-39581694d536 fwd="
156.114.160.11" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T20:09:40.000000+00:00 app[api]: Build started by user mymail@gmail.com
2018-10-03T20:09:57.925786+00:00 app[api]: Deploy 27d345c5 by user mymail@gmail.com
2018-10-03T20:09:57.925786+00:00 app[api]: Release v4 created by user mymail@gmail.com
2018-10-03T20:10:00.000000+00:00 app[api]: Build succeeded
2018-10-03T20:34:58.002908+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=immense-falls-73440.herokuapp.com request_id=4a875fae-4370-49e0-b1df-4c4ac578294b fwd="
87.206.210.121" dyno= connect= service= status=503 bytes= protocol=https
Luke_Nuke
  • 461
  • 2
  • 6
  • 23

1 Answers1

1

In your build log it says:

remote:        Procfile declares types -> (none)

This means Heroku won't start any processes, which is why you get the "No web processes running" error.

What does your Procfile look like? It is probably empty. You'll need something like this:

web: java -jar target/myapp.jar

Replace the java command with the appropriate java command to start your app.

codefinger
  • 10,088
  • 7
  • 39
  • 51
  • Hello! I'll definitely try your solution as and let know if that worked :) I was doing it according to this guidance: https://devcenter.heroku.com/articles/procfile#developing-locally And there was info: Deploying to Heroku A Procfile is not necessary to deploy apps written in most languages supported by Heroku. The platform automatically detects the language, and creates a default web process type to boot the application server. So I don't even add Procfile to my project. – Luke_Nuke Oct 03 '18 at 14:16
  • I've added following in the Procfile: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war – Luke_Nuke Oct 03 '18 at 20:40
  • I've added following in the Procfile: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war Saved it as Procfile with no extensions in the main folder of the project then commit and push again, however, I got extended log I've added it to the original post. – Luke_Nuke Oct 03 '18 at 20:53
  • did you see `Procfile declares types -> web` in your build output? try `heroku ps:scale web=1` – codefinger Oct 03 '18 at 21:05
  • It returns me that: $ heroku ps:scale web=1 Scaling dynos... ! ! Couldn't find that process type. So my Procfile is still wrong? – Luke_Nuke Oct 03 '18 at 21:11