Investigate slow cPFence commands
Slow license or update requests can be caused by DNS resolution. Use root on the affected Ubuntu 22.04/24.04 server. Check the actual error before changing its resolver; a delay does not establish a DNS problem by itself.
Check the cause
Section titled “Check the cause”-
Compare a local version display with an update check:
Terminal window time cpfence --versiontime cpfence --check-updatesIn cPFence v4+, version display is local. A slow update check can also reflect network access, the remote service, or server load.
-
If this server uses
systemd-resolved, inspect its active DNS settings and query the required hosts:Terminal window systemctl is-active systemd-resolvedresolvectl statusresolvectl query my.cpfence.app api.cpfence.appReview lookup failures or long resolution times. Ubuntu resolvectl reference
Correct confirmed resolver problems
Section titled “Correct confirmed resolver problems”-
Keep a copy of
/etc/systemd/resolved.confbefore editing it. Preserve resolver requirements for private domains or provider networking. -
Under
[Resolve], set the intended reachable DNS servers. For a server intended to use Google Public DNS, the example is:[Resolve]DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844Global and per-link DNS settings can both affect resolution; inspect the effective settings rather than assume this line overrides every network. Ubuntu resolver configuration
-
Apply your intended change:
Terminal window sudo systemctl restart systemd-resolved -
Repeat the queries and timed update check. Confirm resolution and the command result improved before keeping the change.
If resolution breaks, restore the saved configuration and restart the resolver again. If DNS works but the delay remains, keep the timing and error privately and contact support; do not keep changing DNS blindly. For license rejection, follow license troubleshooting.
