Self-hosted is not working with "function :econnrefused.exception/1 is undefined" error

Hi!
I’m trying to run Plausible on docker (self-hosted) but it doesn’t work.

That’s what I do:

  • following the instructions found here I git clone the project,
  • I edit the config file (plausible-conf.env)
  • I run the stack: docker-compose up -d

All seems to work fine but after about 15 seconds the ‘plausible’ container exits.

This is the log:
Loading plausible..
Starting dependencies..
Starting repos..
create Plausible.Repo database if it doesn't exist
create Plausible.ClickhouseRepo database if it doesn't exist
11:01:58.558 [error] Clickhousex.Protocol (#PID<0.244.0>) failed to connect: ** (ErlangError) Erlang error: :econnrefused
11:01:58.558 [error] Clickhousex.Protocol (#PID<0.245.0>) failed to connect: ** (ErlangError) Erlang error: :econnrefused
11:01:58.575 [error] GenServer #PID<0.265.0> terminating
** (UndefinedFunctionError) function :econnrefused.exception/1 is undefined (module :econnrefused is not available)
    :econnrefused.exception([])
    (db_connection 2.2.2) lib/db_connection/connection.ex:87: DBConnection.Connection.connect/2
    (connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
11:01:58.579 [error] GenServer #PID<0.266.0> terminating
** (UndefinedFunctionError) function :econnrefused.exception/1 is undefined (module :econnrefused is not available)
    :econnrefused.exception([])
    (db_connection 2.2.2) lib/db_connection/connection.ex:87: DBConnection.Connection.connect/2
    (connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
11:01:58.584 [error] GenServer #PID<0.267.0> terminating
** (UndefinedFunctionError) function :econnrefused.exception/1 is undefined (module :econnrefused is not available)
    :econnrefused.exception([])
    (db_connection 2.2.2) lib/db_connection/connection.ex:87: DBConnection.Connection.connect/2
    (connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
11:01:58.589 [error] GenServer #PID<0.268.0> terminating
** (UndefinedFunctionError) function :econnrefused.exception/1 is undefined (module :econnrefused is not available)
    :econnrefused.exception([])
    (db_connection 2.2.2) lib/db_connection/connection.ex:87: DBConnection.Connection.connect/2
    (connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
** (MatchError) no match of right hand side value: {:error, "killed"}
    (plausible 0.0.1) lib/plausible_release.ex:56: anonymous fn/2 in Plausible.Release.createdb/0
    (elixir 1.10.3) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
    (plausible 0.0.1) lib/plausible_release.ex:55: Plausible.Release.createdb/0
    (stdlib 3.12.1) erl_eval.erl:680: :erl_eval.do_apply/6
    (elixir 1.10.3) lib/code.ex:341: Code.eval_string_with_error_handling/3

It seems that is missing a module or a function…
If I access postgres database I found that the database has been created (at the beginning).
I get the problem on a VPS and I tried on my local machine (same problem).
A previous version worked fine.

Any idea?

Thanks a lot,
iwan

Hey @iwan!

You can refer this: Error trying to run Plausible locally

Great! Now is working fine.

Thank you!