Release build fails with 'No such module: asn1ct' error
thehunmonkgroup opened this issue · 15 comments
Steps to reproduce
Trying to build production version of my app using latest release of distillery, getting 'No such module: asn1ct' error.
Debian Stretch, erlang-asn1 package is installed, and that module seems available:
poof@poof:/var/local/git/poof/staging$ iex
Erlang/OTP 21 [erts-10.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1]
Interactive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> import :asn1ct
:asn1ct
I'm a bit lost how to debug further from here!
Verbose Logs
poof@poof:/var/local/git/poof/staging$ MIX_ENV=prod /usr/local/bin/mix release --verbose --upgrade --env=prod
==> Loading configuration..
==> Assembling release..
==> Building release poof:1.2.3+005 using environment prod
==> Discovered applications:
> phoenix_ecto-3.6.0
|
| from: _build/prod/lib/phoenix_ecto
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ecto
| :plug
| includes: none
|_____
> plug_crypto-1.0.0
|
| from: _build/prod/lib/plug_crypto
| applications:
| :kernel
| :stdlib
| :elixir
| :crypto
| includes: none
|_____
> kernel-6.2
|
| from: /usr/lib/erlang/lib/kernel-6.2
| applications: none
| includes: none
|_____
> cowlib-1.0.2
|
| from: _build/prod/lib/cowlib
| applications:
| :kernel
| :stdlib
| :crypto
| includes: none
|_____
> ranch-1.3.2
|
| from: _build/prod/lib/ranch
| applications:
| :kernel
| :stdlib
| :ssl
| includes: none
|_____
> cowboy-1.1.2
|
| from: _build/prod/lib/cowboy
| applications:
| :kernel
| :stdlib
| :ranch
| :cowlib
| :crypto
| includes: none
|_____
> plug_cowboy-1.0.0
|
| from: _build/prod/lib/plug_cowboy
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :cowboy
| :plug
| includes: none
|_____
> artificery-0.2.6
|
| from: _build/prod/lib/artificery
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> distillery-2.0.12
|
| from: _build/prod/lib/distillery
| applications:
| :kernel
| :stdlib
| :elixir
| :runtime_tools
| :artificery
| includes: none
|_____
> decimal-1.6.0
|
| from: _build/prod/lib/decimal
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> connection-1.0.4
|
| from: _build/prod/lib/connection
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> db_connection-1.1.3
|
| from: _build/prod/lib/db_connection
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :connection
| includes: none
|_____
> postgrex-0.13.5
|
| from: _build/prod/lib/postgrex
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :db_connection
| :decimal
| :crypto
| includes: none
|_____
> eex-1.7.4
|
| from: /usr/local/lib/elixir/bin/../lib/eex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mime-1.3.1
|
| from: _build/prod/lib/mime
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| includes: none
|_____
> plug-1.7.1
|
| from: _build/prod/lib/plug
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :mime
| :plug_crypto
| includes: none
|_____
> phoenix-1.3.4
|
| from: _build/prod/lib/phoenix
| applications:
| :kernel
| :stdlib
| :elixir
| :plug
| :poison
| :logger
| :eex
| :phoenix_pubsub
| :crypto
| includes: none
|_____
> basic_auth-2.2.4
|
| from: _build/prod/lib/basic_auth
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :cowboy
| :plug
| includes: none
|_____
> uuid-1.1.8
|
| from: _build/prod/lib/uuid
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> inets-7.0.3
|
| from: /usr/lib/erlang/lib/inets-7.0.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> runtime_tools-1.13.1
|
| from: /usr/lib/erlang/lib/runtime_tools-1.13.1
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> apex-1.2.1
|
| from: _build/prod/lib/apex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> cloudsigma_api_wrapper-0.2.1
|
| from: _build/prod/lib/cloudsigma_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> stdlib-3.7
|
| from: /usr/lib/erlang/lib/stdlib-3.7
| applications:
| :kernel
| includes: none
|_____
> phoenix_pubsub-1.1.1
|
| from: _build/prod/lib/phoenix_pubsub
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :crypto
| includes: none
|_____
> ex_aws_ec2-2.0.1
|
| from: _build/prod/lib/ex_aws_ec2
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ex_aws
| includes: none
|_____
> poolboy-1.5.1
|
| from: _build/prod/lib/poolboy
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> ecto-2.2.11
|
| from: _build/prod/lib/ecto
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :decimal
| :poolboy
| :crypto
| includes: none
|_____
> crypto-4.4
|
| from: /usr/lib/erlang/lib/crypto-4.4
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> xmerl-1.3.18
|
| from: /usr/lib/erlang/lib/xmerl-1.3.18
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> sweet_xml-0.6.5
|
| from: _build/prod/lib/sweet_xml
| applications:
| :kernel
| :stdlib
| :elixir
| :xmerl
| includes: none
|_____
> phoenix_html-2.13.1
|
| from: _build/prod/lib/phoenix_html
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :plug
| includes: none
|_____
> certifi-2.4.2
|
| from: _build/prod/lib/certifi
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> metrics-1.0.1
|
| from: _build/prod/lib/metrics
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> ssl_verify_fun-1.1.4
|
| from: _build/prod/lib/ssl_verify_fun
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mimerl-1.0.2
|
| from: _build/prod/lib/mimerl
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> unicode_util_compat-0.4.1
|
| from: _build/prod/lib/unicode_util_compat
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> idna-6.0.0
|
| from: _build/prod/lib/idna
| applications:
| :kernel
| :stdlib
| :unicode_util_compat
| includes: none
|_____
> ssl-9.1
|
| from: /usr/lib/erlang/lib/ssl-9.1
| applications:
| :crypto
| :public_key
| :kernel
| :stdlib
| includes: none
|_____
> public_key-1.6.4
|
| from: /usr/lib/erlang/lib/public_key-1.6.4
| applications:
| :asn1
| :crypto
| :kernel
| :stdlib
| includes: none
|_____
> asn1-5.0.8
|
| from: /usr/lib/erlang/lib/asn1-5.0.8
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> hackney-1.15.0
|
| from: _build/prod/lib/hackney
| applications:
| :kernel
| :stdlib
| :crypto
| :asn1
| :public_key
| :ssl
| :idna
| :mimerl
| :certifi
| :ssl_verify_fun
| :metrics
| includes: none
|_____
> combine-0.10.0
|
| from: _build/prod/lib/combine
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> ex_aws-2.0.2
|
| from: _build/prod/lib/ex_aws
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :crypto
| includes: none
|_____
> xml_builder-0.1.2
|
| from: _build/prod/lib/xml_builder
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> ex_aws_route53-2.0.2
|
| from: _build/prod/lib/ex_aws_route53
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :xml_builder
| :ex_aws
| includes: none
|_____
> compiler-7.3
|
| from: /usr/lib/erlang/lib/compiler-7.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> tzdata-0.5.19
|
| from: _build/prod/lib/tzdata
| applications:
| :kernel
| :stdlib
| :elixir
| :hackney
| :logger
| includes: none
|_____
> tesla-1.2.1
|
| from: _build/prod/lib/tesla
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ssl
| :inets
| includes: none
|_____
> timex_ecto-3.3.0
|
| from: _build/prod/lib/timex_ecto
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ecto
| :timex
| includes: none
|_____
> poison-3.1.0
|
| from: _build/prod/lib/poison
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> jason-1.1.2
|
| from: _build/prod/lib/jason
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> sasl-3.3
|
| from: /usr/lib/erlang/lib/sasl-3.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> swoosh-0.21.0
|
| from: _build/prod/lib/swoosh
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :jason
| :hackney
| :mime
| includes: none
|_____
> profitbricks_api_wrapper-0.2.1
|
| from: _build/prod/lib/profitbricks_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> digitalocean_api_wrapper-0.2.1
|
| from: _build/prod/lib/digitalocean_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> dynamic_server_manager-0.0.10
|
| from: _build/prod/lib/dynamic_server_manager
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :jason
| :poison
| :hackney
| :timex
| :sweet_xml
| :ex_aws
| :ex_aws_route53
| :ex_aws_ec2
| :uuid
| :tesla
| :cloudsigma_api_wrapper
| :digitalocean_api_wrapper
| :profitbricks_api_wrapper
| includes: none
|_____
> timex-3.4.2
|
| from: _build/prod/lib/timex
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :tzdata
| :gettext
| :combine
| includes: none
|_____
> gettext-0.16.1
|
| from: _build/prod/lib/gettext
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| includes: none
|_____
> logger-1.7.4
|
| from: /usr/local/lib/elixir/bin/../lib/logger
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> poof-1.2.3+005
|
| from: _build/prod/lib/poof
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :runtime_tools
| :gettext
| :jason
| :timex
| :phoenix_pubsub
| :uuid
| :tesla
| :dynamic_server_manager
| :postgrex
| :timex_ecto
| :distillery
| :phoenix
| :phoenix_html
| :plug_cowboy
| :basic_auth
| :swoosh
| :phoenix_ecto
| includes: none
|_____
> iex-1.7.4
|
| from: /usr/local/lib/elixir/bin/../lib/iex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mix-1.7.4
|
| from: /usr/local/lib/elixir/bin/../lib/mix
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> elixir-1.7.4
|
| from: /usr/local/lib/elixir/bin/../lib/elixir
| applications:
| :kernel
| :stdlib
| :compiler
| includes: none
|_____
==> Running validation checks..
> Mix.Releases.Checks.Erts * PASS
> Mix.Releases.Checks.Cookie * PASS
> Mix.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
release_name=:poof
release_version="1.2.3+005"
is_upgrade=true
upgrade_from="1.2.3+003"
dev_mode=false
include_erts=true
include_src=false
include_system_libs=true
erl_opts=""
run_erl_env=""
erts_vsn="10.2"
output_dir="_build/prod/rel/poof"
==> Copying applications to _build/prod/rel/poof
==> Generating relup for poof
==> asn1 has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for asn1 5.0.7 -> 5.0.8
==> compiler has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for compiler 7.2.5 -> 7.3
==> crypto has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for crypto 4.3.3 -> 4.4
==> decimal requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for decimal 1.5.0 -> 1.6.0
==> distillery requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for distillery 2.0.10 -> 2.0.12
==> eex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for eex 1.7.3 -> 1.7.4
==> elixir requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for elixir 1.7.3 -> 1.7.4
==> gettext requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for gettext 0.16.0 -> 0.16.1
==> hackney requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for hackney 1.14.3 -> 1.15.0
==> iex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for iex 1.7.3 -> 1.7.4
==> inets has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for inets 7.0.2 -> 7.0.3
==> kernel has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for kernel 6.1 -> 6.2
==> logger requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for logger 1.7.3 -> 1.7.4
==> mime requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for mime 1.3.0 -> 1.3.1
==> mix requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for mix 1.7.3 -> 1.7.4
==> phoenix_ecto requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for phoenix_ecto 3.5.0 -> 3.6.0
==> phoenix_html requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for phoenix_html 2.12.0 -> 2.13.1
==> poof requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for poof 1.2.3+003 -> 1.2.3+005
==> public_key has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for public_key 1.6.2 -> 1.6.4
==> sasl has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for sasl 3.2.1 -> 3.3
==> ssl has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for ssl 9.0.2 -> 9.1
==> stdlib has an appup file, but it is invalid for this release,
Backing up appfile with .bak extension and generating new one..
==> Generated .appup for stdlib 3.6 -> 3.7
==> swoosh requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for swoosh 0.20.0 -> 0.21.0
==> tesla requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for tesla 1.2.0 -> 1.2.1
==> timex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for timex 3.4.1 -> 3.4.2
==> Release failed with multiple errors:
No such module: asn1ct
Description of issue
-
What are the expected results? Build should succeed
-
What version of Distillery? 2.0.12
-
What OS, Erlang/Elixir versions are you seeing this issue on?
Erlang/OTP 21 [erts-10.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1]
Elixir 1.7.4 (compiled with Erlang/OTP 20) -
If possible, also provide your
rel/config.exs
, as it is often
my first troubleshooting question, and you'll save us both time :)
# Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/configuration.html
# You may define one or more environments in this file,
# an environment's settings will override those of a release
# when building in that environment, this combination of release
# and environment configuration is called a profile
environment :dev do
# If you are running Phoenix, you should make sure that
# server: true is set and the code reloader is disabled,
# even in dev mode.
# It is recommended that you build with MIX_ENV=prod and pass
# the --env flag to Distillery explicitly if you want to use
# dev mode.
set dev_mode: true
set include_erts: false
set cookie: :"zmX|QZgJjoSTA%I!t}VE$PQB,Q$d@o0W3}[y*NmP;lcla8MB{0825v(*N:x|rgXm"
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"u8bO%bdAa*@_e1_>11KH:OPEuC[~<=TVD7B;xY{AY3IzVM,%i_jt0</SLq1Dy`gg"
set vm_args: "rel/vm.args"
end
# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix release`, the first release in the file
# will be used by default
release :poof do
set version: current_version(:poof)
set applications: [
:runtime_tools
]
end
That usually means that application wasn't added to the extra applications list in the mix.exs
file. What is the contents of your mix.exs
file?
Yep, adding :asn1
application to extra_applications:
did fix the issue...
Still a bit mystified though. I don't use ASN.1 stuff anywhere in my app, if it's used by a dependency, wouldn't it be the dependency's job to fire it up?
Also, how do I find out what is requiring the asn1ct module in the first place?
wouldn't it be the dependency's job to fire it up?
I would think so...
Also, how do I find out what is requiring the asn1ct module in the first place?
Hmm, well mix deps.tree
will print the dependency tree, but if some library isn't adding it to their dependencies... Your best bet might be running mix xref callers :asn1ct
, I'm not sure if that will scan dependencies, I think it only does the current project, but running that command over everything in the deps directory should work, like via for d in deps/*; do cd $d; mix deps.get && mix compile; cd ../..; done; for d in deps/*; do cd $d; mix xref callers :asn1ct; cd ../..; done
or so? (should print results at bottom of listing as it does all the acquisition and compiling in a loop first)
mix xref callers :asn1ct
didn't return anything for my project.
Also ran the bash commands for all my project deps, nothing there either...
I suppose this means it's probably called by a dependency of one of my dependencies? Is there any other solution to find it besides writing a more complex script that iterates the entire deps tree recursively?
You could just grep -R asn1ct .
from the root of the project to find every single possible link to it? :-)
[root@poof.stirlab.local:/var/local/git/poof] # grep -R asn1ct .
grep: ./_build/test/lib/ssl_verify_fun/ebin: No such file or directory
[root@poof.stirlab.local:/var/local/git/poof]
What the hell??
Is hackney in your dependencies? What is your full mix.exs
file?
Full mix.exs
:
defmodule Poof.Mixfile do
use Mix.Project
def project do
[
app: :poof,
version: "1.2.3+006",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Poof.Application, []},
extra_applications: [:asn1, :logger, :runtime_tools],
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.3.4"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:plug_cowboy, "~> 1.0"},
{:timex, "~> 3.4.0"},
{:timex_ecto, "~> 3.2"},
{:uuid, "~> 1.1"},
{:basic_auth, "~> 2.2"},
{:dynamic_server_manager, "~> 0.0.10"},
{:distillery, "~> 2.0"},
{:swoosh, "~> 0.13"},
{:tesla, "~> 1.2.0"},
{:jason, "~> 1.1.0"},
{:mox, "~> 0.3", only: :test},
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# $ mix ecto.setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.clean": ["ecto.drop", "ecto.setup"],
"ecto.seed": ["run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.clean", "ecto.seed"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
end
I don't have a direct dep for hackney, but I'm pretty sure one of my deps does...
Hmm, it looks like it might actually be timex? It's calling the :asn1_*
conversion routines. Might also be cowboy1 as it performs asn1 code generation but it looks like that happens entirely compile-time, unsure if there is any run-time component of it. (You should upgrade to cowboy2, it's faster, you do that by bumping plug_cowboy's version to 2.0 ^.^)
So looks like you might need to keep it added to your extra's list then. But the dependencies you have that touch it are cowboy and timex. :-)
It also doesn't look like timex sets it as a required application, so that might be worth a PR to them.
Doesn't look like I can update plug_cowboy until I update phoenix:
Failed to use "cowboy" because
phoenix (version 1.3.4) requires ~> 1.0
plug_cowboy (versions 2.0.0 and 2.0.1) requires ~> 2.5
swoosh (versions 0.16.0 to 0.21.0) requires ~> 1.0.1 or ~> 1.1 or ~> 2.4
I'll file an issue with timex to see if adding :asn1
application to extra_applications:
is feasible.
Doesn't look like I can update plug_cowboy until I update phoenix:
Ah yeah that is true, you need Phoenix at least 1.4 for it. I'd recommend updating though! :-)
And yeah, adding the application is fine. :-)
Well, I spent several hours upgrading to Phoenix 1.4, and now I get a completely different build error... :(
==> Release failed with multiple errors:
Multiply defined module: 'Elixir.Collectable.Ecto.Adapters.SQL.Stream'
Detailed logs below. Tried looking for that error via Google, nada...
Verbose Logs
poof@poof:/var/local/git/poof/staging$ MIX_ENV=prod /usr/bin/mix release --verbose --upgrade --env=prod
==> Loading configuration..
==> Assembling release..
==> Building release poof:1.2.4+001 using environment prod
==> Discovered applications:
> phoenix_ecto-4.0.0
|
| from: _build/prod/lib/phoenix_ecto
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ecto
| :plug
| :phoenix_html
| includes: none
|_____
> plug_crypto-1.0.0
|
| from: _build/prod/lib/plug_crypto
| applications:
| :kernel
| :stdlib
| :elixir
| :crypto
| includes: none
|_____
> kernel-6.2
|
| from: /usr/lib/erlang/lib/kernel-6.2
| applications: none
| includes: none
|_____
> ranch-1.7.1
|
| from: _build/prod/lib/ranch
| applications:
| :kernel
| :stdlib
| :ssl
| includes: none
|_____
> cowlib-2.7.0
|
| from: _build/prod/lib/cowlib
| applications:
| :kernel
| :stdlib
| :crypto
| includes: none
|_____
> cowboy-2.6.1
|
| from: _build/prod/lib/cowboy
| applications:
| :kernel
| :stdlib
| :crypto
| :cowlib
| :ranch
| includes: none
|_____
> plug_cowboy-2.0.1
|
| from: _build/prod/lib/plug_cowboy
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :cowboy
| :plug
| includes: none
|_____
> artificery-0.2.6
|
| from: _build/prod/lib/artificery
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> distillery-2.0.12
|
| from: _build/prod/lib/distillery
| applications:
| :kernel
| :stdlib
| :elixir
| :runtime_tools
| :artificery
| includes: none
|_____
> connection-1.0.4
|
| from: _build/prod/lib/connection
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> db_connection-2.0.3
|
| from: _build/prod/lib/db_connection
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :connection
| includes: none
|_____
> postgrex-0.14.1
|
| from: _build/prod/lib/postgrex
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :db_connection
| :decimal
| :crypto
| includes: none
|_____
> eex-1.8.0
|
| from: /usr/lib/elixir/bin/../lib/eex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> phoenix-1.4.0
|
| from: _build/prod/lib/phoenix
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :eex
| :crypto
| :jason
| :phoenix_pubsub
| :plug
| :plug_cowboy
| includes: none
|_____
> basic_auth-2.2.4
|
| from: _build/prod/lib/basic_auth
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :cowboy
| :plug
| includes: none
|_____
> mime-1.3.1
|
| from: _build/prod/lib/mime
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| includes: none
|_____
> plug-1.7.1
|
| from: _build/prod/lib/plug
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :mime
| :plug_crypto
| includes: none
|_____
> uuid-1.1.8
|
| from: _build/prod/lib/uuid
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> inets-7.0.3
|
| from: /usr/lib/erlang/lib/inets-7.0.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> runtime_tools-1.13.1
|
| from: /usr/lib/erlang/lib/runtime_tools-1.13.1
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> apex-1.2.1
|
| from: _build/prod/lib/apex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> cloudsigma_api_wrapper-0.2.1
|
| from: _build/prod/lib/cloudsigma_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> stdlib-3.7
|
| from: /usr/lib/erlang/lib/stdlib-3.7
| applications:
| :kernel
| includes: none
|_____
> phoenix_pubsub-1.1.1
|
| from: _build/prod/lib/phoenix_pubsub
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :crypto
| includes: none
|_____
> ex_aws_ec2-2.0.1
|
| from: _build/prod/lib/ex_aws_ec2
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ex_aws
| includes: none
|_____
> ecto-3.0.6
|
| from: _build/prod/lib/ecto
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :crypto
| :decimal
| :jason
| :poison
| includes: none
|_____
> crypto-4.4
|
| from: /usr/lib/erlang/lib/crypto-4.4
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> xmerl-1.3.18
|
| from: /usr/lib/erlang/lib/xmerl-1.3.18
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> sweet_xml-0.6.5
|
| from: _build/prod/lib/sweet_xml
| applications:
| :kernel
| :stdlib
| :elixir
| :xmerl
| includes: none
|_____
> phoenix_html-2.13.1
|
| from: _build/prod/lib/phoenix_html
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :plug
| includes: none
|_____
> certifi-2.4.2
|
| from: _build/prod/lib/certifi
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> metrics-1.0.1
|
| from: _build/prod/lib/metrics
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> ssl_verify_fun-1.1.4
|
| from: _build/prod/lib/ssl_verify_fun
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mimerl-1.0.2
|
| from: _build/prod/lib/mimerl
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> unicode_util_compat-0.4.1
|
| from: _build/prod/lib/unicode_util_compat
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> idna-6.0.0
|
| from: _build/prod/lib/idna
| applications:
| :kernel
| :stdlib
| :unicode_util_compat
| includes: none
|_____
> ssl-9.1
|
| from: /usr/lib/erlang/lib/ssl-9.1
| applications:
| :crypto
| :public_key
| :kernel
| :stdlib
| includes: none
|_____
> public_key-1.6.4
|
| from: /usr/lib/erlang/lib/public_key-1.6.4
| applications:
| :asn1
| :crypto
| :kernel
| :stdlib
| includes: none
|_____
> hackney-1.15.0
|
| from: _build/prod/lib/hackney
| applications:
| :kernel
| :stdlib
| :crypto
| :asn1
| :public_key
| :ssl
| :idna
| :mimerl
| :certifi
| :ssl_verify_fun
| :metrics
| includes: none
|_____
> combine-0.10.0
|
| from: _build/prod/lib/combine
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> xml_builder-0.1.2
|
| from: _build/prod/lib/xml_builder
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> ex_aws-2.0.2
|
| from: _build/prod/lib/ex_aws
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :crypto
| :xml_builder
| :poison
| :hackney
| :sweet_xml
| includes: none
|_____
> ex_aws_route53-2.0.2
|
| from: _build/prod/lib/ex_aws_route53
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :xml_builder
| :ex_aws
| includes: none
|_____
> compiler-7.3
|
| from: /usr/lib/erlang/lib/compiler-7.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> tzdata-0.5.19
|
| from: _build/prod/lib/tzdata
| applications:
| :kernel
| :stdlib
| :elixir
| :hackney
| :logger
| includes: none
|_____
> tesla-1.2.1
|
| from: _build/prod/lib/tesla
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :ssl
| :inets
| includes: none
|_____
> poison-3.1.0
|
| from: _build/prod/lib/poison
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> decimal-1.6.0
|
| from: _build/prod/lib/decimal
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> jason-1.1.2
|
| from: _build/prod/lib/jason
| applications:
| :kernel
| :stdlib
| :elixir
| :decimal
| includes: none
|_____
> sasl-3.3
|
| from: /usr/lib/erlang/lib/sasl-3.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> telemetry-0.3.0
|
| from: _build/prod/lib/telemetry
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> swoosh-0.21.0
|
| from: _build/prod/lib/swoosh
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :jason
| :hackney
| :cowboy
| :mime
| :plug
| includes: none
|_____
> ecto_sql-3.0.4
|
| from: _build/prod/lib/ecto_sql
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :telemetry
| :db_connection
| :ecto
| :postgrex
| includes: none
|_____
> profitbricks_api_wrapper-0.2.1
|
| from: _build/prod/lib/profitbricks_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> digitalocean_api_wrapper-0.2.1
|
| from: _build/prod/lib/digitalocean_api_wrapper
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :apex
| :jason
| :tesla
| includes: none
|_____
> dynamic_server_manager-0.0.10
|
| from: _build/prod/lib/dynamic_server_manager
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :jason
| :poison
| :hackney
| :timex
| :sweet_xml
| :ex_aws
| :ex_aws_route53
| :ex_aws_ec2
| :uuid
| :tesla
| :cloudsigma_api_wrapper
| :digitalocean_api_wrapper
| :profitbricks_api_wrapper
| includes: none
|_____
> timex-3.4.2
|
| from: _build/prod/lib/timex
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :tzdata
| :gettext
| :combine
| includes: none
|_____
> gettext-0.16.1
|
| from: _build/prod/lib/gettext
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| includes: none
|_____
> logger-1.8.0
|
| from: /usr/lib/elixir/bin/../lib/logger
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> asn1-5.0.8
|
| from: /usr/lib/erlang/lib/asn1-5.0.8
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> poof-1.2.4+001
|
| from: _build/prod/lib/poof
| applications:
| :kernel
| :stdlib
| :elixir
| :asn1
| :logger
| :runtime_tools
| :gettext
| :jason
| :timex
| :phoenix_pubsub
| :uuid
| :tesla
| :dynamic_server_manager
| :postgrex
| :ecto_sql
| :distillery
| :phoenix_html
| :plug_cowboy
| :phoenix
| :basic_auth
| :swoosh
| :phoenix_ecto
| includes: none
|_____
> iex-1.8.0
|
| from: /usr/lib/elixir/bin/../lib/iex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mix-1.8.0
|
| from: /usr/lib/elixir/bin/../lib/mix
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> elixir-1.8.0
|
| from: /usr/lib/elixir/bin/../lib/elixir
| applications:
| :kernel
| :stdlib
| :compiler
| includes: none
|_____
==> Running validation checks..
> Mix.Releases.Checks.Erts * PASS
> Mix.Releases.Checks.Cookie * PASS
> Mix.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
release_name=:poof
release_version="1.2.4+001"
is_upgrade=true
upgrade_from="1.2.3+005"
dev_mode=false
include_erts=true
include_src=false
include_system_libs=true
erl_opts=""
run_erl_env=""
erts_vsn="10.2"
output_dir="_build/prod/rel/poof"
==> Copying applications to _build/prod/rel/poof
==> Generating relup for poof
==> cowboy requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for cowboy 1.1.2 -> 2.6.1
==> cowlib requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for cowlib 1.0.2 -> 2.7.0
==> db_connection requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for db_connection 1.1.3 -> 2.0.3
==> ecto requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for ecto 2.2.11 -> 3.0.6
==> eex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for eex 1.7.4 -> 1.8.0
==> elixir requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for elixir 1.7.4 -> 1.8.0
==> iex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for iex 1.7.4 -> 1.8.0
==> logger requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for logger 1.7.4 -> 1.8.0
==> mix requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for mix 1.7.4 -> 1.8.0
==> phoenix requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for phoenix 1.3.4 -> 1.4.0
==> phoenix_ecto requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for phoenix_ecto 3.6.0 -> 4.0.0
==> plug_cowboy requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for plug_cowboy 1.0.0 -> 2.0.1
==> poof requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for poof 1.2.3+005 -> 1.2.4+001
==> postgrex requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for postgrex 0.13.5 -> 0.14.1
==> ranch requires an appup, but it wasn't provided, one will be generated for you..
==> Generated .appup for ranch 1.3.2 -> 1.7.1
==> Release failed with multiple errors:
Multiply defined module: 'Elixir.Collectable.Ecto.Adapters.SQL.Stream'
Multiply defined module: 'Elixir.Collectable.Ecto.Adapters.SQL.Stream'
Anytime you see Multiply defined module
that means the module is defined multiple times through more than 1 dependency. Can you post your complete mix.exs file again? :-)
Also, the ElixirForums are a better place for these questions, but if bitwalker doesn't mind... ^.^
Yeah you're right, this issue is hitting 'scope creeep' ;)
Re-posted in Elixir Forum here: https://elixirforum.com/t/distillery-build-error-multiply-defined-module-elixir-collectable-ecto-adapters-sql-stream/19489
Any further help greatly appreciated :)
Final update: After resolving the error I reported in #627 (comment) I was able to also remove :asn1
from extra_applications:
, which was my workaround to the problem in this original issue report.
So it seems that issue was resolved by either:
- My upgrade to Phoenix 1.4.x, and thus Cowboy 2.6.x
- Wiping the _build directory before trying to rebuild (which is what fixed the
Multiply defined module
error)