Skip to content

Troubleshooting

Start with bxp doctor on the CA machine and the server's log (journalctl -u bastionxp-ca -o cat). Most problems show up in one of them with a hint.

Server

Symptom Cause Fix
invalid config ... at startup A typo, an unknown key, or settings that do not fit together. The message names the key and the expected form. Check with bxp doctor.
The server asks for a passphrase, or fails without a terminal The server's keys are encrypted and no passphrase source is set. Set up a passphrase source.
the passphrase from ... does not open the server's keys The passphrase from the named place (a file, the systemd credential, BXP_KEY_PASSPHRASE_FILE or BXP_KEY_PASSPHRASE) is wrong. Fix it there. The server takes the first place that is set, in the order on Protect the CA keys.
the database is from a newer version of BastionXP CA An older binary on a database a newer one updated. Use the newer binary, or restore the backup from before the upgrade.
ca.key_passphrase_file must not be inside data_dir The passphrase file is in the data directory. Move it outside.
server.url is required for login with OIDC OIDC without server.url. Set it to the address browsers use.
login is configured, but nobody may log in oidc or ldap without access rules. Add access rules.
metrics.address must be an address of its own Metrics on the server's address. Use another port.
Warning: the root key is in data_dir root.key was not moved offline. Move it to removable storage.
A reload did nothing The new file did not load, or the change needs a restart. The log says which.

Clients

Symptom Cause Fix
cannot reach the CA server at ... Nothing answers at that address: the server is not running, or a firewall or the port is wrong. Check the address, the port, and that bxp serve runs.
the server at ... is not the CA you trust A server answers, but its certificate does not come from the root the client trusts: a wrong --ca-url or --root, a bxp trust for another CA, or something in between. Check the address and the root; compare the fingerprint with bxp fingerprint on the CA machine.
the CA server's certificate is not valid for the address ... The name used to reach the CA is not in server.names. Use a name from server.names, or add it and restart.
x509: certificate signed by unknown authority (other programs: curl, browsers, ACME clients) The program does not trust the CA's root. Give it root.crt, or install the root in the system's trust store.
bxp trust refuses the root The fingerprint does not match. Check the fingerprint with the administrator (bxp fingerprint). Never skip this.
401 missing, invalid or expired token Wrong, expired or foreign token. Get a new token; check the clocks.
401 this token was already used One certificate per token. Get a new token.
403 a name is not in the token The request asks for names the token does not allow. Ask only for the token's names.
already exists: use --force Files would be overwritten. Use --force, or another --out-dir.
this certificate came from ACME/SCEP: renew it ... bxp renew on an ACME or SCEP certificate. Use the ACME client, or bxp scep renew.
the certificate expired ... cannot be renewed Renewal after expiry. Get a new certificate with a token.
... belongs to another user (renew) bxp renew cannot give the new files the old owner. Run it as root or as the files' owner.

SSH

Symptom Fix
The server still asks for a password Check TrustedUserCAKeys and reload sshd; the principal must equal the login name exactly (ssh-keygen -L -f <cert>).
Certificate invalid: name is not a listed principal (sshd log) Request the right principal, or fix the access rules.
The client still asks to trust the host key Add the @cert-authority line for the host CA (bxp trust --ssh), with a host pattern that matches the name used.

ACME

Start with bxp list acme-orders --failed on the CA machine: for each name a client could not prove, it shows the challenge and the CA's reason. See Accounts and revocation.

Symptom Fix
the CA refused the order The name is not in acme.allowed_domains (or the IP not in allowed_ip_ranges).
the CA could not confirm that this machine is ... The CA cannot reach the host on port 80/443, or the name resolves elsewhere from the CA.
Wildcard refused Wildcards need dns-01, and dns-01 must be in acme.challenges.
429 with Retry-After A rate limit: wait, or raise the limits. Most clients wait by themselves.
the CA limits requests and refused this one: ... (bxp acme) A rate limit; the message names it and says when to try again. bxp acme does not wait.
The client cannot connect to the directory The client does not trust the CA's root: see Clients.

SCEP

Symptom Fix
The request fails with ECDSA CA keys (scepclient) Add -key-encipherment-selector.
badAlgorithm The device's key is not RSA.
badRequest Wrong or used challenge, names not allowed, or (renewal) a certificate not from SCEP: see the CA's log (SCEP request refused, with the reason).
GetCert refused The request must be signed with the certificate's own key.

Logins

Symptom Fix
Browser certificate warning during an OIDC login Install root.crt in the system trust store.
login refused: no rule for this person Add the person or one of their groups to the access rules. The log line shows the groups the provider sent: check them with bxp access check --user <name> --group <group>.
LDAP: too many failed logins Wait 15 minutes; check the password.
LDAP: the directory cannot be reached Check ldap.url, port 636, and ca_file.

Getting more detail

bxp serve --config bastionxp-ca.yaml --log-level debug