command to terminate running phoenix server

1,920 views
Skip to first unread message

galo...@gmail.com

unread,
Dec 29, 2015, 7:46:02 AM12/29/15
to phoenix-talk
Total noob question here, but I'm working through 'programming-phoenix' using linode (arch) - I'm currently having the following problem:

When I close my ssh pipe and log back in later to resume the tutorial, the server doesn't pickup new changes.
I then try to restart the server using $mix pheonix.server, I get the following error:

** (Mix) Could not start application hello: Hello.start(:normal, []) returned an error: shutdown: failed to start child: Hello.Endpoint
   ** (EXIT) shutdown: failed to start child: Phoenix.Endpoint.Server
       ** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, Hello.Endpoint.HTTP}
           ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
               ** (EXIT) {:listen_error, Hello.Endpoint.HTTP, :eaddrinuse}

Which I guess is correct, since the server is still running, so I have to do:

$ps -e | grep beam
$kill -9 <beam-pid(s)>
 
Is there a command to terminate the server using mix, that I'm missing?

 

Jerel Unruh

unread,
Dec 29, 2015, 8:48:52 AM12/29/15
to phoeni...@googlegroups.com
Press Ctrl-C twice before closing your ssh tunnel.

--
You received this message because you are subscribed to the Google Groups "phoenix-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-talk...@googlegroups.com.
To post to this group, send email to phoeni...@googlegroups.com.
Visit this group at https://groups.google.com/group/phoenix-talk.
To view this discussion on the web visit https://groups.google.com/d/msgid/phoenix-talk/982c4f77-1a25-48ef-aad7-59b9fb90c914%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

galo...@gmail.com

unread,
Dec 29, 2015, 11:45:50 AM12/29/15
to phoenix-talk
Thanks for that - in the event that I've closed the tunnel/pane without hitting Ctl-c twice however, how would I return to the same server instance?

pj.beta...@gmail.com

unread,
Dec 29, 2015, 12:53:52 PM12/29/15
to phoenix-talk, galo...@gmail.com
If you're using a remote server and using SSH when you close your SSH connection you'll terminate all process running in the remote terminal.
Also, you need to pay attention to how you make changes to the remote project files otherwise you may think you're changing files properly and in fact you may end up with something different than what you expect. My point is: always look into the remote folder/files to see the real content.
Reply all
Reply to author
Forward
0 new messages