bitwalker / distillery

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

include ERTS challenges after upgrade to Elixir 1.9 #716

Open xpdf opened 4 years ago

xpdf commented 4 years ago

Steps to reproduce

Upgraded to Elixir 1.9 and Distillery 2.1.1 Build release on CentOS7. include ERTS deploy into Container with same release of CentOS7 application will not start

Verbose Logs

Paste the output of the release command you ran with the --verbose flag below in the summary tags (this helps keep the issue easy to navigate):

``` [root@7dadb070fa58 2019.911.9120807]# DEBUG_BOOT=true ./transport_api.sh foreground bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) +1573573106 unset CDPATH +1573573106 ERL_OPTS= +1573573106 RUN_ERL_ENV= +1573573106 DISTILLERY_VSN=2.1.1 +1573573106 export ERL_OPTS +1573573106 export RUN_ERL_ENV +1573573106 export DISTILLERY_VSN +1573573106 uname +1573573106 grep -q Darwin ++1573573106 readlink -f ./transport_api.sh +1573573106 SCRIPT=/app/releases/2019.911.9120807/transport_api.sh +1573573106 export ESCRIPT_NAME +1573573106 ESCRIPT_NAME=/app/releases/2019.911.9120807/transport_api.sh ++1573573106 dirname /app/releases/2019.911.9120807/transport_api.sh +1573573106 SCRIPT_DIR=/app/releases/2019.911.9120807 +++1573573106 dirname /app/releases/2019.911.9120807 ++1573573106 dirname /app/releases +1573573106 RELEASE_ROOT_DIR=/app +1573573106 REL_DIR=/app/releases/ +1573573106 export REL_DIR +1573573106 RELEASE_LIBEXEC_DIR=/app/releases/2019.911.9120807/libexec +1573573106 CONSOLIDATED_DIR=/app/lib/-/consolidated +1573573106 export CONSOLIDATED_DIR +1573573106 START_ERL_DATA=/app/releases/start_erl.data +1573573106 export START_ERL_DATA +1573573106 . /app/releases/2019.911.9120807/libexec/readlink.sh ++1573573106 set -e ++1573573106 '[' '!' -z true ']' ++1573573106 set +x +1573573106 . /app/releases/2019.911.9120807/libexec/logger.sh ++1573573106 set -e ++1573573106 '[' '!' -z true ']' ++1573573106 set +x +1573573106 . /app/releases/2019.911.9120807/libexec/erts.sh ++1573573106 set -e ++1573573106 code_paths=() +++1573573106 erl -noshell -eval 'io:format("~s~n~s~n", [code:root_dir(), erlang:system_info(version)]).' -s erlang halt ++++1573573106 whereis_erts_bin ++++1573573106 '[' -z '' ']' ++++1573573106 set +e ++++++1573573106 type -P erl +++++1573573106 dirname '' ++++1573573106 __erts_bin=. ++++1573573106 set -e ++++1573573106 echo . +++1573573106 __bin=. +++1573573106 '[' -z . ']' +++1573573106 __erl=./erl +++1573573106 __boot_provided=0 +++1573573106 grep '\-boot ' +++1573573106 echo -noshell -eval 'io:format("~s~n~s~n", [code:root_dir(), erlang:system_info(version)]).' -s erlang halt +++1573573106 __erts_included=0 +++1573573106 [[ ./erl =~ ^/app ]] +++1573573106 '[' 0 -eq 1 ']' +++1573573106 '[' 0 -eq 1 ']' +++1573573106 '[' 0 -eq 0 ']' +++1573573106 ./erl -boot start_clean -pa ***snip*** /app/lib/transport_api-2019.911.9120807/consolidated -noshell -eval 'io:format("~s~n~s~n", [code:root_dir(), erlang:system_info(version)]).' -s erlang halt /app/releases/2019.911.9120807/libexec/erts.sh: line 99: ./erl: No such file or directory ++1573573106 __info= ++1573573106 fail 'Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is running' ++1573573106 printf '%s\n' 'Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is running' Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is running ++1573573106 exit 1 ```

Description of issue

environment :internaltest do set include_erts: true

set include_system_libs: false

set include_src: false set cookie: :"**" set pre_start_hooks: "rel/hooks/pre_start" set post_start_hooks: "rel/hooks/post_start" end

N.B.
I added three lines to my Dockerfile and the release ran as expected: ENV REL_NAME transport_api ENV REL_VSN ${VERSION} ENV ERTS_VSN 10.5.3

If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly, as I will have to ask you for all of these things anyway. Help me help you!