Api

Error Codes

ZMQ error responses from uPKI CA.

Error Codes

ZMQ error format

All errors are returned as:

{
  "EVENT": "UPKI ERROR",
  "MSG": "<human-readable error message>"
}

Common errors

Message patternCauseResolution
Unknown task: <task>The TASK field contains an unrecognised valueCheck the task name against the ZMQ protocol reference
Profile <name> not foundThe requested certificate profile does not existRun list_profiles to see available profiles
Certificate not found: <dn>No certificate exists with the given DNVerify the DN with list_nodes
Invalid seedThe registration seed does not matchCheck UPKI_CA_SEED matches the seed printed at init
Certificate already exists: <dn>A certificate for this CN is already activeRenew the existing certificate with renew
Node is revoked: <dn>The target certificate has been revokedUnrevoke with unrevoke or delete and reissue
Storage error: <detail>Filesystem or TinyDB errorCheck disk space and permissions on UPKI_DATA_DIR
Key generation failedCryptographic error during key creationCheck key type and length in ca.config.yml
CSR parse errorThe provided CSR is malformedEnsure the CSR is in valid PEM format

HTTP-level errors (from RA proxying to CA)

When the RA forwards a request to the CA and the CA returns an error, the RA translates it:

ZMQ errorACME error typeHTTP status
Invalid seedurn:ietf:params:acme:error:unauthorized403
Certificate not foundurn:ietf:params:acme:error:malformed400
Profile not foundurn:ietf:params:acme:error:malformed400
Generic CA errorurn:ietf:params:acme:error:serverInternal500

Debugging tips

Enable debug output on the CA:

python ca_server.py start --debug

Or check the RA logs — the RA logs every ZMQ request and response it sends to the CA:

docker logs upki-ra --follow
Copyright © 2026