Edgeweir
Operations

Troubleshooting

Symptoms, causes, and fixes for console startup, sign-in, node channel, background job, DNS and certificate, and performance problems.

Collect first:

curl -s http://127.0.0.1:3000/healthz
docker compose ps
docker compose logs --tail 200 console | grep -E '"level":"(warn|error)"'

For deploy.sh deployments use ./deploy.sh status and ./deploy.sh logs console. Log format: logs.

Startup failures

SymptomCauseFix
invalid configuration: <variable>: <reason>, the process exitsAn environment variable is missing or malformed; one line per problemFix the variables listed; all variables in environment variables
EDGEWEIR_MASTER_KEY: is not valid base64 or must be at least 32 bytesThe master key was truncated or altered: quotes or spaces in the value, or a panel turned + into a spaceUse the output of openssl rand -base64 32 as is
EDGEWEIR_MASTER_KEY_PREVIOUS: is the same key as EDGEWEIR_MASTER_KEYBoth variables got the same value during a rotationSet EDGEWEIR_MASTER_KEY_PREVIOUS to the key from before the rotation; see master key rotation
<variable>_FILE: set either <variable> or <variable>_FILE, not bothBoth the variable and its file variable are setKeep one
<variable>_FILE: cannot read <file> or <file> is emptyThe file is not mounted, not readable (the image runs as uid 1000), or emptyCheck the mount and chown 1000
EDGEWEIR_PUBLIC_URL: expected http:// or https://host[:port] without a pathThe URL has a path or query, or a platform variable did not expand (e.g. https://${DOMAIN})Use https://host[:port]
EDGEWEIR_NODE_API_URL: expected https://, wss:// or ws://host[:port] without a pathAs above; or the port-forward variables of the old Zeabur template did not expandFix the URL; for Zeabur see migrating from the old template
database not reachable yet repeats, exit after 60 secondsDatabase not running, wrong address or credentials, no network pathdocker compose ps postgres; for an external database check DATABASE_URL and the firewall
database not reachable yet with hint: node-postgres verifies the server certificate for sslmode=require tooWith sslmode=require node-postgres also verifies the server certificateAdd sslrootcert=<CA file> to DATABASE_URL; or use uselibpqcompat=true&sslmode=require (no certificate check) or sslmode=no-verify
A migration reports permission deniedThe DATABASE_URL user lacks CREATE on the database or the public schemaMake the user the database owner or grant CREATE; a failed migration rolls back, restart after the fix
Startup stops at the migrations, no database migrated in the logAnother console instance is migrating, or a leftover session holds the migration lockWait for the other instance; find the holder with select pid from pg_locks where locktype = 'advisory' and objid = 727274 and, once it is confirmed unused, select pg_terminate_backend(<pid>)
EDGEWEIR_MASTER_KEY does not match this databaseThe master key is not the one of this database: it was replaced, or the database comes from another installationRestore the original key; to replace it, set the original as EDGEWEIR_MASTER_KEY_PREVIOUS as in master key rotation. Setting BETTER_AUTH_SECRET does not help
BETTER_AUTH_SECRET is not set, but this database was used with another secretBETTER_AUTH_SECRET was removed from an existing deploymentRestore the original value
the stored session secret cannot be opened with the configured master keyThe session secret stored after a master key rotation cannot be opened: the master key was replaced by a third valueRestore the master key from after the rotation
An old version starts but requests fail; the log names missing columns or tablesAn old image runs on a database a newer version migratedRestore from a backup as in downgrade, or return to the newer version
console is unhealthy while the process runs/healthz does not answer: startup not finished (waiting for the database, migrating)docker compose logs console shows the step it is in; see startup steps
shutdown timed out, exit code 1Requests in flight, node connections, and pg-boss did not close within 8 seconds on stopThe process exits before the container runtime's default 10-second kill; keep a platform's stop grace period at 10 seconds or more

Sign-in and sessions

SymptomCauseFix
The console redirects to /setup and there is no setup tokenNot initialized yet; the setup token is logged at every startdocker compose logs console | grep setupToken; ./deploy.sh setup-token for deploy.sh deployments
Sign-in fails or reports an untrusted originEDGEWEIR_PUBLIC_URL differs from the browser's address in scheme, host, or portFix EDGEWEIR_PUBLIC_URL and recreate the container
Back on the sign-in page right after signing inWith an https:// EDGEWEIR_PUBLIC_URL the session cookie is Secure; browsers do not keep it over http://Use HTTPS; reverse proxies in reverse proxy for the web console
"Too many requests; try again later"Sign-in rate limit; counters live in the database, shared by all instances, and survive restartsRetry after 10 seconds
The limit hits everyone at once; the audit log shows one IP for all requestsA reverse proxy in front, EDGEWEIR_TRUSTED_PROXIES unset, so every request counts as the proxy'sSet EDGEWEIR_TRUSTED_PROXIES; see trusted proxies and client IP
"This IP is not on the login allow list"The current address is not on the login IP allow listUse a network on the list; or run recover.js --clear-login-allowlist on the server; see account recovery
Forgotten password, lost two-factor device and backup codes—Account recovery
Everyone signed out and two-factor fails after changing BETTER_AUTH_SECRETTOTP secrets and backup codes are encrypted with the old secretRestore the old value; if it is lost, turn two-factor off on the server and enable it again
A passkey cannot sign inThe console's host name changed; passkeys are bound to the old oneSign in with the password, delete the old passkey, add a new one

Other sign-in messages: account troubleshooting.

Node channel

SymptomCauseFix
Startup log the node channel URL names this machine only or is a private addressThe node channel URL is localhost or a private address: nodes in other networks cannot enroll or connectSave a public URL under "Node channel" in System settings, or set EDGEWEIR_NODE_API_URL
Startup log EDGEWEIR_PUBLIC_URL is plain HTTPThe console serves install.sh over HTTP; nodes run an unencrypted script as rootServe the console over HTTPS
Connection check "Certificate mismatch: a proxy or CDN may be in front"; node reports CA pin mismatchA proxy or CDN in front of 8443 terminates TLS; the console must terminate node channel TLS itself (mTLS)Connect directly or use passthrough; set Cloudflare records to DNS only
Connection check "The console cannot connect to this URL"Wrong resolution, port not published or not allowedCheck the publishing of EDGEWEIR_NODE_API_PORT and the firewall; curl -k https://<address>:8443/ on a node returns 404
install.sh: answers 404: the console's WebSocket entry is closedThe node channel URL is wss:// or ws:// and the console's WebSocket entry is closedSave that URL in System settings, or set EDGEWEIR_NODE_API_WEBSOCKET=true; see the WebSocket entry
install.sh: cannot reach the node channel WebSocket entryThe reverse proxy does not forward the WebSocket upgrade on /node-channel, or the node does not trust the certificateConfigure the proxy as in the WebSocket entry
Node x509: certificate is valid for ..., not ...The name the node connects to is not in the node channel server certificateAdd the name to EDGEWEIR_NODE_API_HOSTNAMES and restart the console; see node channel URL and certificate
Node shows "Certificate expired"The node was offline longer than its certificate's remaining lifetime (30-day certificates) and could not renew itEnroll again on the node with a new install command plus --force, then delete the old node in the console
Nodes disconnect and reconnect periodically on a platformThe platform replaces instances (deploys, restarts, maintenance) and closes connectionsNodes reconnect and serve their last good configuration meanwhile; see the platform page's "Limitations"
"Connects from" in node details is not the node's public addressThe platform's TCP proxy or HTTP ingress does not pass the node's addressExpected; see the platform page's "Limitations"

Enrollment and node-side errors: node enrollment troubleshooting and node troubleshooting.

Background jobs

SymptomCauseFix
Certificates not renewed, DNS not synced, no alerts, old data not deletedNo worker runs: every instance has ROLE=appRun at least one instance with ROLE=all or ROLE=worker; the log shows worker started
Log pg-boss errorThe worker's database connection or a query failedCheck database availability and its connection limit; pg-boss reconnects
failed jobs of a queue keep growingThat job fails on every runFind the queue with the query in background jobs and search the log for errors of that module
After an upgrade some clusters got no new configuration; log recompile after upgrade failedPublishing that cluster failed; it keeps its revisionFix the error for the logged clusterId; the next change to that cluster publishes
A canary does not advance, node upgrade tasks expireNo worker, or nodes do not meet the health windowCheck the worker; node upgrades in node upgrade troubleshooting
envelopes still use EDGEWEIR_MASTER_KEY_PREVIOUS stays after a master key rotationSome ciphertexts cannot be re-encryptedFollow the table and record in the cannot re-seal an envelope of the previous master key lines; see master key rotation

DNS and certificates

SymptomCauseFix
Certificate state "Issuance failed"The reason on the card: domain validation, CAA, rate limits, EAB, and so onSee HTTPS troubleshooting
A self-hosted ACME directory, DNS endpoint, or webhook cannot be reached; outbound policy refusalThe target resolves to a private or reserved address, which the outbound policy refuses by defaultAllow the range in EDGEWEIR_OUTBOUND_ALLOW_CIDRS
The custom ACME directory's certificate is not trustedThe ACME directory uses a private CASave the CA certificate under the certificate authorities in System settings, or set EDGEWEIR_ACME_CA_FILE
Certificates cannot be issued when running from sourceThe certificate helper edgeweir-certd was not builtBuild it and set EDGEWEIR_CERTD_BIN; see command line
DNS records not updated, held back, or removedProvider credentials, quotas, or the mass-removal guardSee DNS steering troubleshooting
Alerts not deliveredChannel settings, SMTP ports blocked by the platform, send rate limitSee Alerts troubleshooting

Performance and resources

SymptomCauseFix
The database keeps growingHigh access log sample rate or long retention; high node log limits; the audit log is never deletedAdjust per retention; move high access log volume to ClickHouse
Statistics and log pages are slowLarge access log volume in PostgreSQLShorten retention, lower the sample rate, or use ClickHouse; see access logs
API returns 429 "Too many requests with this access key; try again in N s"The access key's request limit was exceeded; counted per processRetry after retryAfterSeconds and lower concurrency
"This cluster has reached its limit of 512 published sites"The cluster's enabled sites reached the limitDisable unused sites, or create sites in another cluster
Container memory near its limit, OOM-killedInstance too smallConfirm with docker stats --no-stream; adjust per runtime requirements or split web and worker per process roles
Disk fullOld images, container logs without a size limit, backupsSee disk and resources
Edit on GitHub

On this page