Elixir / Phoenix: Server fails with eafnosupport in production

Viewed 172

I have a Phoenix Web application which starts well in development mode (ENV=dev mix phx.server) but fails in production mode:

ENV=prod mix phx.server =>

[error] Failed to start Ranch listener HermesWeb.Endpoint.HTTP in :ranch_tcp:listen([{:cacerts, :...}, {:key, :...}, {:cert, :...}, :inet6, {:port, 4000}]) for reason :eafnosupport (address family not supported by protocol family)

The endpoint configurations a basically the same:

dev.exs:

 config :hermes, HermesWeb.Endpoint,
   http: [port: 4000],
   url: [scheme: "https", host: "myhost", path: "/hermes/4000", port: 443],
   debug_errors: true,
   code_reloader: true,
   check_origin: false,
   watchers: [...]

prod.exs:

config :hermes, HermesWeb.Endpoint,
  http: [port: 4000],
  url: [scheme: "https", host: "myhost", path: "/hermes/4000", port: 443],
  cache_static_manifest: "priv/static/cache_manifest.json"

Is this error caused by inet6 ?

I tried with http: [:inet, port: 4000], ... which doesn't work either.

Any help would be appreciated

0 Answers
Related