bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.96k stars 398 forks source link

Unable to run migrations, remote_console #587

Closed lpvm closed 5 years ago

lpvm commented 5 years ago

Steps to reproduce

My devel machine is Linux. Build box is FreeBSD. Production box is a FreeBSD jail.

Release is successfully deployed to production box [PB].

[PB] $ PORT=8084 ./bin/orif foreground 14:24:42.582 [info] Running OrifWeb.Endpoint with Cowboy using http://127.0.0.84:8084

Seems fine.

[PB]

** (exit) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started                                                                                                                   
    (stdlib) gen.erl:261: :gen.do_for_proc/2
    (stdlib) gen_event.erl:197: :gen_event.rpc/2
    (artificery) lib/console.ex:270: Artificery.Console.init/0
    (distillery) lib/entry.ex:42: Mix.Releases.Runtime.Control.main/1
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) lib/code.ex:232: Code.eval_string/3

Migrations don't happen, though.

This is similar to what happens when trying to start production from the development box[DB]:

$ mix edeliver start production -V

EDELIVER ORIF WITH START COMMAND
-----> starting production servers

production node:
  user    : elixir
  host    : orif_orif
  path    : /usr/home/elixir/orif/orif_release
  response: ** (exit) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib) gen.erl:261: :gen.do_for_proc/2
    (stdlib) gen_event.erl:197: :gen_event.rpc/2
    (artificery) lib/console.ex:270: Artificery.Console.init/0
    (distillery) lib/entry.ex:42: Mix.Releases.Runtime.Control.main/1
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) lib/code.ex:232: Code.eval_string/3
** (exit) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib) gen.erl:261: :gen.do_for_proc/2
    (stdlib) gen_event.erl:197: :gen_event.rpc/2
    (artificery) lib/console.ex:270: Artificery.Console.init/0
    (distillery) lib/entry.ex:42: Mix.Releases.Runtime.Control.main/1
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) lib/code.ex:232: Code.eval_string/3
** (exit) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib) gen.erl:261: :gen.do_for_proc/2
    (stdlib) gen_event.erl:197: :gen_event.rpc/2
    (artificery) lib/console.ex:270: Artificery.Console.init/0
    (distillery) lib/entry.ex:42: Mix.Releases.Runtime.Control.main/1
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) lib/code.ex:232: Code.eval_string/3
START DONE!

distillery version: 2.0.10 In PB: Erlang/OTP 19 [erts-8.3.5.6] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Interactive Elixir (1.7.3) - press Ctrl+C to exit (type h() ENTER for help)


~w(rel plugins *.exs)
|> Path.join()
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))

use Mix.Releases.Config,
    default_release: :default,
    default_environment: Mix.env()

environment :dev do
  set dev_mode: true
  set include_erts: false
  set cookie: :"et{/*/gAvr^(}]vVnuBQ)TIw*ukuevDU*1;]e,N<Mwcu})`e}>t.?P%cq!~9LdKi"
end

environment :prod do
  set include_erts: true
  set include_src: false
  set cookie: :"hu3M/KH0b8&~A1I=diGJ{^mn$Gb$Plo./V=>[095goNwAg&TWaw7(*]YjSx^YJ<P"
end

release :orif do
  set version: current_version(:orif)
  set applications: [
    :runtime_tools
  ]
  set commands: [
    migrate: "rel/commands/migrate.sh",
    seed: "rel/commands/seed.sh"
  ]
end```

I'm a newbie in Phoenix and Elixir, the problem should be in something I didn't do correctly, but can't find any help or anyone that helps me on this.
inferiorhumanorgans commented 5 years ago

This is a result of #561