1. Who is answering?
If the error page says "HTTP Status 503 - Service Unavailable" in Tomcat style, Tomcat answered. If the page comes from Nginx, Tomcat is probably stopped or not listening:
systemctl status tomcat10 --no-pager
sudo ss -ltnp | grep 8080
curl -I http://127.0.0.1:8080/
When the service is down, read journalctl -u tomcat10 -n 100 and fix what stopped it. Often that is the Linux OOM killer.
2. Application failed to start
This is the usual case. Tomcat starts, tries to start the application, fails, and then answers 503 or 404 for that context. Look at these logs, newest first:
sudo ls -lt /var/log/tomcat10/ | head
sudo grep -n -E "SEVERE|Exception|Error" /var/log/tomcat10/localhost.$(date +%F).log | head -30
sudo tail -n 100 /var/log/tomcat10/catalina.out
The log name and folder differ by install. On a tarball install they are in /opt/tomcat/logs. Look for lines such as:
| Log message | Cause |
|---|---|
ClassNotFoundException: javax.servlet... on Tomcat 10 | The app uses javax, Tomcat 10 needs jakarta. Migrate or use Tomcat 9 |
UnsupportedClassVersionError | Application built for a newer Java. Fix the version |
Connection refused or Communications link failure | The database is not reachable at startup |
BeanCreationException, NoSuchBeanDefinition | Configuration or dependency problem in the application |
OutOfMemoryError | See Fix OutOfMemoryError |
Permission denied | The tomcat user cannot read a config or write a folder |
3. Startup takes too long
A big application on a small server can need a minute or more. During that time requests may get 503. Watch the log until you see Deployment of web application archive ... has finished in. A slow disk or too little CPU makes this worse.
4. Check the file permissions
ls -l /var/lib/tomcat10/webapps/
sudo chown tomcat:tomcat /var/lib/tomcat10/webapps/*.war
5. Restart cleanly
After you fix the cause, restart instead of waiting. A failed context stays failed until Tomcat reloads it:
sudo systemctl restart tomcat10
sudo journalctl -u tomcat10 -f
Still stuck? On our managed plans you can send us the log and we will find it.
Questions about fix tomcat 503
Is a 503 the same as a 502?
No. A 502 or 504 comes from the proxy and means it could not reach Tomcat. A Tomcat 503 means Tomcat is running but the application is not available.
Last updated October 29, 2026.