# SC101: Service exited before it was ready

> SC101 (service exited before it was ready) means your command crashed, exited or failed to start before readiness passed. Read stderr, then fix the command.

Source: https://shutdown.jscrate.dev/docs/codes/sc101
Last updated: 2026-09-23

`SC101` means the service exited or failed to start before readiness passed.
The check did not open the workload or send `SIGTERM`.

| | |
| --- | --- |
| Code | `SC101` (FAIL) |
| Stage | Startup and in-flight work |
| CLI exit code | 1 |
| What it means | The launched process exited, or failed to start, before the readiness route answered. |
| Messages | `Service exited before becoming ready: <error>`<br>`Service exited before becoming ready` |
| First thing to check | Read the captured stderr: a missing build, a bad path in `command`, a missing environment variable or a crash on boot. |

## Where do I find the cause?

Start with `Service stderr` at the end of the output. Common messages include a
missing build file, an invalid environment variable, a syntax error, or an
address that is already in use.

Also check:

- `command` points to an existing executable and entry file.
- `cwd` is the directory the command expects.
- The application was built before the test.
- Required environment variables are present in `env`.
- The process does not start in the background and let its launcher exit.

Prefer a direct command such as `["node", "dist/server.js"]`. Package-manager
scripts and shell wrappers can hide the real exit or fail to forward signals.

## What if the process stays alive but never becomes ready?

That is [SC100](https://shutdown.jscrate.dev/docs/codes/sc100). Check the configured URL, readiness path,
expected status, and startup timeout.

## How do I verify the fix?

Run the configured command from the configured `cwd` and confirm that it stays
alive. Then run shutdown-check and look for both `process launched` and
`service ready`.

If the command works in your shell but not in the test, compare environment
variables and relative paths. shutdown-check does not load shell aliases or
shell startup files because it launches the executable directly.

## Related

- [Configure `command`, `cwd`, and `env`](https://shutdown.jscrate.dev/docs/configuration#command-cwd-and-env)
- [SC100: Service never became ready](https://shutdown.jscrate.dev/docs/codes/sc100)
- [Troubleshooting](https://shutdown.jscrate.dev/docs/troubleshooting)
