Tuesday, April 29, 2025

Troubleshooting systemd Error 203/EXEC While Starting Chronos


Recently, while trying to start the Chronos service using systemctl, I encountered the following error:


systemctl start chronos

Upon checking the status:

chronos.service: Control process exited, code=exited status=203/EXEC

Root Cause

The error status=203/EXEC means that systemd failed to execute the service script. Common reasons include:

  1. Missing shebang (#!/bin/bash) at the top of the script.

  2. Incorrect file permissions — in this case, the script had chmod 777, which is too permissive and not allowed by systemd.


Resolution Steps

Here’s what I did to resolve it:

  1. Added the shebang to the script:

    #!/bin/bash

    Placed at the very top of /etc/rc.d/init.d/chronos.

  2. Corrected the script permissions:

    chmod 755 /etc/rc.d/init.d/chronos
  3. Verified that the script works manually:

    /etc/rc.d/init.d/chronos start
  4. Restarted the service:

    systemctl start chronos

This time, the service started successfully and showed active (exited), which is expected behavior for SYSV-style scripts.


Recommendation

While the issue is resolved, consider migrating to a native systemd unit file for better process management, logging, and compatibility. Legacy init scripts work, but native units provide more control and clarity.