Skip to content

Troubleshooting Guide

This page helps you find out why something does not work, and what to do about it. It starts with where BastionXP keeps its files and its log, and then lists the problems that people meet most often, with their messages.

If you do not find your problem here, write to [email protected]. See What to send to support.

This page is for people who run BastionXP themselves. If you use the BastionXP cloud service, BastionXP runs the server for you, and you can skip the sections about the server.

Where things are

What Where
The program /usr/local/bin/bastionxp
The service bastionxp, a systemd service
The configuration file /etc/bastionxp/config.yaml
The key-encryption key The file in the kek_file setting, for example /etc/bastionxp/kek
The data directory /var/lib/bastionxp. With SQLite, the database sqlite3.db is here, and the server's HTTPS certificate and key, server.crt and server.key.
The log The system journal. Read it with journalctl -u bastionxp.
The client's files ~/.bxp-cli, on each machine where you run bxp-cli

BastionXP does not create the configuration file when you install the package. You create it. See Configuration.

The commands you need

sudo systemctl status bastionxp          # is it running?
sudo systemctl restart bastionxp         # restart it, after a change in config.yaml
sudo journalctl -u bastionxp -f          # follow the log
sudo journalctl -u bastionxp -n 50       # the last 50 lines
sudo journalctl -u bastionxp --since "1 hour ago"
bastionxp --version                      # the version

Always restart BastionXP after you change the configuration file. The change does not take effect before.

Make the log more detailed

When you investigate a problem, ask BastionXP for more detail. Add this to config.yaml, restart, and reproduce the problem:

log:
  level: debug

Set it back to info afterwards. See The log.

BastionXP does not start

Run sudo journalctl -u bastionxp -n 20. BastionXP says why it does not start. These are the messages you may see:

The message says What it means and what to do
the configuration file ... has a setting BastionXP does not know: "kek_flie" The file has a setting with a wrong name. Check its spelling against Configuration, or remove it.
the configuration file ... is not valid: unmarshal errors The file is not correct YAML. Check the indentation, and that each line is name: value.
the configuration file ... has "authorities" Authorities are not set in the configuration file. Remove the authorities setting. Create and manage authorities in the portal, in Authority Manager.
"email", the primary admin's email, is required Add the email setting. It is the address of the first administrator.
"http_port" and "https_port" must differ You gave the same port to both. Give them different ports.
log: "level" must be debug, info, warn or error The log level has a wrong value.
the server's HTTPS certificate and private key are missing Put server.crt and server.key in the data directory, or set lets_encrypt_server_cert: true. The message names the files. See The server's HTTPS certificate.
the server's HTTPS certificate and private key cannot be used The certificate and the key do not match, or one of them is damaged. Get the right pair.
no key-encryption key (KEK) is configured, or other messages about the KEK See If BastionXP does not start.
database: connect to the database BastionXP cannot open or reach its database. With SQLite, check that data_dir exists and that BastionXP may write to it. With PostgreSQL, check the database settings, the network, and the password.
address already in use Another program uses the port. Stop it, or choose other ports with https_port and http_port.

BastionXP also does not start when it cannot write its first audit event. This protects you from running without an audit record. See Audit logging.

I cannot sign in to the portal

See Troubleshooting in Sign in and set up your account. It lists every message of the sign-in. For single sign-on, see Single sign-on for the portal.

If you lost the setup link of the first administrator, make a new one:

sudo bastionxp admin setup-link --config /etc/bastionxp/config.yaml

The bxp-cli client cannot connect

The message says What it means and what to do
tls: failed to verify certificate: x509: certificate signed by unknown authority This machine does not trust the certificate of the BastionXP server itself. Use a certificate from a CA that the machine trusts, or add the server's certificate to the machine's trust store. See The server's HTTPS certificate and Getting started.
connection refused BastionXP is not running, or a firewall blocks the port. Check systemctl status bastionxp, and TCP port 443 (or your https_port).
The fingerprint does not match in bxp-cli trust The fingerprint that you gave is not the one of the root CA. Copy it again from the root CA's card in Authority Manager. See Trust the CA.
The token is refused A token is valid for 10 minutes, and only for its purpose. Create a new one. See Tokens.

Certificates are not issued

What you see What to check
CA operation halted: audit logging unavailable BastionXP could not write the audit event, so it did not issue the certificate. Check the database, and the syslog server if you send the audit log there. See Audit logging.
This authority cannot issue certificates in Authority Manager The card gives the reason. See If an authority cannot issue certificates.
A client is refused for its name The verifier's name policy does not allow the name. Check the verifier's Name policy in the authority's page.
A request is refused as too frequent The authority or the verifier has a rate limit. See Rate limits.
A one-time token does not work It expired after 10 minutes, it was used already, or it has the wrong purpose. Create a new one.

The Prometheus metrics count the refused requests, by reason.

A revoked certificate is still accepted

BastionXP tells other systems about a revoked certificate through the authority's CRL and OCSP responder. They are optional, and they are off until you turn them on. Open the authority in Authority Manager, and check Revocation status. If both say Off, turn them on in the authority's settings. See Revocation.

A system that checks the CRL only downloads it now and then, and only as often as the CRL's validity allows. A system may therefore accept a revoked certificate for a while after the revocation.

What to send to support

Send these with your question:

  • The version: bastionxp --version, and bxp-cli --version if the problem is on a client.
  • What you did, what you expected, and what happened.
  • The relevant part of the log: sudo journalctl -u bastionxp --since "1 hour ago". Set the log level to debug first, if you can reproduce the problem.
  • Your configuration file, without secrets. Remove passwords, client secrets and tokens.

Never send the key-encryption key, private keys, setup links, recovery codes or tokens.