Shutdown Check

Search documentation

Find a page or section

SC302: Port still open after exit

SC302 (port still open after exit) means the launched process exited but the HTTP port still accepted connections: a child server kept running. How to fix it.

SC302 means the process shutdown-check launched exited, but another process still owned the HTTP port. The usual cause is a shell or package-manager wrapper that starts the real server as a child and does not forward SIGTERM.

CodeSC302 FAIL
StageProcess exit
CLI exit code1
What it meansThe launched process exited, but the HTTP port still accepted connections: a child server was left running.
Message
  • The launch process exited, but the HTTP port is still open or did not clearly refuse a connection (possible child process left running)
First thing to checkLaunch the server directly, or make sure the wrapper or process manager that starts it forwards SIGTERM to the real server and waits for it.

How do I fix it?

Launch the server process directly:

shutdown-check.json
{
  "command": ["node", "dist/server.js"]
}

Avoid commands that create an extra process layer, such as npm start, sh -c, or a script that backgrounds the server. If a wrapper is required, make it replace itself with the server or forward signals and wait for the child to exit.

The test cleans up the entire process group after reporting the failure, so the child should not remain after shutdown-check finishes.

How do I verify the fix?

Use the new direct command and run again. A passing run ends with process exit, a refused connection on the port, and shutdown verified.

If a wrapper is mandatory, test it as the command. Do not test node directly while deploying a different signal path; that would miss the original bug.