Skip to content

problems with inets on startup #2

Description

@ruslandoga

Hi!

I've followed the steps outlined in elixirforum post but unfortunately I couldn't get the app to start in s distributed setting with consulate.


If I use a command similar to the one on the forum,

ERL_FLAGS="-epmd_module consulate -start_epmd false" iex --sname foo -S mix phx.server

I get consulate:start_link/0 undefined error:

... snip ...
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,consulate,{'EXIT',{undef,[{consulate,start_link,[],[]}
... snip ...

even though I've already ran mix deps.compile and I have _build/dev/lib/consulate/ebin available.


And when using -pa option as well with path to consulate ebin, the error becomes different:

ERL_FLAGS="-epmd_module consulate -start_epmd false -pa _build/dev/lib/consulate/ebin" iex --sname foo -S mix phx.server
Protocol 'inet_tcp': not supported

which seems to be coming from https://github.com/erlang/otp/blob/81c6d94625a04f6550e77a068489ca6378cabfee/lib/kernel/src/net_kernel.erl#L1811, which seems like a problem with loading inet_tcp / inet_tcp_dist modules.


I wonder if you could give any hints / pointers for where I could look to resolve these problems?

Repro: https://github.com/ruslandoga/try-consulate
Relevant commit: ruslandoga/try-consulate@dc51789

Versions used:

Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [dtrace]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions