How to Keep Spring Boot App Running After Closing PuTTY Session Without Using a Linux Service?
Hi Everyone,
I'm running a Spring Boot application with an embedded Tomcat server deployed as an executable jar file on a Linux server. I access the server through PuTTY and start the application using
The problem is, when I close the PuTTY session, the embedded Tomcat server and the jar file stop running. The application doesn't produce any specific error messages in this scenario.
While I understand running the jar as a Linux service is a solution, I'm interested in exploring other methods to keep the application running continuously, even after closing the PuTTY session. Are there any recommended approaches besides using a service? @Middleware & OS
5 Replies
--nohup ?
Sure @brotherjoons you right. Using process management tools like
nohup
or even screen
to run the jar in the background after the PuTTY session closes. @Sterling you should look at thisHmmm, will do, will do..Thanks @brotherjoons
And then if you need to get back to the app upon reconnecting via putty, you issue - fg <pid>
Okayy 🙂