Keep play application running after putty terminal closed

谁说胖子不能爱 提交于 2019-12-08 04:16:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!