Closed lpvm closed 5 years ago
Was it compiled on that or an identical FreeBSD system as well? Or was it compiled elsewhere (like a linux or mac system) then copied to the FreeBSD system?
If you mean what BUILD_* refer to:
BUILD_HOST="fbsd0"
BUILD_USER="myuser"
BUILD_AT="/usr/home/myuser/orif/orif_build"
It refers to a FreeBSD machine identical to the production one.
I'm unsure what BUILD_
is referencing, that's not a distillery thing, but have you tried, just as a test, to fully compile it on the endpoint machine (no other) and run the distillery built release (directly, no other tools) as a test? The BEAM is very sensitive to differences between systems, hence why it is recommended to compile on the same machine it will run on (or otherwise a docker container or so that can guarantee identical setups).
Those commands are from edeliver
.
In the build machine (FreeBSD):
$ mix release --env=prod
warning: found quoted keyword "test" but the quotes are not required. Note that keywords are always atoms, even when quoted, and quotes should only be used to introduce keywords with foreign characters in them
mix.exs:63
==> Assembling release..
==> Building release orif:0.0.1 using environment prod
==> Including ERTS 8.3.5.6 from /usr/local/lib/erlang/erts-8.3.5.6
==> Packaging release..
Release successfully built!
To start the release you have built, you can use one of the following tasks:
# start a shell, like 'iex -S mix'
> _build/dev/rel/orif/bin/orif console
# start in the foreground, like 'mix run --no-halt'
> _build/dev/rel/orif/bin/orif foreground
# start in the background, must be stopped with the 'stop' command
> _build/dev/rel/orif/bin/orif start
If you started a release elsewhere, and wish to connect to it:
# connects a local shell to the running node
> _build/dev/rel/orif/bin/orif remote_console
# connects directly to the running node's console
> _build/dev/rel/orif/bin/orif attach
For a complete listing of commands and their use:
> _build/dev/rel/orif/bin/orif help
dev
produces the release fine, too.
But when trying to run it with _build/prod/rel/orif/bin/orif foreground
(either for dev or prod) there's a crash dump. Please see the attached file.
erl_crash.dump.gz
Had same problem on FreeBSD production box, fixed after installing sudo pkg install ncurses
I solved this issue.
After inspecting the output of the crash, the problem is that the erlang
version installed in the FreeBSD box is still 19, so the bcrypt
package had to be downgraded, as mentioned in https://github.com/riverrun/bcrypt_elixir
Steps to reproduce
$ mix deliver start production --verbose
The development is done in Linux The build and release are in two FreeBSD computers of the same release 11.2.Verbose Logs
Description of issue
What are the expected results? I expected that the application could start, but it doesn't.
What version of Distillery? 2.0.10
What OS, Erlang/Elixir versions are you seeing this issue on? Development box:
Production box:
rel/config.exs
, as it is often my first troubleshooting question, and you'll save us both time :)use Mix.Releases.Config,
This sets the default release built by
mix release
environment :dev do set dev_mode: true set include_erts: false set cookie: :"ei"
end environment :prod do set include_erts: true set include_src: false set cookie: :"h"
end release :orif do set version: current_version(:orif) set applications: [ :runtime_tools ] end