Troubleshooting
Installation and access
Section titled “Installation and access”The API does not start or keeps restarting
Section titled “The API does not start or keeps restarting”Look at the logs:
docker compose logs --tail=100 api- Database not reachable: a starting API or worker waits up to
DB_WAIT_SECONDS(default 90) for PostgreSQL, then exits. Check that thedbservice is healthy (docker compose ps) and thatDATABASE_URL(or thePOSTGRES_*variables) match the database. - Wrong database password after changing
POSTGRES_PASSWORD: the bundled PostgreSQL only applies that password when its volume is created. Either set the old value back or change the password inside the database (ALTER USER firehawk PASSWORD '...').
/api/ready tells whether the API reaches the database (HTTP 503 "database":"unreachable" when it does not).
502 Bad Gateway after recreating the API container
Section titled “502 Bad Gateway after recreating the API container”nginx in the frontend container resolves the API’s address when it starts. If only the API container was recreated (for example by docker compose up -d api), it may have a new address and the UI answers 502 Bad Gateway. Restart the frontend:
docker compose restart frontenddocker compose up -d after a pull recreates both and is not affected.
Cannot sign in with the bootstrap credentials
Section titled “Cannot sign in with the bootstrap credentials”The BOOTSTRAP_ADMIN_* values are only used to create the first account when the database has no user. Changing them in .env afterwards has no effect. Sign in with the password set at the first start, or ask another administrator to reset it under Users & access.
413 Request Entity Too Large on imports
Section titled “413 Request Entity Too Large on imports”FireHawk itself accepts request bodies up to 10 MB on /api/ (configuration imports up to 8 MB). An outer reverse proxy usually has a smaller limit (nginx: 1 MB by default). Raise it, for example client_max_body_size 10m; in nginx or the nginx.ingress.kubernetes.io/proxy-body-size: 10m ingress annotation. See TLS and reverse proxy.
Wrong links in notifications, or SSO redirect URI rejected
Section titled “Wrong links in notifications, or SSO redirect URI rejected”FireHawk builds links in notifications and the single sign-on redirect URI from its public URL: the value under Users & access, Single sign-on, Public URL, or FRONTEND_ORIGIN when that is empty. If FRONTEND_ORIGIN does not match the address users actually open (for example a different port, or http://localhost behind a TLS proxy), links point to the wrong place and the identity provider rejects the redirect URI.
Set the public URL to the real address and register exactly {public URL}/api/auth/oidc/callback at the identity provider.
Single sign-on fails with “state mismatch”
Section titled “Single sign-on fails with “state mismatch””The single sign-on login state is kept in a cookie scoped to the path /api/auth/oidc, sent back when the identity provider redirects to FireHawk. If a reverse proxy serves FireHawk under another path prefix (for example https://example.com/firehawk/), the cookie never comes back and every login fails with state mismatch. Serve FireHawk at the root of its own host name.
Also check that users open FireHawk on the same host name as the public URL.
UI or hosts unreachable over IPv6 with Docker
Section titled “UI or hosts unreachable over IPv6 with Docker”When the Docker network has IPv6 enabled, Docker forwards published ports on [::] (including ::1) to the container’s IPv6 address. A service that listens on IPv4 only then resets those connections, and because localhost often resolves to ::1 first, the UI looks down. Make the API and nginx listen on IPv6 as shown in Install with Docker Compose. If the network cannot be created (Pool overlaps with other one), choose IPv4 and IPv6 subnets that no other Docker network uses.
Background jobs
Section titled “Background jobs”Jobs stay queued, drift is never checked
Section titled “Jobs stay queued, drift is never checked”No worker is running. The Jobs page shows No worker is running. Start the workers:
docker compose up -d workerdocker compose logs --tail=50 workerOn Kubernetes, check that worker.replicaCount is not 0 and the worker pods are running. In a single-container setup without separate workers, RUN_WORKER must not be false. See Background jobs and workers.
A worker that was killed without a clean shutdown leaves its jobs running until their 120 second lease expires; then they are queued again automatically.
Managed hosts
Section titled “Managed hosts”“Host key changed”
Section titled ““Host key changed””FireHawk pins every host’s SSH key on the first connection. When the host offers a different key, FireHawk refuses to connect before sending any password or command, and the host page shows both fingerprints.
This is expected after reinstalling the host or regenerating its SSH host keys. Otherwise treat it as a possible man-in-the-middle attack.
-
On the host’s console (not over the network path you are unsure of), print the fingerprint of the key type shown:
Terminal window ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub -
If it matches the new fingerprint shown in FireHawk, click Accept new key on the host page. This needs the
hostkey.acceptpermission on the host and is audited.
Jump hosts are handled the same way on the Credentials page (Jump hosts tab).
“Not persisted”
Section titled ““Not persisted””The rules were applied, but the distribution’s boot persistence tooling is missing, so they would be lost at the next reboot. The host page shows which packages are missing. Click Install (permission host.edit) to install them with the host’s package manager and save the live rules through them, or install them yourself and click Check.
On openSUSE and SLES there is no native iptables persistence; use nftables (Tumbleweed / SLES 16) or firewalld there. On RHEL-family hosts managed with iptables, disable firewalld at boot, or it replaces the rules. See Backends and persistence.
Rules are gone after a reboot
Section titled “Rules are gone after a reboot”- Check the host’s persistence status (see above).
- On nftables hosts, only nft-native tables are saved; rules of tables created through iptables-nft (Docker, Kubernetes) are recreated by that software, not by the boot file.
- A reboot inside a safe-deploy window on iptables or nftables brings back the previous rules, because the new ones are only saved after the deploy is confirmed.
Host shows “drifted” right after a manual change or a service restart
Section titled “Host shows “drifted” right after a manual change or a service restart”Drift means the managed part of the live firewall no longer matches what FireHawk deployed. Open the Drift tab to see exactly what changed. Deploy again to restore FireHawk’s rules, or update the desired rules (for example with Load from host) if the change should stay. Software that adds its own rules (Docker, fail2ban) should be covered by the host’s other software patterns in full mode. See Drift detection.
Deploy refused
Section titled “Deploy refused”Common reasons, each shown with the error:
- A full-mode host has no chains yet: load its current rules first (Load from host).
- A host that manages IPv6 has no IPv6 rules loaded yet.
- A dynamic alias used by the host’s rules has never been fetched successfully (an empty alias would match everything).
- A rule uses a field the backend cannot express, for example a connection state on ufw or firewalld, or a destination on firewalld.
- Enabled NAT rules on a ufw host.
“Rollback pending” after a safe deploy
Section titled ““Rollback pending” after a safe deploy”FireHawk lost the connection to the host during a safe deploy and does not know yet whether the new rules kept it reachable. The host restores its previous rules by itself when the window ends if FireHawk could not confirm. A background job asks the host for the outcome after the window and keeps asking every minute until it answers; Check now on the deployment asks immediately. Make sure a worker is running.
Locked out of a host
Section titled “Locked out of a host”Safe deploy is designed to prevent this: if the new rules block FireHawk’s SSH connection, the host restores the previous rules when the window ends, and a failing command is restored immediately. Every render also keeps the management SSH port open before any drop.
If you deployed without safe deploy and lost access:
- Get console access to the host (hypervisor, cloud console, IPMI).
- Restore the rules (for example reboot, if the new rules were not persisted yet, or flush the offending rules).
- In FireHawk, roll back the deployment from the host’s Deploy tab once the host is reachable again, or fix the desired rules and redeploy.
Keep safe deploy on, especially when changing policies to DROP or editing rules for the SSH port. See Deploy and rollback.
Connection to a host times out
Section titled “Connection to a host times out”- The FireHawk API and worker containers must reach the host’s SSH port. Test from the server:
docker compose exec api python -c "import socket; socket.create_connection(('host.example.com', 22), 5)". - Hosts in other networks may need a jump host.
- Slow links: raise
SSH_CONNECT_TIMEOUT(default 10 seconds).
