(EXIT) shutdown: failed to start child: {:ranch_listener_sup, Endpoint.HTTP}

I’m literally inching my way into this - sorry for all these noob questions!

Now with a working Dockerfile and docker-compose.yml I’m starting the app with

_build/prod/rel/fish/bin/fish start

only to see this:

22:50:51.505 [info] Application fish exited: Fish.Application.start(:normal, []) returned an error: shutdown: failed to start child: FishWeb.Endpoint
    ** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, FishWeb.Endpoint.HTTP}
        ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
            ** (EXIT) :badarg

and I’m aware that there is some ‘badarg’ somewhere - but how am I going to find that?

My releases.ex looks like this:

import Config
secret_key_base = System.fetch_env!("SECRET_KEY_BASE")
cool_text = System.fetch_env!("COOL_TEXT")
application_port = System.fetch_env!("APP_PORT")
pool_size = System.fetch_env!("POOL_SIZE")
username = System.fetch_env!("DBUSER")
password = System.fetch_env!("DBPWRD")
database = System.fetch_env!("DBNAME")
hostname = System.fetch_env!("DBHOST")
urlhost = System.fetch_env!("URLHOST")

config :fish, FishWeb.Endpoint,
  http: [:inet6, host: urlhost, port: String.to_integer(application_port)],
  secret_key_base: secret_key_base,
  url: [host: urlhost, port: String.to_integer(application_port)]

I’d really appreciate if someone could steer me in the right direction :face_with_thermometer:

oh - and doing port: application_portinstead does not change anything I’m afraid


In the :http key, there isn’t a :host key allowed.


Oh, NobbZ! If only I had a few 100hrs more Elixir/Phoenix under my belt :cry:

Thank you so much for pointing that out !

1 Like

Old topic, but you just saved me from a headache.

1 Like