Fix systemd status=243/CREDENTIALS on a service
systemd status=243/CREDENTIALS means preparing the service's credentials failed. Check first that the absolute path in LoadCredential exists.
Process: 143 ExecStart=/usr/bin/test -s ${CREDENTIALS_DIRECTORY}/probe (code=exited, status=243/CREDENTIALS)status=243/CREDENTIALS means systemd stopped while preparing credentials (the systemd feature that hands secret files such as passwords and keys to a service) before it started the program in ExecStart=. The program never ran, so start with the source that LoadCredential= points to.
The "Process Exit Codes" table in systemd.exec describes 243 as a failure to set up the unit's credentials and points to ImportCredential=, LoadCredential= and SetCredential=. In the v255 source the code is chosen when the credential setup function returns an error. The journal line is Failed to set up credentials: followed by a reason, and that reason may not be the real cause (see [1]).
[1] Read the unit's journal and its credential settings together. Replace myapp.service with your unit.
# systemctl status --full --no-pager myapp.service# journalctl -b -u myapp.service --no-pager# systemctl show myapp.service -p LoadCredential -p Result -p ExecMainStatusActual output from the test unit (gb243-fail.service, LoadCredential=probe:/run/absent-probe). The host name was changed to server1, and … marks omitted lines (this test ran with the debug level below turned on, so the journal had many other lines). The journal shows only Protocol error, with no reason.
x gb243-fail.service Loaded: loaded (/run/systemd/system/gb243-fail.service; static) Active: failed (Result: exit-code) since Fri 2026-11-27 23:42:54 UTC; 10ms ago Process: 143 ExecStart=/usr/bin/test -s ${CREDENTIALS_DIRECTORY}/probe (code=exited, status=243/CREDENTIALS) Main PID: 143 (code=exited, status=243/CREDENTIALS) CPU: 2ms…Nov 27 23:42:54 server1 (test)[143]: gb243-fail.service: Failed to set up credentials: Protocol error…Result=exit-codeExecMainStatus=243…A LoadCredential= value has the form ID:path. The ID is the name the service asks for, and the path is where the data is read from. On systemd 255 the end of that line is often just Protocol error. In the source (exec-credential.c), credentials are prepared in a separate child process (sd-mkdcreds), and when the child fails for any reason the parent returns -EPROTO (Protocol error) without knowing why. A missing file and a failed mount look the same in that line. The child logs the real reason only at debug level, so if needed raise the manager's log level briefly, restart the unit and read it (confirmed in the test).
# systemd-analyze log-level debug# systemctl restart myapp.service# journalctl -b --no-pager | grep -i credential# systemd-analyze log-level infoThis is the result for the test unit after raising the log level to debug, restarting it and narrowing the journal with grep to lines containing credential. The real reason is on the line right before Protocol error.
Nov 27 23:42:54 server1 (sd-mk[144]: Failed to read credential '/run/absent-probe': No such file or directoryNov 27 23:42:54 server1 (test)[143]: (sd-mkdcreds) failed with exit status 1.Nov 27 23:42:54 server1 (test)[143]: gb243-fail.service: Failed to set up credentials: Protocol errorThe last line puts the log level back. If it was not info before, check it first with systemd-analyze log-level and restore that value instead.
[2] Check that the source path exists.
# ls -l /etc/myapp/tokenWhat systemd does depends on the shape of the path. The manual and the v255 source (exec-credential.c) say:
Path in LoadCredential= | When it is missing |
|---|---|
Absolute file (/etc/myapp/token) | Read as a file; if missing, error → 243. Skipped only if the same ID is also given with SetCredential= |
| Absolute directory | Every file inside is loaded as ID_filename (symlinks are ignored) |
Relative name (token) | Looked up in the credentials systemd itself received, then /etc/credstore/, /run/credstore/, /usr/lib/credstore/; if absent it is skipped silently (no 243) |
So an absolute path to a missing file gives 243. A relative name that cannot be found lets the service start, and the program fails later for a different reason when it cannot open the credential.
[3] Create the file or correct the path. This step handles secret data, so restrict the permissions first.
# install -d -m 755 /etc/myapp# install -m 600 -o root -g root /dev/null /etc/myapp/token# vi /etc/myapp/tokenThe manual says credential files only have to be readable by the service manager, not by the service's own processes: systemd reads the data and gives the unit a separate read-only copy. A root-owned 600 source file therefore works even when the service runs under User=.
To use a fixed value instead of a file, set SetCredential=ID:value for the same ID. The manual warns against using it for anything secret, because unprivileged processes can read it over IPC. Use it for user IDs, public keys and similar data only.
[4] If the file exists and you still get 243, read the reason in the debug log above. These are the conditions the manual and source confirm.
- A credential, or the total for the unit, is over 1 MB. The source limit is
CREDENTIAL_SIZE_MAX, 1 MiB, and a larger file is refused. - The path is an AF_UNIX socket and the connection fails. The socket is connected once at unit start to read the data.
- Decryption of a
LoadCredentialEncrypted=credential fails. The manual says the key comes from a TPM2 chip or/var/lib/systemd/credentials.secret.
[5] After the fix, start the unit and check the result. Inside the service, read the data from ${CREDENTIALS_DIRECTORY}/ID.
# systemctl daemon-reload# systemctl reset-failed myapp.service# systemctl start myapp.service# systemctl show myapp.service -p Result -p ExecMainStatusResult=success and ExecMainStatus=0 mean credential setup passed. The step just before it is 233/RUNTIME_DIRECTORY. If the program starts and then fails, continue with reading the journal of a failed service.
Analyze your syslog · journal log in the browser ↗ — nothing is uploaded.