Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

systemd cannot start Tomcat: exit status 203

ErrorFailed to start apache tomcat web server

Short 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.

  • Applies to systemd 255, Tomcat 10.1, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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-pager
  2. 2Match what you see, then jump to its fix

    1. 1Journal 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. 2The 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. 3Status is 200/CHDIR, 217/USER or 226/NAMESPACEThe exit code is not 203 after allFix

What does the error look like?

  • Failed to start apache tomcat web server
  • tomcat.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.sh

2Fix

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-reload

3Verify

The service starts and stays active.

sudo systemctl restart tomcat.service && systemctl status tomcat.service --no-pager

Confirmed by freedesktop.org

Did this fix it?

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 blocked

2Fix

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/tomcat

3Verify

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.service

Confirmed by freedesktop.org

Did this fix it?

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 Group

2Fix

Create the directory or the account the unit names, or correct the setting.

id tomcat
ls -ld /opt/tomcat

3Verify

The service starts without a 2xx exit code.

sudo systemctl restart tomcat.service && systemctl is-active tomcat.service

Confirmed by freedesktop.org

Did this fix it?

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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.