imonah
imonah

Reputation: 21

Application doesn't start, gives error "failed to start child: Odt.Endpoint"

After command "mix phoenix.server" always receive error:

=INFO REPORT==== 14-Dec-2015::20:55:48 ===

    application: logger
    exited: stopped
    type: temporary

** (Mix) Could not start application odt: Odt.start(:normal, []) returned an error: shutdown: failed to start child: Odt.Endpoint

** (Exit) shutdown: failed to start child: Phoenix.Endpoint.Server

** (Exit) shutdown: failed to start child: {:ranch_listener_sup, Odt.Endpoint.HTTP}

** (Exit) shutdown: failed to start child: :ranch_acceptors_sup

** (Exit) {:listener_error, Odt.Endpoint.HTTP, :eaddrinuse}

How can I fix it? What am I doing wrong?

Upvotes: 2

Views: 3392

Answers (2)

Neri Martinez
Neri Martinez

Reputation: 99

I'm using mac, so this answer would be the same for linux

just run lsof -i :4000 to see which proceses are using that port.

Once you identify the one corresponding to phoenix (beam.smp), just kill the process

kill -9 PID

or you can just do killall beam.smp

Cheers

Upvotes: 3

Onorio Catenacci
Onorio Catenacci

Reputation: 15343

Just so others can find the answer should they run into this issue:

This line:

** (Exit) {:listener_error, Odt.Endpoint.HTTP, :eaddrinuse}

means that something is already using the 4000 port (which is the default port for Phoenix). Try checking this http://localhost:4000 to see if you see anything. If you do, then modify the port that Phoenix opens via changing your dev.exs file.

Upvotes: 7

Related Questions