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
java -jar my-jar.jar
java -jar my-jar.jar
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
brotherjoons
brotherjoons•3w ago
--nohup ?
Marvee Amasi
Marvee Amasi•3w ago
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 this
Sterling
Sterling•3w ago
Hmmm, will do, will do..Thanks @brotherjoons
brotherjoons
brotherjoons•3w ago
And then if you need to get back to the app upon reconnecting via putty, you issue - fg <pid>
Sterling
Sterling•3w ago
Okayy 🙂
Want results from more Discord servers?
Add your server
More Posts
Is it possible to compile Busybox directly into the initramfs during the kernel build process?@Middleware & OS I'm working on an embedded Linux system and want to use Busybox for its small foothow can I send data from a smart door lock to Azure IoT Hub?@Middleware & OS Hey guys, how can I send data from a smart door lock device(lock status, access atAny tips for a smooth transition from mbed to Zephyr development?@Middleware & OS I've written a C++ LCD driver using PlatformIO and mbed. Now I'm setting up ZephyrBuilding an embedded Linux system for an A20-based board using Buildroot@Middleware & OS I'm building an embedded Linux system for an A20-based board using Buildroot. The Embedded Software Development: 5G/6G Project -IIT HyderabadEmbedded Development (5G/6G Project): IIT HYD, INDIA Experience: 2-5 years Location: Hyderabad Seeking Mentorship for STM32F407VGT6 board and ArmM4I am looking for someone who can help me at every step from zero to project. If anyone is interestedI need helpif someone can help me to figure out this error(guide) ,this is the main code :Strategies for Handling Padding in C ProgrammingIn C programming, padding refers to extra memory added between structure members to align data for emaking a smoke sensor that sends a sms message to a user when it detects smoke.I'm new to arduino coding and we are tasked with making a smoke sensor that sends a sms message to aUsing Blender for electronic " design and visualization"Hey everyone! as a person who love to create 3D project i recently discovered that Blender can be us