Troubleshooting
Refusals are deliberate. Each one names the rule it enforces, and nothing was changed. Read the message first; it usually says exactly what to fix.
Setup and SSH
| Symptom | Likely cause | What to do |
|---|---|---|
sg: loading configuration: … | Bad SG_ENV, SG_LOG_LEVEL or SG_STATE_DIR | Fix the variable. See Environment variables |
sg: unknown group "<x>" (exit 2) | A typo, or a flag before the group | Use sg <group> <verb> [flags] |
--config requires … (exit 2) | Missing --config | Pass the spec path |
Host-key or SSH failure during plan | Host not in ~/.ssh/known_hosts, or the wrong private key | SSH in once yourself and verify the fingerprint. sg never edits known_hosts |
bootstrap.deploy_user.key_path names a private or invalid key | The deploy key must be a public key file | Point it at the .pub. A missing companion file is never searched for or generated |
| A tool probe fails with unexpected output | A presence check didn't return its exact marker. sg fails closed rather than guess | Check the host's shell environment. Exit 127 alone isn't taken as "not installed" |
firewall.tables fails while nft is missing | The guard needs nftables | Make sure the nft tool is installed on the host |
Specs and registration
| Code or message | Cause | What to do |
|---|---|---|
sg:invalid-spec / sg:invalid-application-spec | The spec failed validation | The message names the first broken rule |
secret is unavailable: <VAR> / sg:secret-unavailable | An auth_key_env or admin_password_env variable is unset or empty | Export it in the shell that runs sg |
sg:unknown-cluster / sg:cluster-not-ready | The application's cluster isn't registered or formed | Run sg cluster create in the same directory first |
sg:application-name-conflict | The name is bound to another spec file or cluster | Use a new name. Bindings never move silently |
sg:application-placement-invalid / sg:application-cluster-mismatch | target names a non-member, or the cluster changed | Match placements to cluster.yaml |
Plans and runs
| Code | Cause | What to do |
|---|---|---|
sg:plan-stale (409) | Live state changed after you approved the plan | Plan again and re-approve |
sg:run-active (409) | Another panel run is active | Wait, or stop it with POST /api/v1/runs/{id}/stop |
sg:observation-unavailable (503) | Members couldn't be observed | Check connectivity, then Refresh |
stopped: run … failed | A change failed its step or its check | Fix what it names on the host, then run the same command again |
Clusters and machines
| Code | Cause | What to do |
|---|---|---|
sg:cluster-teardown-unsupported | Plain sg cluster destroy | Only --with-machines completes today |
sg:machine-in-cluster | sg machine destroy on a cluster member | Destroy the cluster with --with-machines instead |
| Members "diverge in LXD channel or version" | Members aren't on the same LXD | Bring them to the same channel before forming |
Applications
| Code | Cause | What to do |
|---|---|---|
sg:rollback-unavailable | There's no valid generation N-1 | Nothing to roll back to. Deploy deliberately |
sg:volume-share-unsafe | A volume is shared on one member without approval | Review it; pass --force-volume-share <volume> only if you mean it |
sg:service-data-on-root | Service data appears to live on a root disk | Review it; --confirm-root-data <instance> allows only a root-preserving restart |
sg:exposure-conflict / sg:load-balancer-listen-conflict | A port collides on a member, or uses a reserved control port | Choose another expose or listen port |
sg:service-version-unavailable | No release matches version in the vendor repository for both amd64 and arm64 | Use an available release |
sg:service-version-incompatible | The version change isn't safe for the existing data | Stay within the major, or migrate the data yourself |
sg:application-destroy-unsafe | The spec shrinks a volume or changes its content type | Restore the volume's size and type |
Asked for a VM but image is of type container | A type: vm group names an image published from a container | Build the image from a VM. See Launch a VM |
LXD VM agent is not currently running at app.health | The VM was Running but not booted far enough for lxc exec. sg tries the health check once | Wait a few seconds and deploy again. The second deploy only re-checks |
workstation cannot reach <addr>:<port> | Deploy's exposure check failed | Is your workstation on the tailnet? Is the app actually listening on that port inside the instance? |
Still stuck
- Run the read-only verb (
planorstatus) and read every row. - Set
SG_LOG_LEVEL=debugfor more detail. - Ask a coding agent with the slo-gen guide loaded to read the output with you. Tell it not to use any
--forceflags.