问题
How to keep play application running after putty terminal closed?
After deploying play application in to server, I ssh'ed into server with putty terminal and ran the play application.
However, once I close the putty terminal, play application no longer accepts http requests from client. To start the play application I used following command;
./{myplayapp}/bin/{executable} -Dhttp.port=8000
回答1:
use screen to start your application. view existing screens with "screen -ls" and switch between them with "screen -r" http://wiki.ubuntuusers.de/screen
回答2:
I would recommend nohup
:
nohup ./script -Dhttp.port=8000 &
It will create nohup.out
file with all the logs. If you want to quit it, grep RUNNING_PID
and sudo kill
it.
回答3:
Got the answer! Using & symbol run the process in background so that even if putty terminal is closed, process not terminated.
./{myplayapp}/bin/{executable} -Dhttp.port=8000 > app.out &
来源:https://stackoverflow.com/questions/27365021/keep-play-application-running-after-putty-terminal-closed