mattfara50

mattfara50

Cannot run a Distillery release

I’m new to Distillery, and I’m following this guide. I added the version “2.1” dependency and ran the following commands:

mix do deps.get, compile
mix distillery.init
mix distillery.release
_build/dev/rel/<my app>/bin/<my app> start

I did not update the default config.
I got this error after the last command:

sed: read error on ~/Projects/<my app>/quickest_route/_build/dev/rel/<my app>/releases/RELEASES: No such file or directory
init terminating in do_boot ({undef,[{Elixir.Distillery.Releases.Config.Provider,init,[[_]],[]},{init,eval_script,2,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
=CRASH REPORT==== 8-Apr-2023::18:54:29.078711 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.79.0>
    registered_name: []
    exception exit: {bad_return,
                        {{elixir,start,[normal,[]]},
                         {'EXIT',
                             {undef,
                                 [{elixir,start,[normal,[]],[]},
                                  {application_master,start_it_old,4,
                                      [{file,"application_master.erl"},
                                       {line,293}]}]}}}}
      in function  application_master:init/4 (application_master.erl, line 142)
    ancestors: [<0.78.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.80.0>,normal}]
    links: [<0.78.0>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 233
    stack_size: 28
    reductions: 174
  neighbours:

=INFO REPORT==== 8-Apr-2023::18:54:29.105627 ===
    application: elixir
    exited: {bad_return,
                {{elixir,start,[normal,[]]},
                 {'EXIT',
                     {undef,
                         [{elixir,start,[normal,[]],[]},
                          {application_master,start_it_old,4,
                              [{file,"application_master.erl"},
                               {line,293}]}]}}}}
    type: permanent

{"init terminating in do_boot",{undef,[{'Elixir.Distillery.Releases.Config.Provider',init,[[]],[]},{init,eval_script,2,[]},{init,do_boot,3,[]}]}}

I got the same sort of error output from running the release in the other ways:

_build/dev/rel/quickest_route/bin/quickest_route foreground
_build/dev/rel/quickest_route/bin/quickest_route console

I tried simply creating a RELEASES file where it said it was missing. That didn’t help.

First Post!

stevensonmt

stevensonmt

I have no experience directly but based on the error and some googling, I wonder if you have not set the expected config provider. See Handling Configuration – distillery v2.0.0-rc.6 specifically:

Out of the box, Distillery also includes a provider for Mix.Config, which allows you to use your config.exs files with a release. You have to opt in to this provider, because Mix.Config blends compile-time and runtime configuration options into one file, and many legacy configs make assumptions about the environment the config is evaluated in (namely that a Mix project is available, or that commands like git can be invoked and have meaningful output). You can use it like so:

environment :prod do
  set config_providers: [
    {Mix.Releases.Config.Providers.Elixir, ["${RELEASE_ROOT_DIR}/var/config.exs"]}
  ]
end

The path given here is where Distillery will place the config.exs which is built for the release (it combines config.exs and any of it’s imported files for the environment the release is built in, to a single file).

It seems that this is the same issue as raised in this github issue.

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement