lpvm
I’m trying to have migrations automatically configured to be setup in the build and production servers as mentioned in Running Migrations, etc. – distillery v1.5.2
The module, the command and the configuration were done.
In the build server, after successful build, when tried to run bin/myapp migrate it failed.
Read this topic made the change me = :orif in the above mentioned module, as suggested but it is not possible to migrate.
The error is:
{"init terminating in do_boot",{{badmatch,{error,{already_loaded,orif}}},[{'Elixir.Orif.ReleaseTasks',seed,0,[{file,"lib/orif/release_tasks.ex"},{line,20}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ()
Crash dump is being written to: erl_crash.dump...done
Read elsewhere that this could happen because of different versions of elixir and erlang.
In fact, my development is done in Linux with:
Elixir 1.7.3 (compiled with Erlang/OTP 21)
and my build box is FreeBSD running:
Elixir 1.7.3 (compiled with Erlang/OTP 19)
Installed the erlang-runtime21: 21.1 package, modified the PATH to have access to the new installed runtime:
Elixir 1.7.3 (compiled with Erlang/OTP 19)
and
Eshell V10.1 (abort with ^G)
"21"
But the same error is daunting me.
What to do to solve this issue?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
The OTP version doesn’t seem to be an issue according to the error message, for me it seems as if you were starting your application twice when it should be started only once.
As I’m not using distillery, I can’t give you much more hints, but you probably need to reveal a bit of your distillery config/scripts.
chensan
I’m just curious, any special reason not using distillery 2?
lpvm
Nice point indeed… I’m using 2.0.10, but read the documentation that first appeared in my search and didn’t take notice of the version.
Will try it later with the modified configuration for migrations.
lpvm
I’ve updated the scripts to the newest 2.0.10 version, as mentioned in Migrations - Distillery Documentation
I’ve created the
orif_devandorif_proddatabases in the build machine.When running
./_build/prod/rel/orif/bin/orif migratein the build box, get this error:chensan
It would be helpful if you could share any distillery related codes here. I have successfully deployed one of my project telegram-bot-for-twitter/lib/release_tasks.ex at master · chenxsan/telegram-bot-for-twitter · GitHub with distillery 2 according to the documentation, so it could be some faults in your configurations.
lpvm
My script is similar to yours, just changing the two lines with the app name.
For the first build, I did this
$ mix edeliver build releaseapp_devandapp_proddatabase./_build/prod/rel/orif/bin/orif foreground./_build/prod/rel/orif/bin/orif migrate(at another terminal)Is this procedure correct? Am I missing something or is something out of order?
NobbZ
Your application can’t start because of missing files, please read the error message given and provide the files that phoenix asks for or remove them from the config.
lpvm
I’ve overcome the missing files issue, I think, that were related to producing static files, but still can’t run the migrations in the production host.
In the build machine:
seems fine, but the migrations raise some problem:
Tried it from the development machine using
edeliver:and when trying to run migrations from the development machine:
@chensan My
release_tasks.exfile is identical to yours, except for the name of the application.This is my first deployment and it’s been very difficult to set all this up.
pierreabreup
You dont need to run
bin/orif/ foregoundorbin/orif start. You only need run your task. In my case, I have this taskinside of the terminal session, I run my task typing
_build/prod/rel/content_proxy/bin/content_proxy command "Elixir.ContentProxy.ReleaseTasks" seedand its works like a charm!It is worth noting
{:ok, _} = Application.ensure_all_started(app)already start to you all children process that you’ve configured in application.exI’ve notice that if I run the app with
startorforegroundbefore runcommand, when I runcommand "Elixir.ContentProxy.ReleaseTasks" seedI get the following error: