systemd cannot start Tomcat: exit status 203
Failed to start apache tomcat web serverShort answer
Status 203 means systemd failed at execve before Tomcat even began: the program in ExecStart is missing or not accessible. It is not a Java or Tomcat error. Read the ExecStart path from systemctl cat, then check that the file exists, is spelled as an absolute path, and is executable by the unit's user.
Fix it fast
1Find out which cause you have
Print the unit as systemd sees it and look at ExecStart= and User=. Then ask the journal for the exact failure.
systemctl cat tomcat.service journalctl -u tomcat.service -n 30 --no-pager2Match what you see, then jump to its fix
- 1
Journal lines such as 'Failed to execute /opt/tomcat/bin/startup.sh: No such file or directory'The ExecStart path does not exist or is not absoluteFix - 2
The path exists, but ls -l shows no execute bit, or a directory above it is closed to the User= accountThe service user cannot execute the fileFix - 3
Status is 200/CHDIR, 217/USER or 226/NAMESPACEThe exit code is not 203 after allFix
- 1
What does the error look like?
Failed to start apache tomcat web servertomcat.service: Control process exited, code=exited, status=203/EXEC
Cause 1 of 3
The ExecStart path does not exist or is not absolute
1Check
Status 203 is raised when execve fails, most likely because of a missing or non-accessible executable. The first token of ExecStart must be an absolute path (or a bare name found on systemd's fixed search path).
systemctl cat tomcat.service | grep -E "ExecStart|ExecStop"
ls -l /opt/tomcat/bin/startup.sh2Fix
Correct the path in the unit (a drop-in keeps the original file clean), then reload systemd.
sudo systemctl edit tomcat.service
# in the editor, reset and set the command:
# [Service]
# ExecStart=
# ExecStart=/opt/tomcat/bin/startup.sh
sudo systemctl daemon-reload3Verify
The service starts and stays active.
sudo systemctl restart tomcat.service && systemctl status tomcat.service --no-pagerConfirmed by freedesktop.org
Cause 2 of 3
The service user cannot execute the file
1Check
Test as the exact user the unit runs as.
systemctl show tomcat.service -p User
sudo -u tomcat test -x /opt/tomcat/bin/startup.sh && echo ok || echo blocked2Fix
Give the file the execute bit and make the Tomcat tree readable by that user.
sudo chmod +x /opt/tomcat/bin/*.sh
sudo chown -R tomcat:tomcat /opt/tomcat3Verify
The test command prints ok and the service starts.
sudo -u tomcat test -x /opt/tomcat/bin/startup.sh && echo ok
sudo systemctl restart tomcat.serviceConfirmed by freedesktop.org
Cause 3 of 3
The exit code is not 203 after all
1Check
Neighbouring codes come from the same stage. 200 means the WorkingDirectory could not be entered, 217 means the user or group in User= could not be set up, 226 means namespace setup failed.
systemctl show tomcat.service -p WorkingDirectory -p User -p Group2Fix
Create the directory or the account the unit names, or correct the setting.
id tomcat
ls -ld /opt/tomcat3Verify
The service starts without a 2xx exit code.
sudo systemctl restart tomcat.service && systemctl is-active tomcat.serviceConfirmed by freedesktop.org
How do I stop it coming back?
- Use absolute paths in every Exec line.
- Run systemctl daemon-reload after every unit edit.
- After an upgrade that moves Tomcat's directory, re-check the unit before restarting.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
Ansible hangs, then times out waiting for the sudo prompt
a playbook using become seems to hang
Ansible ran sudo on the target and never saw the answer it expected.
3 causes, each with a fixServers
Apache on Ubuntu returns 404 Not Found for my site
The requested URL was not found on this server.
On Ubuntu a 404 from Apache usually means the request maps to a path that has no file.
3 causes, each with a fixServers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fixServers
Apache logs SIGWINCH and exits on its own
the httpd container stops although nothing crashed
SIGWINCH is Apache's graceful-stop signal.
2 causes, each with a fixServers
Apache warns that a ${VAR} config variable is not defined
${VAR} left unchanged in the configuration, with a warning in the error log
Apache expands ${VAR} from Define or from the shell environment that exists when the server starts.
3 causes, each with a fix