Hi Everyone, I am experiencing a problem about starting my Spring Boot Web Server within a Droplet (Ubuntu 22.04 x64).
I have copied:
When I use the command to start the service from droplet ssh session and I check the status, the system shows this information:
● webserver-0.0.1-SNAPSHOT.service - Webserver 03motorsport Spring Boot Application
Loaded: loaded (/etc/systemd/system/webserver-0.0.1-SNAPSHOT.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2023-10-27 16:40:29 UTC; 396ms ago
Process: 13162 ExecStart=/usr/bin/java -jar /artifact/webserver-0.0.1-SNAPSHOT.jar (code=exited, status=1/FAILURE)
Main PID: 13162 (code=exited, status=1/FAILURE)
CPU: 1ms
The service remains in “activating” status, and my web server is not loading properly.
What I am doing wrong?
Thanks in advance for the help :)
Gianluca
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya, @55bafd6b3fba46cb9d8e7bb64ea488
You can start by checking the logs, to see the logs of your service, you can use
journalctl
:The command will display the logs for your service and should help you diagnose the issue.
Hope that this helps!
Heya,
I can see the PID is with status FAILURE:
The error message indicates that your Spring Boot application is failing to start. The service keeps trying to restart the application, which is why you see it in the “activating” status.
Inspect the Service Logs: The first thing you’d want to do is to check the logs to understand why your application is failing to start. You can send them over here for further help as well.
Test Manually: Try running the JAR file directly to see if it provides any error messages:
If there are any configuration issues or missing dependencies, running the application manually will often provide a more detailed error message.