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

Step 14 of Heroku app installation fails #140

Open
vini-macuch-silva opened this issue Jul 31, 2023 · 5 comments
Open

Step 14 of Heroku app installation fails #140

vini-macuch-silva opened this issue Jul 31, 2023 · 5 comments

Comments

@vini-macuch-silva
Copy link

vini-macuch-silva commented Jul 31, 2023

Hi,

I'm trying to install an instance of the server app on Heroku as per the tutorial (https://magpie-ea.github.io/magpie-docs/02_using_the_server_app/01_installation/#installation-on-heroku) and I'm having issues with step 14. Just before I report my error, I should say that I was also having issues with step 13 but I managed to solve that by using the buildpack https://github.com/gigalixir/gigalixir-buildpack-phoenix-static instead of the recommended https://github.com/gjaldon/heroku-buildpack-phoenix-static.

Anyway, to my actual problem, I'm getting the following error when trying to run 'Magpie.ReleaseTasks.db_migrate()' > ERROR! Config provider Config.Reader failed with: ** (RuntimeError) environment variable DATABASE_URL is missing. Any clue what the problem might be? Below are the logs.

2023-07-31T14:26:05.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:27:33.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/af827cfc-9a18-49ce-b96d-c6350e5a38e4
2023-07-31T14:29:59.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:30:00.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/0c55c2c9-1928-449f-9791-319423286fe9
2023-07-31T14:38:43.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:38:44.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/11522bb7-069b-4202-ae00-511a476304c8
2023-07-31T14:45:37.101246+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=numbers-741c753b2afe.herokuapp.com request_id=f8560043-6197-49b5-9820-2863f246ab2b fwd="80.192.33.230" dyno= connect= service= status=502 bytes= protocol=https
2023-07-31T14:45:59.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:46:16.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/8a8fe162-e552-46c4-8c5e-7c26a9ee14da
2023-07-31T14:46:45.659105+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=numbers-741c753b2afe.herokuapp.com request_id=685520bd-63ba-449b-b9ac-d1f98974451f fwd="80.192.33.230" dyno= connect= service= status=502 bytes= protocol=https
2023-07-31T14:47:20.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:47:37.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/ff2e3bf8-fee2-4b39-9d54-b4bf67064d77
2023-07-31T14:56:21.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T14:57:48.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/d347a3da-2f77-4850-8f80-c047157e509b
2023-07-31T15:08:14.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T15:09:41.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1bb36ec5-285c-4258-9ad2-349c7496874a/activity/builds/f59cb7c6-7ae7-40e2-a176-40db9c048afd
2023-07-31T15:13:12.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T15:14:46.224191+00:00 app[api]: Release v9 created by user vini.macuch@gmail.com
2023-07-31T15:14:46.224191+00:00 app[api]: Deploy 01e4774d by user vini.macuch@gmail.com
2023-07-31T15:14:46.241214+00:00 app[api]: Scaled to web@1:Basic by user vini.macuch@gmail.com
2023-07-31T15:14:52.096186+00:00 heroku[web.1]: Starting process with command `_build/prod/rel/magpie/bin/magpie start`
2023-07-31T15:14:52.921030+00:00 app[web.1]: bash: line 1: _build/prod/rel/magpie/bin/magpie: No such file or directory
2023-07-31T15:14:53.000000+00:00 app[api]: Build succeeded
2023-07-31T15:14:53.049420+00:00 heroku[web.1]: Process exited with status 127
2023-07-31T15:14:53.082266+00:00 heroku[web.1]: State changed from starting to crashed
2023-07-31T15:14:53.085319+00:00 heroku[web.1]: State changed from crashed to starting
2023-07-31T15:15:00.900739+00:00 heroku[web.1]: Starting process with command `_build/prod/rel/magpie/bin/magpie start`
2023-07-31T15:15:02.669513+00:00 app[web.1]: bash: line 1: _build/prod/rel/magpie/bin/magpie: No such file or directory
2023-07-31T15:15:02.987479+00:00 heroku[web.1]: Process exited with status 127
2023-07-31T15:15:03.017810+00:00 heroku[web.1]: State changed from starting to crashed
2023-07-31T15:15:19.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T15:15:52.227081+00:00 app[api]: Release v10 created by user vini.macuch@gmail.com
2023-07-31T15:15:52.227081+00:00 app[api]: Deploy 01e4774d by user vini.macuch@gmail.com
2023-07-31T15:15:52.529117+00:00 heroku[web.1]: State changed from crashed to starting
2023-07-31T15:15:57.933889+00:00 heroku[web.1]: Starting process with command `_build/prod/rel/magpie/bin/magpie start`
2023-07-31T15:15:58.000000+00:00 app[api]: Build succeeded
2023-07-31T15:15:58.587341+00:00 app[web.1]: bash: line 1: _build/prod/rel/magpie/bin/magpie: No such file or directory
2023-07-31T15:15:58.722409+00:00 heroku[web.1]: Process exited with status 127
2023-07-31T15:15:58.755986+00:00 heroku[web.1]: State changed from starting to crashed
2023-07-31T15:16:01.394597+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=numbers-741c753b2afe.herokuapp.com request_id=3fb9cd23-078e-4bb5-98c5-8eff4354921c fwd="80.192.33.230" dyno= connect= service= status=503 bytes= protocol=https
2023-07-31T15:17:06.000000+00:00 app[api]: Build started by user vini.macuch@gmail.com
2023-07-31T15:17:46.276732+00:00 app[api]: Release v11 created by user vini.macuch@gmail.com
2023-07-31T15:17:46.276732+00:00 app[api]: Deploy 01e4774d by user vini.macuch@gmail.com
2023-07-31T15:17:47.112425+00:00 heroku[web.1]: State changed from crashed to starting
2023-07-31T15:17:53.000000+00:00 app[api]: Build succeeded
2023-07-31T15:17:53.340276+00:00 heroku[web.1]: Starting process with command `_build/prod/rel/magpie/bin/magpie start`
2023-07-31T15:17:55.053187+00:00 app[web.1]: ERROR! Config provider Config.Reader failed with:
2023-07-31T15:17:55.053503+00:00 app[web.1]: ** (RuntimeError) environment variable DATABASE_URL is missing.
2023-07-31T15:17:55.053504+00:00 app[web.1]: For example: ecto://USER:PASS@HOST/DATABASE
2023-07-31T15:17:55.053504+00:00 app[web.1]:
2023-07-31T15:17:55.053504+00:00 app[web.1]: /app/_build/prod/rel/magpie/releases/2.3.4/runtime.exs:10: (file)
2023-07-31T15:17:55.053505+00:00 app[web.1]: (elixir 1.14.3) src/elixir.erl:309: anonymous fn/4 in :elixir.eval_external_handler/1
2023-07-31T15:17:55.053505+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:748: :erl_eval.do_apply/7
2023-07-31T15:17:55.053505+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:492: :erl_eval.expr/6
2023-07-31T15:17:55.053506+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:136: :erl_eval.exprs/6
2023-07-31T15:17:55.053506+00:00 app[web.1]: (elixir 1.14.3) src/elixir.erl:294: :elixir.eval_forms/4
2023-07-31T15:17:55.053506+00:00 app[web.1]: (elixir 1.14.3) lib/module/parallel_checker.ex:110: Module.ParallelChecker.verify/1
2023-07-31T15:17:55.053507+00:00 app[web.1]: (elixir 1.14.3) lib/code.ex:425: Code.validated_eval_string/3
2023-07-31T15:17:55.053507+00:00 app[web.1]:
2023-07-31T15:17:55.054652+00:00 app[web.1]: {"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.RuntimeError',message=><<101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,68,65,84,65,66,65,83,69,95,85,82,76,32,105,115,32,109,105,115,115,105,110,103,46,10,70,111,114,32,101,120,97,109,112,108,101,58,32,101,99,116,111,58,47,47,85,83,69,82,58,80,65,83,83,64,72,79,83,84,47,68,65,84,65,66,65,83,69,10>>},[{elixir_eval,'__FILE__',1,[{file,"/app/_build/prod/rel/magpie/releases/2.3.4/runtime.exs"},{line,10}]},{elixir,'-eval_external_handler/1-fun-2-',4,[{file,"src/elixir.erl"},{line,309},{error_info,#{module=>'Elixir.Exception'}}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,748}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,492}]},{erl_eval,exprs,6,[{file,"erl_eval.erl"},{line,136}]},{elixir,eval_forms,4,[{file,"src/elixir.erl"},{line,294}]},{'Elixir.Module.ParallelChecker',verify,1,[{file,"lib/module/parallel_checker.ex"},{line,110}]},{'Elixir.Code',validated_eval_string,3,[{file,"lib/code.ex"},{line,425}]}]}}
2023-07-31T15:17:55.055003+00:00 app[web.1]: init terminating in do_boot ({,[{elixir_eval,__FILE__,1,[{_},{_}]},{elixir,-eval_external_handler/1-fun-2-,4,[{_},{_},{_}]},{erl_eval,do_apply,7,[{_},{_}]},{erl_eval,expr,6,[{_},{_}]},{erl_eval,exprs,6,[{_},{_}]},{elixir,eval_forms,4,[{_},{_}]},{Elixir.Module.ParallelChecker,verify,1,[{_},{_}]},{Elixir.Code,validated_eval_string,3,[{_},{_}]}]})
2023-07-31T15:17:55.055170+00:00 app[web.1]:
2023-07-31T15:17:55.186135+00:00 app[web.1]: Crash dump is being written to: erl_crash.dump...done
2023-07-31T15:17:55.329850+00:00 heroku[web.1]: Process exited with status 1
2023-07-31T15:17:55.358155+00:00 heroku[web.1]: State changed from starting to crashed
2023-07-31T15:17:58.103559+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=numbers-741c753b2afe.herokuapp.com request_id=a9ad4b5a-f4b3-43fd-995c-2c28fd473305 fwd="80.192.33.230" dyno= connect= service= status=503 bytes= protocol=https
2023-07-31T15:20:29.984769+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=numbers-741c753b2afe.herokuapp.com request_id=eb130f91-9596-4e1f-91ed-79f22452b5a6 fwd="80.192.33.230" dyno= connect= service= status=503 bytes= protocol=https
2023-07-31T15:23:36.792874+00:00 app[api]: Starting process with command `_build/prod/rel/magpie/bin/magpie eval 'Magpie.ReleaseTasks.db_migrate()'` by user vini.macuch@gmail.com
2023-07-31T15:23:45.601743+00:00 heroku[run.1451]: State changed from starting to up
2023-07-31T15:23:46.517838+00:00 heroku[run.1451]: Awaiting client
2023-07-31T15:23:46.544936+00:00 heroku[run.1451]: Starting process with command `_build/prod/rel/magpie/bin/magpie eval 'Magpie.ReleaseTasks.db_migrate()'`
2023-07-31T15:23:50.725437+00:00 heroku[run.1451]: Process exited with status 1
2023-07-31T15:23:50.756042+00:00 heroku[run.1451]: State changed from up to complete
2023-07-31T15:26:51.824540+00:00 heroku[web.1]: State changed from crashed to starting
2023-07-31T15:26:58.340287+00:00 heroku[web.1]: Starting process with command `_build/prod/rel/magpie/bin/magpie start`
2023-07-31T15:27:00.183256+00:00 app[web.1]: ERROR! Config provider Config.Reader failed with:
2023-07-31T15:27:00.183628+00:00 app[web.1]: ** (RuntimeError) environment variable DATABASE_URL is missing.
2023-07-31T15:27:00.183630+00:00 app[web.1]: For example: ecto://USER:PASS@HOST/DATABASE
2023-07-31T15:27:00.183630+00:00 app[web.1]:
2023-07-31T15:27:00.183630+00:00 app[web.1]: /app/_build/prod/rel/magpie/releases/2.3.4/runtime.exs:10: (file)
2023-07-31T15:27:00.183631+00:00 app[web.1]: (elixir 1.14.3) src/elixir.erl:309: anonymous fn/4 in :elixir.eval_external_handler/1
2023-07-31T15:27:00.183631+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:748: :erl_eval.do_apply/7
2023-07-31T15:27:00.183631+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:492: :erl_eval.expr/6
2023-07-31T15:27:00.183631+00:00 app[web.1]: (stdlib 4.2) erl_eval.erl:136: :erl_eval.exprs/6
2023-07-31T15:27:00.183631+00:00 app[web.1]: (elixir 1.14.3) src/elixir.erl:294: :elixir.eval_forms/4
2023-07-31T15:27:00.183631+00:00 app[web.1]: (elixir 1.14.3) lib/module/parallel_checker.ex:110: Module.ParallelChecker.verify/1
2023-07-31T15:27:00.183632+00:00 app[web.1]: (elixir 1.14.3) lib/code.ex:425: Code.validated_eval_string/3
2023-07-31T15:27:00.183632+00:00 app[web.1]:
2023-07-31T15:27:00.185118+00:00 app[web.1]: {"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.RuntimeError',message=><<101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,68,65,84,65,66,65,83,69,95,85,82,76,32,105,115,32,109,105,115,115,105,110,103,46,10,70,111,114,32,101,120,97,109,112,108,101,58,32,101,99,116,111,58,47,47,85,83,69,82,58,80,65,83,83,64,72,79,83,84,47,68,65,84,65,66,65,83,69,10>>},[{elixir_eval,'__FILE__',1,[{file,"/app/_build/prod/rel/magpie/releases/2.3.4/runtime.exs"},{line,10}]},{elixir,'-eval_external_handler/1-fun-2-',4,[{file,"src/elixir.erl"},{line,309},{error_info,#{module=>'Elixir.Exception'}}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,748}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,492}]},{erl_eval,exprs,6,[{file,"erl_eval.erl"},{line,136}]},{elixir,eval_forms,4,[{file,"src/elixir.erl"},{line,294}]},{'Elixir.Module.ParallelChecker',verify,1,[{file,"lib/module/parallel_checker.ex"},{line,110}]},{'Elixir.Code',validated_eval_string,3,[{file,"lib/code.ex"},{line,425}]}]}}
2023-07-31T15:27:00.185667+00:00 app[web.1]: init terminating in do_boot ({,[{elixir_eval,__FILE__,1,[{_},{_}]},{elixir,-eval_external_handler/1-fun-2-,4,[{_},{_},{_}]},{erl_eval,do_apply,7,[{_},{_}]},{erl_eval,expr,6,[{_},{_}]},{erl_eval,exprs,6,[{_},{_}]},{elixir,eval_forms,4,[{_},{_}]},{Elixir.Module.ParallelChecker,verify,1,[{_},{_}]},{Elixir.Code,validated_eval_string,3,[{_},{_}]}]})
2023-07-31T15:27:00.185951+00:00 app[web.1]:
2023-07-31T15:27:00.318201+00:00 app[web.1]: Crash dump is being written to: erl_crash.dump...done
2023-07-31T15:27:00.463396+00:00 heroku[web.1]: Process exited with status 1
2023-07-31T15:27:00.498045+00:00 heroku[web.1]: State changed from starting to crashed
2023-07-31T15:29:30.120268+00:00 app[api]: Starting process with command `_build/prod/rel/magpie/bin/magpie eval 'Magpie.ReleaseTasks.db_migrate()'` by user vini.macuch@gmail.com
2023-07-31T15:29:37.804628+00:00 heroku[run.9785]: Awaiting client
2023-07-31T15:29:37.818539+00:00 heroku[run.9785]: State changed from starting to up
2023-07-31T15:29:37.819566+00:00 heroku[run.9785]: Starting process with command `_build/prod/rel/magpie/bin/magpie eval 'Magpie.ReleaseTasks.db_migrate()'`
2023-07-31T15:29:41.848908+00:00 heroku[run.9785]: Process exited with status 1
2023-07-31T15:29:41.882468+00:00 heroku[run.9785]: State changed from up to complete
@marcelklehr
Copy link
Member

Hey @vini-macuch-silva 👋

Sorry for the delay!
I'm not an expert on the backend, but we do have newer versions of the docs, see here, in order of declining likely-up-to-date-ness:

I heard @x-ji say something recently about heroku not having a free tier anymore or something like that, so that may be why the README nowadays mentions other providers.

@x-ji
Copy link
Member

x-ji commented Aug 6, 2023

Hi @vini-macuch-silva , sorry, I've been away past couple of weeks with intermittent internet access, and have not been able to check my mails regularly. @marcelklehr is correct that the documentation on https://magpie-ea.github.io has been out of date. Could you try the newest documentation on deploying magpie backend via fly.io or Gigalixir and see if you are able to do so successfully? Thanks 🙏

@x-ji
Copy link
Member

x-ji commented Aug 11, 2023

Hi @vini-macuch-silva , were you able to deploy the app successfully with Gigalixir or fly.io? Or is there a preference to use Heroku in this case.

@vini-macuch-silva
Copy link
Author

vini-macuch-silva commented Aug 12, 2023 via email

@marcelklehr
Copy link
Member

as I haven't really made the jump to magpie v. 3.0 just yet

Ah, that's a shame :) The good life is waiting for you ;)

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

3 participants