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

SymptomLikely causeWhat to do
sg: loading configuration: …Bad SG_ENV, SG_LOG_LEVEL or SG_STATE_DIRFix the variable. See Environment variables
sg: unknown group "<x>" (exit 2)A typo, or a flag before the groupUse sg <group> <verb> [flags]
--config requires … (exit 2)Missing --configPass the spec path
Host-key or SSH failure during planHost not in ~/.ssh/known_hosts, or the wrong private keySSH in once yourself and verify the fingerprint. sg never edits known_hosts
bootstrap.deploy_user.key_path names a private or invalid keyThe deploy key must be a public key filePoint it at the .pub. A missing companion file is never searched for or generated
A tool probe fails with unexpected outputA presence check didn't return its exact marker. sg fails closed rather than guessCheck the host's shell environment. Exit 127 alone isn't taken as "not installed"
firewall.tables fails while nft is missingThe guard needs nftablesMake sure the nft tool is installed on the host

Specs and registration

Code or messageCauseWhat to do
sg:invalid-spec / sg:invalid-application-specThe spec failed validationThe message names the first broken rule
secret is unavailable: <VAR> / sg:secret-unavailableAn auth_key_env or admin_password_env variable is unset or emptyExport it in the shell that runs sg
sg:unknown-cluster / sg:cluster-not-readyThe application's cluster isn't registered or formedRun sg cluster create in the same directory first
sg:application-name-conflictThe name is bound to another spec file or clusterUse a new name. Bindings never move silently
sg:application-placement-invalid / sg:application-cluster-mismatchtarget names a non-member, or the cluster changedMatch placements to cluster.yaml

Plans and runs

CodeCauseWhat to do
sg:plan-stale (409)Live state changed after you approved the planPlan again and re-approve
sg:run-active (409)Another panel run is activeWait, or stop it with POST /api/v1/runs/{id}/stop
sg:observation-unavailable (503)Members couldn't be observedCheck connectivity, then Refresh
stopped: run … failedA change failed its step or its checkFix what it names on the host, then run the same command again

Clusters and machines

CodeCauseWhat to do
sg:cluster-teardown-unsupportedPlain sg cluster destroyOnly --with-machines completes today
sg:machine-in-clustersg machine destroy on a cluster memberDestroy the cluster with --with-machines instead
Members "diverge in LXD channel or version"Members aren't on the same LXDBring them to the same channel before forming

Applications

CodeCauseWhat to do
sg:rollback-unavailableThere's no valid generation N-1Nothing to roll back to. Deploy deliberately
sg:volume-share-unsafeA volume is shared on one member without approvalReview it; pass --force-volume-share <volume> only if you mean it
sg:service-data-on-rootService data appears to live on a root diskReview it; --confirm-root-data <instance> allows only a root-preserving restart
sg:exposure-conflict / sg:load-balancer-listen-conflictA port collides on a member, or uses a reserved control portChoose another expose or listen port
sg:service-version-unavailableNo release matches version in the vendor repository for both amd64 and arm64Use an available release
sg:service-version-incompatibleThe version change isn't safe for the existing dataStay within the major, or migrate the data yourself
sg:application-destroy-unsafeThe spec shrinks a volume or changes its content typeRestore the volume's size and type
Asked for a VM but image is of type containerA type: vm group names an image published from a containerBuild the image from a VM. See Launch a VM
LXD VM agent is not currently running at app.healthThe VM was Running but not booted far enough for lxc exec. sg tries the health check onceWait a few seconds and deploy again. The second deploy only re-checks
workstation cannot reach <addr>:<port>Deploy's exposure check failedIs your workstation on the tailnet? Is the app actually listening on that port inside the instance?

Still stuck

  • Run the read-only verb (plan or status) and read every row.
  • Set SG_LOG_LEVEL=debug for more detail.
  • Ask a coding agent with the slo-gen guide loaded to read the output with you. Tell it not to use any --force flags.