Skip to content

Troubleshooting

Start with the logs. They usually name the problem.

ComponentWhere
Serverdocker compose logs pf-central (JSON by default; set PFCENTRAL_LOG_JSON=false for text)
Agent/var/log/nats_agent.log on the firewall
Agent statusServices → pfCentral → Status, or /var/run/nats-agent.status.json
Agent serviceservice nats_agent status
Device never appears / stays "awaiting enrollment" → Enrollment (HTTP, port 443/2808)
Status tab says Enrolled, pfCentral says offline → Connection (NATS, port 24222)
Online, but a page shows an error or times out → Requests
Nobody can sign in → Web UI
Server will not start → Server start-up

You enter the right password and land back on the sign-in page with no error.

  • Plain HTTP: the session cookie is Secure by default and the browser drops it. Use HTTPS, or set PFCENTRAL_COOKIE_SECURE=false on a lab install.
  • Wrong origin: the address in the browser must be listed in PFCENTRAL_TRUSTED_ORIGINS, exactly, with scheme and port. For example https://pf.example.com.

The request’s origin is not in PFCENTRAL_TRUSTED_ORIGINS. Add your public URL. Behind a proxy, make sure it passes the original Host header.

Pages look frozen; live data does not update

Section titled “Pages look frozen; live data does not update”

A proxy is buffering the server-sent event streams or closing them early. Turn off buffering and raise the read timeout; see HTTPS for the web UI.

The server-wide rate limit (600 requests per minute by default) is used up. Busy scripts and many open live pages share it. Raise PFCENTRAL_RATELIMIT_GLOBAL_RPM.

Your role does not allow the action. See Roles and permissions. The refusal is in the audit log with the reason.

Section titled “Lost the setup link, or no owner can sign in”

Run pf-central admin setup token on the server (docker compose exec pf-central pf-central admin setup token). It prints a new link that creates an owner.

The agent trades its token for credentials at POST /enroll. Errors appear in /var/log/nats_agent.log.

Log or statusCauseFix
401 bootstrap token invalid or expiredToken used, expired (UI tokens last 1 hour) or mistypedMake a new token
500 enrollment failedA UUID-bound token was used by a firewall with a different device IDCheck kenv smbios.system.uuid matches the UUID you entered, or use an unbound CLI token
Connection refused or timeout to the enroll URLThe firewall cannot reach the web portTest with fetch -o /dev/null https://pf.example.com/login
Certificate error on the enroll URLThe proxy’s certificate is not trusted by the firewallUse a public certificate, or install your CA in System → Cert. Manager
Already enrolled when adding in the UIThis UUID has credentials alreadyUse an unbound token to re-enroll, or delete the device first

The agent has credentials but cannot stay connected to NATS.

  1. Port. From the firewall: nc -vz pf.example.com 24222. If it fails, check the server host’s firewall, the published port, and any upstream rules.
  2. Scheme. nats:// against a server with TLS on, or tls:// against one without, fails. They must match.
  3. CA. With tls://, /usr/local/etc/nats-agent/ca.crt must be the server’s current CA. Click Save in Services → pfCentral → Settings to download it again. If the server’s state/nats/tls/ was deleted, the CA changed.
  4. Name. The host in the NATS URL must be in PFCENTRAL_NATS_TLS_HOSTS. Test: openssl s_client -connect pf.example.com:24222 -CAfile /usr/local/etc/nats-agent/ca.crt -verify_hostname pf.example.com.
  5. Authorization. authorization violation in the agent log means the server refused the login: the device was deleted, or the connect-secret no longer matches (for example after a pepper change without the old value). Re-enroll the firewall.

The agent retries every few seconds forever, so it reconnects on its own once the cause is fixed.

The link loses heartbeats for more than 15 seconds at a time. Check packet loss on the path. On very poor links, raise PFCENTRAL_NATS_REGISTRY_MAX_MISSED_SWEEPS (default 3). See Online, offline and telemetry.

ErrorCauseFix
TimeoutThe firewall did not answer within 5 seconds: offline, overloaded, or a slow pfSense operationCheck the device is online and retry
Config lockedSomeone is saving in the pfSense GUI at the same momentRetry in a few seconds
Apply failedpfSense rejected the configuration when reloading the serviceRead the message; check the same area in the pfSense GUI
Stale data in a listLists may come from a short-lived cache; a background refresh starts after 30 secondsReload the page after a few seconds
LogCauseFix
desynchronised stateThe database and the state volume do not match: one was lost, replaced or restored aloneRestore both from the same backup. See Back up and restore.
Database connection errorsWrong PFCENTRAL_DATABASE_URL, or PostgreSQL not readyCheck the DSN; in Compose use depends_on with a health check
Email settings errorsEmail is on but a key, From address or credential is missingComplete the settings or set PFCENTRAL_EMAIL_ENABLED=false
External NATS errorsMissing creds files, creds from different accounts, or an expired identitySee Bring your own NATS