简体   繁体   中英

User processes getting killed along with ssh connection after some time

Recently i am facing this issue. All services are running fine. But after some time, my ssh connection is getting killed by a message connection closed by remote host. And after that when i am checking all my java processes by ps - ef |grep java, nothing is running (eg, tomcat ) again need to restart, everything is getting killed without any error message. But meanwhile system services are running like mysql, mongo etc.

I think you are asking two questions: (a) why are my SSH connections getting killed and (b) why do my processes die as a result.

On (a) I would suggest you look at options for SSH that serve to keep connections alive. This might be useful .

On (b) you should probably install Tomcat as a service, which would protect it from getting killed when your SSH connection dies. The details of how this gets done might differ depending on what operating system you use and if it is Linux depending on the distribution. [These instructions for Ubuntu 16.04 might give you an idea of what is involved.

If you have processes that are too difficult to turn into a service right now, you can also use tools such as screen to keep them running while the SSH connection is down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM