Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mix distillery.release failing with Elixir 1.9.4 #721

Closed
michelleran opened this issue Dec 26, 2019 · 1 comment
Closed

mix distillery.release failing with Elixir 1.9.4 #721

michelleran opened this issue Dec 26, 2019 · 1 comment

Comments

@michelleran
Copy link

michelleran commented Dec 26, 2019

Steps to reproduce

  1. Add Distillery 2.1 to dependencies
  2. Run mix deps.get
  3. Run mix distillery.init
  4. Run mix distillery.release --env=prod

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):

==> Loading configuration..
==> Assembling release..
==> Building release websocket_chat:0.1.0 using environment prod
==> Discovered applications:
  > elixir-1.9.4
  |
  |  from: /usr/local/Cellar/elixir/1.9.4/bin/../lib/elixir
  |  applications:
  |      :kernel
  |      :stdlib
  |      :compiler
  |  includes: none
  |_____

  > websocket_chat-0.1.0
  |
  |  from: _build/dev/lib/websocket_chat
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :ecto_sql
  |      :myxql
  |      :jason
  |      :cowboy
  |      :distillery
  |      :plug
  |      :plug_cowboy
  |  includes: none
  |_____

  > logger-1.9.4
  |
  |  from: /usr/local/Cellar/elixir/1.9.4/bin/../lib/logger
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > mix-1.9.4
  |
  |  from: /usr/local/Cellar/elixir/1.9.4/bin/../lib/mix
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > iex-1.9.4
  |
  |  from: /usr/local/Cellar/elixir/1.9.4/bin/../lib/iex
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > ecto_sql-3.3.2
  |
  |  from: _build/dev/lib/ecto_sql
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :telemetry
  |      :db_connection
  |      :ecto
  |  includes: none
  |_____

  > telemetry-0.4.1
  |
  |  from: _build/dev/lib/telemetry
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > sasl-3.4.1
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/sasl-3.4.1
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > jason-1.1.2
  |
  |  from: _build/dev/lib/jason
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > compiler-7.5
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/compiler-7.5
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > cowboy-2.7.0
  |
  |  from: _build/dev/lib/cowboy
  |  applications:
  |      :kernel
  |      :stdlib
  |      :crypto
  |      :cowlib
  |      :ranch
  |  includes: none
  |_____

  > ranch-1.7.1
  |
  |  from: _build/dev/lib/ranch
  |  applications:
  |      :kernel
  |      :stdlib
  |      :ssl
  |  includes: none
  |_____

  > ssl-9.5.1
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/ssl-9.5.1
  |  applications:
  |      :crypto
  |      :public_key
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > public_key-1.7.1
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/public_key-1.7.1
  |  applications:
  |      :asn1
  |      :crypto
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > asn1-5.0.9
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/asn1-5.0.9
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > db_connection-2.2.0
  |
  |  from: _build/dev/lib/db_connection
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :connection
  |  includes: none
  |_____

  > connection-1.0.4
  |
  |  from: _build/dev/lib/connection
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > ecto-3.3.1
  |
  |  from: _build/dev/lib/ecto
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :crypto
  |      :decimal
  |  includes: none
  |_____

  > decimal-1.8.1
  |
  |  from: _build/dev/lib/decimal
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > crypto-4.6.3
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/crypto-4.6.3
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > stdlib-3.11
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/stdlib-3.11
  |  applications:
  |      :kernel
  |  includes: none
  |_____

  > cowlib-2.8.0
  |
  |  from: _build/dev/lib/cowlib
  |  applications:
  |      :kernel
  |      :stdlib
  |      :crypto
  |  includes: none
  |_____

  > runtime_tools-1.14
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/runtime_tools-1.14
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > plug-1.8.3
  |
  |  from: _build/dev/lib/plug
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :mime
  |      :plug_crypto
  |  includes: none
  |_____

  > mime-1.3.1
  |
  |  from: _build/dev/lib/mime
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |  includes: none
  |_____

  > distillery-2.1.1
  |
  |  from: _build/dev/lib/distillery
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :runtime_tools
  |      :artificery
  |  includes: none
  |_____

  > artificery-0.4.2
  |
  |  from: _build/dev/lib/artificery
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > plug_cowboy-2.1.0
  |
  |  from: _build/dev/lib/plug_cowboy
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :cowboy
  |      :plug
  |  includes: none
  |_____

  > myxql-0.3.1
  |
  |  from: _build/dev/lib/myxql
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :crypto
  |      :decimal
  |      :db_connection
  |  includes: none
  |_____

  > kernel-6.5.1
  |
  |  from: /usr/local/Cellar/erlang/22.2.1/lib/erlang/lib/kernel-6.5.1
  |  applications: none
  |  includes: none
  |_____

  > plug_crypto-1.0.0
  |
  |  from: _build/dev/lib/plug_crypto
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :crypto
  |  includes: none
  |_____

==> Running validation checks..
    > Distillery.Releases.Checks.Erts * PASS
    > Distillery.Releases.Checks.Cookie * PASS
    > Distillery.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
    release_name=:websocket_chat
    release_version="0.1.0"
    is_upgrade=false
    upgrade_from=:latest
    dev_mode=false
    include_erts=true
    include_src=false
    include_system_libs=true
    erl_opts=""
    run_erl_env=""
    erts_vsn="10.6.1"
    output_dir="_build/dev/rel/websocket_chat"
==> Copying applications to _build/dev/rel/websocket_chat
==> Generating start_erl.data
==> Generating vm.args from rel/vm.args
==> Generating sys.config from config/config.exs
==> Release failed: could not load /Users/Michelle/Desktop/Erlang/websocket_chat/config/config.exs
    (elixir) lib/code.ex:1193: Code.find_file/2
    (elixir) lib/code.ex:758: Code.eval_file/2
    (elixir) lib/config.ex:219: Config.__eval__!/2
    (distillery) lib/distillery/releases/config/providers/elixir.ex:80: Distillery.Releases.Config.Providers.Elixir.eval!/2
    (distillery) lib/distillery/releases/assembler.ex:689: Distillery.Releases.Assembler.generate_base_config/2
    (distillery) lib/distillery/releases/assembler.ex:645: Distillery.Releases.Assembler.generate_sys_config/1
    (distillery) lib/distillery/releases/assembler.ex:288: Distillery.Releases.Assembler.write_release_scripts/1
    (distillery) lib/distillery/releases/assembler.ex:50: Distillery.Releases.Assembler.assemble/1

Description of issue

  • What are the expected results?
  • What version of Distillery? 2.1
  • What OS, Erlang/Elixir versions are you seeing this issue on? OS X 10.15.1, Elixir 1.9.4
  • If possible, also provide your rel/config.exs, as it is often
    my first troubleshooting question, and you'll save us both time :)
~w(rel plugins *.exs)
|> Path.join()
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))

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

environment :dev do
  set dev_mode: true
  set include_erts: false
  set cookie: :"P<MXFZ(uMFq3DBa7X;HLdwp0&d7Eyr=x?J2^9?I{%r>PoP25bax7mE%)uczd_iP|"
end

environment :prod do
  set include_erts: true
  set include_src: false
  set cookie: :"6BYPk4/tB>^Hwd47v`[PfRI)QrGF4k:j/n;Nb67fhBQ2gE%0Aj;AwoC2O)W%6Fci"
  set vm_args: "rel/vm.args"
end

release :websocket_chat do
  set version: current_version(:websocket_chat)
  set applications: [
    :runtime_tools
  ]
end

It's the generated config file (no changes).

  • Is there documentation that says one thing, but Distillery does
    another? If so, please link the doc here so it can be updated if
    it's a documentation issue, or so that the fix can be based around
    what's documented.
  • If this is a runtime configuration issue, please also provide your config file
    (with any sensitive information stripped of course). This is almost
    always necessary to understand why some configuration may not be working.

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!

@michelleran
Copy link
Author

Fixed by creating an empty config/config.exs file!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant