EnterpriseSandboxes

Sandbox troubleshooting on managed computers

Fix managed OpenShell sandboxes on Linux and macOS: symptoms and fixes, why a sandbox is unavailable, registration alerts, status codes and relay refusals.

Start with the symptom. The reason codes and messages are in the tables below. To set sandboxes up, see Sandboxes on managed computers.

Symptoms

Why a sandbox is unavailable

When a sandbox can't run for a person, the refusal says why in words and the record carries a short reason code: the reason of log.sandbox.host_run_unavailable and log.sandbox.host_run_refused. The Windows refusal asks the person to quote it.

Reason codeWhat it meansWhat to do
required_forNot a failure. The person's profile lists this agent in required_for and the agent started on the host.The person runs defenseclaw sandbox run.
os_unsupportedWindows, WSL2, an unsupported operating system, or an Intel MacGive the people on it a profile without required_for, or alert in the floor and the profile
sandboxes_offopenshell.enabled is off on this computerTurn it on and run ensure
root_accountThe account is rootRun as a standard user
account_unverifiedDefenseClaw could not verify the account behind the callenterprise <os> profile-explain --user NAME; check the identity source
no_dockerDocker is not running (Docker driver)Start Docker for the person
no_docker_access, no_docker_groupThe Docker socket isn't read-write for the account, or the account is not in the group that can use itAdd the person to the group the message names (docker)
no_kvm_group, no_kvm_accessdriver_fallback: none and the account can't open /dev/kvmAdd the person to the group the message names (kvm), or allow the Docker fallback
no_kvmdriver_fallback: none and the CPU shows no virtualization or /dev/kvm is missingEnable hardware (nested) virtualization, or allow the Docker fallback
driver_unsupportedThe organization's driver isn't one this computer can runSet a driver the OS supports
prerequisite_missingOpenShell or Docker is missing or not set up, or the installed OpenShell runs no sandbox. The sentence names the piece, for example sandboxes are unavailable: OpenShell 0.1.5 runs no DefenseClaw sandbox: OpenShell 0.1.6 or later is required; ask your administrator to upgrade OpenShellstatus and verify print the fix line (openshell_prerequisite_missing)
account_busyAnother account holds the sandbox portsClears when that account has no sandbox running
sandbox_port_busyAn ordinary process holds the configured sandbox ingress or egress portFree that port, or set a different openshell.ingress_port or openshell.egress_port in the admin config

Registration alert reasons

The managed gateway watches each registration for a guest sighting, from five minutes after bind. The record changes no decision.

Reason codeRecordMeaning
relay_without_guest, running_without_guestlog.sandbox.registration_without_guestA watched registration was used on an admitted relay call, or reported running, without an accepted guest record since bind. The record names the account, connector, registration and sandbox.
running_after_stoplog.sandbox.registration_without_guestA running report for a registration whose sandbox was reported stopped was refused; the registration stays stopped. The daemon registers a sandbox it sees running again under a new id, so one record can also follow a sandbox started outside defenseclaw sandbox start. At most one record per registration an hour.

What ensure, status and verify report

These codes appear in the warnings and failed rows an administrator sees, in text and in --json. None is raised for a person.

CodeMeaningWhat to do
config_invalidThe candidate config does not load, with the setting and the profile named. The previous config stays in force/opt/defenseclaw/bin/defenseclaw-gateway config validate FILE, then fix the setting named
openshell_prerequisite_missingA version, binary, driver, e2fsprogs, Docker or KVM that the mode and driver need is missingRead the fix line
openshell_driver_fallbackA MicroVM prerequisite is missing but the Docker fallback is ready, so people still get sandboxesFix the prerequisite if you want MicroVMs, or set driver: docker
openshell_pin_raisedenterprise.openshell.version pins a release below 0.1.6, so the effective requirement is higherSet the pin to the release the warning names
openshell_downgradeA setup pin is below a release an account already ran (with allow_downgrade), or allow_downgrade is set with install: prerequisite, where it is ignoredRead the accounts it names; remove the key where it does not apply
openshell_launcher_conflictThe launcher path holds a file that is not DefenseClaw's link, a Python install for exampleMove that file aside, then run ensure
sandbox_user_groupsPeople who need docker or kvm are not in it. ensure never adds anyoneAdd them
docker_group_membersHow many enrolled accounts are in the docker group (Linux), which is root-equivalent. A number, never names. With required_for set, it also says a member can run a required agent outside its sandbox policyKeep the group to the accounts that run sandboxes
sandbox_pending_restartA user's daemon is outdated, or (macOS) a LaunchAgent reload waits for that user's sandboxes to stopNone: the user's next idle defenseclaw sandbox command restarts the daemon. If a macOS reload fails, the start names sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos repair
sandbox_user_stateA per-user change could not be applied or removed (units, a file that changed after DefenseClaw wrote it, a teardown)Read the message; the next run tries again
sandbox_default_profile_looserdefault_profile is looser than an assigned profile for a fieldMake default_profile repeat the stricter setting
sandbox_policy_advisoryA floor that works but probably isn't what you meant: an empty request_access, a pack without a digest, a required_for agent with no machine-owned hook, or packs read from an old data-directory folderRead the message; move packs to <policy_dir>/sandbox
sandbox_packs_dir_untrustedOther accounts can read the packs folder, or its owner or mode is not as required. ensure refuses it and verify failsMake it root:defenseclaw (macOS root:_defenseclaw), mode 0750
openshell_failedA sandbox step of the lifecycle failed (for example removing a link, or install: setup without an exact pin)Read the message

Relay refusals

The sandbox routes answer with an HTTP status and a sandbox_* reason. The user sees the sentence; the code appears in the audit record, in --json output and in the daemon log.

Reason (status)MeaningWhat to do
sandbox_registration_unknown (404), sandbox_registration_revoked, sandbox_registration_expired (410)The registration is gone, revoked, or the 30-minute pending window passed (a registration that was never bound to a sandbox)Start the sandbox again
sandbox_registration_stopped (403)The sandbox is not running: its daemon reported it stopped, or has not reported it running for five minutes. Also the answer to a running report after a reported stopdefenseclaw sandbox start
sandbox_subject_changed (409)The account behind the uid was renamed or recycledStart the sandbox again
sandbox_relay_files_unsupported (400)A client sent mount-mode file bytes; managed hosts are copy-onlyUse copy mode
sandbox_connector_mismatch (403)A hook arrived for an agent other than the one the registration was made forRun the agent only through defenseclaw sandbox run for its own sandbox
sandbox_not_allowed (403)The profile doesn't allow this sandbox: allowed: false, or the agent isn't in allowed_harnesses. The sentence is "your organization doesn't allow this sandbox"Change the profile, or point the person to the request-access contact
sandbox_decision_refused (403)An ask, unblock or "always" past what user_approvals and allow_unblock allowThe notice carries the quote to send; change the profile if the person should be allowed
sandbox_unavailable (503)Sandboxes aren't available for the account right now; the reason is one of the reason codesFix the reason
sandbox_policy_unloadable (503)The organization's sandbox policy can't be loaded on this computer. The person is told only thatRun config validate and verify; check the packs folder
enterprise_managed_rate_limited (429)Relayed hooks went over a budget (Rate budgets)The hook fails closed for that call; check the agent for a loop. A CLI command refused this way says so and changes nothing: run it again in a few seconds
enterprise_managed_root_denied (403)root called a sandbox routeRun sandboxes as the user

Rate budgets

A flood of relayed hooks hits the per-user budget (100 per second, burst 200 for all of the user's sandboxes together: the rate the managed gateway answers inside the hook's 3.5 second window). The refusal is immediate and its message names the budget, so the hook tells the user the call was over a budget, not that DefenseClaw is down.

BudgetRate
Relayed hooks, per user, all sandboxes together100 per second, burst 200
Each sandbox, at the user's daemon25 per second, burst 100
Policy writes (registrations, decisions)10 per second, burst 20

Each sandbox also has its own budget at the user's daemon (25 per second, burst 100). The receipt that confirms an allowed call counts apart, so a tool call counts once against each budget.

Messages a person can get

The text column quotes stable fragments; the complete notice adds the sandbox name, phase, affected setting or request-access contact when applicable.

CaseText
Foreign sandbox stopped"was stopped: it wasn't started with"
Foreign sandbox removed"was removed: it wasn't started with"
Foreign sandbox outlives its delete"is being removed: it wasn't started with"
Foreign sandbox still present after three reconciles"DefenseClaw couldn't remove sandbox"; use the openshell sandbox delete command in the notice
Foreign sandbox reported under foreign_sandboxes: alert"wasn't started with" and "your organization was told."
Settings drift (not for a changed rendered gateway.toml alone, which is reported without a pause)"Sandboxes are paused: your OpenShell settings differ from your organization's" and "Ask IT to repair them."
Policy can't load"Your organization's sandbox policy can't be loaded on this computer."
Another account holds the ports"Sandboxes aren't available for your account on this computer right now: another account is using them" and "Try again when that account has no sandbox running."
Your organization turned sandboxes off"turned off by your organization" in sandbox status, sandbox run and sandbox doctor
Your profile doesn't allow sandboxes"your organization doesn't allow sandboxes for your account" in sandbox status (the Sandboxes row is off and names the profile; the OpenShell row is left out), sandbox run and the sandbox doctor rows
OpenShell isn't installed, or its release runs no sandboxsandbox status and sandbox doctor say so: the OpenShell row names the reason and the Sandbox runtime row says how to get help
Directory lookup is provisional and no assignment needs the missing fact"Your organization's directory couldn't be reached, so its default policy applies for now. Try again in a moment."
An assignment needs an unconfirmed identity factThe request is refused, and the message names the missing fact.
Account can't be looked up on the computer (a new run)"Your account can't be looked up on this computer right now. Try again in a moment." and "This isn't your organization's sandbox policy."
Registration ended by the organization (a new connection)"your organization's policy no longer covers this sandbox; delete it and start it again with defenseclaw sandbox run"
Access request exceeds the profile"You can't approve this."; the notice gives the request-access contact and the caller's profile, rule, host and sandbox to quote

When several reasons apply, the person gets the first in this order: the organization turned sandboxes off, the profile doesn't allow them, OpenShell isn't installed or runs no sandbox, another account holds the ports.