Skip to content

Troubleshooting

This page gives the common problems of boxfork and a procedure to correct each problem. It is for a person who runs the daemon and uses it with the CLI, the Python SDK or the MCP server.

Each error text on this page is a copy of the text in the code. Search this page for the first words of your error.

Symptom Likely cause Section
systemctl status boxfork shows a failure, or a client says could not be reached A check failed at the start of the daemon. The daemon does not start
The daemon stops with cannot reach the container engine The engine does not run, or its socket has a different path. The engine socket is not found
boxfork info shows isolation container gVisor is not installed, the engine does not know it, or it does not work. gVisor is not used
A create fails with a message about an image, the helper or the engine The engine cannot get the image or cannot start the container. A create fails
A create fails with a message about a limit, a timeout or GPUs The request is over a limit of the host, or no GPU is free. A create is refused because of a limit
boxfork gpus prints This host has no GPUs., or the daemon removes a GPU sandbox at its create The daemon did not find the GPU, or the engine did not give it to the container. A GPU is not seen
A command fails with the command's connection to the sandbox was lost The container stopped, or a process in the sandbox killed the helper. A command fails: the connection was lost
A command fails with the sandbox's helper did not answer for the command A process in the sandbox stopped or replaced the helper. A command fails: the helper did not answer
A call fails with no sandbox with that id The timeout of the sandbox ended. The default timeout is 5 minutes. A sandbox disappeared
boxfork ls shows the state suspended The sandbox was idle for its idle time. A sandbox is suspended
The column READY of boxfork pools stays below the size The daemon cannot start sandboxes for the pool. The column PROBLEM gives the reason. The pool does not fill
boxfork rmsnapshot fails with in use in the message Sandboxes or a pool use the snapshot. A snapshot cannot be deleted
The installer prints a line that starts with install.sh: and stops A condition on the machine or an option is not correct. The installer stops
A client gets send the API key as "Authorization: Bearer <key>" (HTTP 401) The client sends a key that is not the key of the daemon. The API answers 401

The daemon writes its log to its standard error output. Each line has a level (level=INFO, level=WARN or level=ERROR) and the message after msg=.

How the daemon runs Where the log is
As the service of the installer, boxfork.service In the journal of systemd. Run journalctl -u boxfork.
In a terminal, with boxfork serve In the terminal.

At each start, the daemon writes the line boxfork is serving. This line gives the address, the isolation, the GPUs, the number of sandboxes and the data directory.

The data directory holds the file api-key (the API key) and the file state.json (the state file). The daemon uses the first of these directories that applies:

  1. The value of --data-dir. The service of the installer gives /var/lib/boxfork.
  2. The value of the variable BOXFORK_DATA_DIR.
  3. /var/lib/boxfork, if the daemon runs as the root user.
  4. ~/.boxfork, for each other user.

The service of the installer also has these files:

File Content
/etc/boxfork/boxfork.env The settings of the service: BOXFORK_LISTEN, BOXFORK_ISOLATION, BOXFORK_TLS_CERT, BOXFORK_TLS_KEY and BOXFORK_EXTRA_ARGS.
/etc/systemd/system/boxfork.service The systemd unit.

After a change to the settings, run systemctl restart boxfork. The sandboxes continue to run during the restart. reference/configuration.md gives the two files.

The CLI writes an error as boxfork: and the message, and ends with the exit status 1. The Python SDK raises an error that has the same message. boxfork info shows what the daemon found at its start. See reference/cli.md.

Caution: Do not delete or edit state.json. Without its records, the daemon removes all sandbox containers at the next start.

At its start, the daemon does checks on the engine, gVisor, the GPUs, the API key and the state file. If a check fails, the daemon writes the reason and stops with the exit status 1. A client then gets the error the boxfork daemon at <address> could not be reached.

The service of the installer starts the daemon again 2 seconds after each failure (Restart=on-failure, RestartSec=2). Thus the journal can show the same error many times.

Caution: Do not start a second daemon on the same engine. At its start, a daemon removes each sandbox container that is not in its state file.

  1. Read the error. For the service, run journalctl -u boxfork. For a daemon in a terminal, read the terminal.
  2. Find the first words of the error in the table below.
  3. Do the action in the table.
  4. Start the daemon again. For the service, run systemctl restart boxfork.
  5. Run boxfork info. Make sure that it shows the engine and the isolation.
Error Cause Action
cannot reach the container engine at The engine does not run, or its socket has a different path. See The engine socket is not found.
unsupported engine address The address in --docker-host or DOCKER_HOST does not start with unix:// or tcp://. Correct the address.
gVisor was required but the container engine has no "runsc" runtime The daemon runs with --isolation gvisor, and the engine has no runsc runtime. See gVisor is not used.
gVisor was required, and the container engine lists a "runsc" runtime, but it is not usable The daemon runs with --isolation gvisor, and the trial container did not run under gVisor. See gVisor is not used.
could not check whether gVisor works The daemon could not do its trial with gVisor. For example, the engine could not pull the default image. Make sure that the engine can pull the image of --default-image. The default is ubuntu:24.04.
the API key file ... can be read by other users of this machine Other users can read the file api-key. Run the chmod 600 command that the message gives.
the API key in ... is too short to be safe The key in the file api-key has fewer than 16 characters. Delete the file. The daemon makes a new key at its start. Give the new key to each client.
the state file ... is damaged The file state.json is not valid JSON. Make a copy of the file. Read State file before you change the file.
reading the TLS certificate The daemon cannot read the files of --tls-cert and --tls-key. Give the full paths of a PEM certificate and of its private key.
--tls-cert and --tls-key go together Only one of the two flags has a value. Give the two flags, or neither of them.
reading this host's GPUs: nvidia-smi The host has nvidia-smi, but it fails. Run nvidia-smi and correct the NVIDIA driver. See A GPU is not seen.
sandboxes cannot be kept from the cloud metadata service, which --block-metadata require asks for The daemon cannot set its firewall rules. Run the daemon as root on the machine of the engine, or use --block-metadata auto. See install.md.
bind: address already in use A different program uses the address of --listen. This can be a second daemon. Stop the other program, or give a different address in --listen.
the sandbox helper for linux/<arch> is not built into this binary You built the binary without the helpers. Run make build, and start the new binary.
unexpected argument, unknown --gpu-driver, unknown --gpu-check, unknown --block-metadata, unknown isolation, --default-timeout must be more than zero, --max-timeout cannot be negative, --gpu-idle-suspend must be 0 or at least 10s A flag of boxfork serve has a wrong value. Run boxfork serve -h. reference/configuration.md gives each flag.

The checks are in serve in cmd/boxfork/main.go.

The daemon controls the engine through the Docker Engine API, on a socket. If the daemon cannot connect to the socket at its start, it stops with an error of this form:

boxfork: Get "http://engine/info": cannot reach the container engine at /var/run/docker.sock: dial unix /var/run/docker.sock: connect: no such file or directory
boxfork needs a running container engine such as Docker

The words after the second path give the reason from the operating system:

Reason Meaning
no such file or directory No socket is at the path. The engine does not run, or it uses a different path.
connection refused The file is there, but no engine listens on it.
permission denied The user of the daemon cannot use the socket.

The daemon uses the first address that it finds:

  1. The value of --docker-host.
  2. The value of the variable DOCKER_HOST.
  3. unix:///var/run/docker.sock.

The daemon does not read the contexts of the docker command.

Do these steps to correct the problem:

  1. On the machine of the engine, run docker info.
  2. If docker info fails, start Docker. On a machine with systemd, run systemctl start docker.
  3. If the socket is at a different path, give the path: boxfork serve --docker-host unix:///path/to/docker.sock.
  4. For the service of the installer, add the same flag to BOXFORK_EXTRA_ARGS in /etc/boxfork/boxfork.env.
  5. If you use Podman, do the steps in development.md.

Caution: Give access to the socket only to a user that you trust. A user who can use the socket controls each container of the engine.

  1. If the reason is permission denied, run the daemon as root, or as a user who can use the socket.
  2. Start the daemon again. For the service, run systemctl restart boxfork.

The service of the installer starts after Docker (After=docker.service). If Docker is not ready, the daemon stops, and systemd starts it again after 2 seconds. The code is NewDocker in internal/engine/docker.go.

With gVisor, the system calls of a sandbox do not go directly to the kernel of the host. Without gVisor, a sandbox is a plain container. With --isolation auto, which is the default, the daemon uses plain containers when gVisor does not work. It only writes a warning.

You see one or more of these symptoms:

  • boxfork info shows isolation container.
  • The log has the warning gVisor is not in use: sandboxes share the host kernel. Run only code you trust, or install gVisor (runsc).
  • The log has a warning that starts with the container engine lists a "runsc" runtime, but it is not usable:. The reason follows it.
  • The installer gives the warning gVisor was set up on this machine, but the daemon says sandboxes do not run under it.

At its start, the daemon starts one trial container from the default image with the runtime runsc. Then it makes sure that the engine used runsc for that container. reference/configuration.md gives the steps.

Cause How to see it
The daemon runs with --isolation container. The line BOXFORK_ISOLATION=container in /etc/boxfork/boxfork.env, or the flag on the command line.
The engine has no runtime with the name runsc. docker info does not show runsc in the list of runtimes.
The trial container stopped at its start. The reason in the log is the container stopped at once (exit code <n>).
The engine used a different runtime for the trial container. The reason in the log is the engine ran it with the "<name>" runtime instead. Podman does this.
The engine refused the trial container. The reason in the log is the error of the engine.
  1. Run boxfork info, and read the line isolation.
  2. If the daemon runs with --isolation container, change the value to auto or gvisor.
  3. Run docker info. Find runsc in the list of runtimes.
  4. If runsc is not in the list, run the installer again with the same --from archive.
  5. If runsc is in the list, read the reason in the log. Correct the cause.
  6. Restart the daemon: systemctl restart boxfork. The daemon selects the isolation only at its start.
  7. Run boxfork info. Make sure that the line isolation shows gvisor.
  8. Kill each sandbox that runs as a plain container, and create it again.

The installer of step 4 installs gVisor, registers it with Docker and tells Docker to read its settings again. A sandbox keeps the isolation of its create. boxfork ls --json shows the field isolation of each sandbox. The daemon replaces the waiting sandboxes of the pools itself, because their setup mark contains the isolation.

To make the daemon stop when gVisor does not work, use --isolation gvisor. On Podman, the isolation is always container. See development.md. The code is Detect in internal/sandbox/manager.go.

When a create fails, the daemon removes the container and releases the GPUs of the sandbox. If the engine does not remove the container, the daemon tries again later.

  1. Read the message. The CLI prints it after boxfork:. The HTTP API gives it in error.message, and a code in error.code.
  2. Find the first words of the message in the table below. Do the action.
  3. If the code is internal, read the log of the daemon. Find the line request failed with the error.
  4. Run boxfork create without options. If this create works, the cause is in the image or in the options of your request.
  5. Kill the sandbox of step 4: boxfork kill <sandbox>.
Message Cause Action
image "<name>" was not found The engine answered “not found” when it tried to pull the image. Correct the name of the image. Run docker pull <name> on the machine to see the full answer of the engine.
getting image <name>: pulling <name>: The engine could not download the image. The answer of the engine follows. Make sure that the engine can reach the registry. Run docker pull <name> on the machine to see the full error.
image "<name>" is for <system>; sandboxes run Linux images The image is not a Linux image. Use a Linux image.
no sandbox helper for architecture The image is for a chip type other than amd64 or arm64. Use an image for amd64 or arm64.
the sandbox helper for linux/<arch> is not built into this binary You built the daemon without the helpers. Run make build, and start the new binary.
the sandbox started but its helper does not answer The helper did not answer its first question in 30 seconds, or it failed. Read the text after the colon. Try the default image.
the sandbox's container was to run with the "runsc" runtime but the container engine used The engine did not use gVisor for this container. See gVisor is not used.
the sandbox's container was given GPU The GPU check of the new sandbox failed. See A GPU is not seen.
creating the sandbox:, installing the sandbox helper:, starting the sandbox: The engine refused a step. The answer of the engine follows. Read the answer of the engine. Run docker info to make sure that the engine works.
no snapshot with that id No snapshot has this identifier, or the image of the snapshot is gone from the engine. In the second case, the daemon forgets the snapshot. Run boxfork snapshots, and use a snapshot from the list.
volume not found: <name> A volume of --volume does not exist. Make the volume with boxfork mkvolume <name>. boxfork volumes lists the volumes.
invalid JSON body: unknown field The client is newer than the daemon. The daemon refuses a field that it does not know. Upgrade the daemon, or use a client of the same build.
a sandbox cannot be suspended on this host, because its files cannot be saved The request has --suspend-after, and snapshots do not work on this host. Leave out --suspend-after. boxfork info shows the line snapshot and fork.
a sandbox from image "<name>" cannot be suspended The image keeps a path in a volume of its own. A suspension does not save that volume. Mount a volume at that path, or leave out --suspend-after.

The create path is Manager.Create and boot in internal/sandbox/manager.go.

The daemon refuses a create that is over a limit of the host. Most limits come from a flag of boxfork serve. The daemon does not start a container for such a request.

Message HTTP status and code Limit Action
this host is at its limit of <n> sandboxes 429 limit_reached --max-sandboxes Kill the sandboxes that you do not need, or increase the limit.
this host does not allow sandboxes without a timeout; the most is <duration> 400 invalid_request --max-timeout Give a timeout, for example --timeout 30m.
timeout <duration> is over this host's limit of <duration> 400 invalid_request --max-timeout Give a shorter timeout.
this host has no GPUs 409 gpu_unavailable The GPUs that the daemon found at its start See A GPU is not seen.
requested <n> GPU(s) but this host has <m> GPUs 409 gpu_unavailable The GPUs of the host, or the GPUs of the model that you asked for Ask for fewer GPUs, or for a different model.
requested <n> GPU(s) but only <m> free: 409 gpu_unavailable The free GPUs Kill a GPU sandbox that you do not need. The message gives why each other GPU is not free.
a sandbox mounts at most 16 volumes 400 invalid_request 16 volumes in one sandbox Mount fewer volumes. The volumes of boxfork serve --volume also count.
This session may have at most <n> sandboxes at once A tool result with the code limit_reached --max-sandboxes of boxfork mcp (default 16) Kill a sandbox with the tool sandbox_kill, or start boxfork mcp with a larger --max-sandboxes.

--max-sandboxes counts each sandbox that a client owns: running, paused and suspended. A create in progress also counts. It does not count the waiting sandboxes of the pools.

  1. Find the message in the table above.
  2. Run boxfork ls to see the sandboxes and their state.
  3. For a GPU limit, run boxfork gpus. The column USED BY shows who has each GPU.
  4. Kill the sandboxes that you do not need: boxfork kill <sandbox>....
  5. To change a limit of the host, change the flag and restart the daemon.
  6. For the service of the installer, change the flags in BOXFORK_EXTRA_ARGS in /etc/boxfork/boxfork.env.

The same type of limit applies to snapshots (--max-snapshots), to volumes (--max-volumes) and to pools (--max-pooled). reference/configuration.md gives each flag.

Note: Nobody ran the GPU code on a machine with an NVIDIA GPU. This section comes from the code and from tests with stand-ins.

At its start, the daemon reads the GPUs of the host with nvidia-smi. It reads the list one time. If the host has no nvidia-smi, the daemon starts with no GPUs.

Symptom Cause
boxfork info shows GPUs 0, and boxfork gpus prints This host has no GPUs. nvidia-smi was not on the host at the start of the daemon.
A create with --gpu fails with this host has no GPUs The same cause.
boxfork gpus shows another program in the column USED BY A program outside boxfork uses more memory of the GPU than --gpu-busy-mb (default 512 MiB). The daemon does not give that GPU.
boxfork gpus shows nobody: not answering, or (not answering) after a sandbox nvidia-smi no longer lists the GPU.
boxfork gpus shows - (the last sandbox given it could not use it) The GPU check of the last sandbox with this GPU failed. The daemon gives this GPU after all other free GPUs.
A create fails with the sandbox's container was given GPU ... but sees or ... but has <n>, so it was removed The engine started the container without the GPU, or with a different GPU. The message ends with Check the container engine's GPU setup (--gpu-driver).
A create fails with the GPU driver fails inside it The driver does not work in the container. Under gVisor, a cause can be a driver version that gVisor does not support.
  1. Run nvidia-smi on the host. If it fails, install or correct the NVIDIA driver.
  2. Restart the daemon. The daemon reads the GPUs only at its start.
  3. Run boxfork gpus. Read the column USED BY of each GPU.
  4. With --gpu-driver nvidia, the default, make sure that the NVIDIA Container Toolkit is installed.
  5. Run docker info. Make sure that it shows the runtime nvidia.
  6. If the engine gives GPUs as CDI devices, start the daemon with --gpu-driver cdi.
  7. Under gVisor, run runsc nvproxy list-supported-drivers. Make sure that the list has your driver version.
  8. Create a sandbox with boxfork create --gpu 1.

The installer does not install the NVIDIA driver. Start from a machine image that has the driver. On a GPU machine, the installer installs the NVIDIA Container Toolkit and makes the check of step 7. It gives a warning when the toolkit is not installed or when gVisor does not support the driver.

reference/configuration.md gives --gpu-driver and --gpu-check. internals/gpu.md gives the GPU allocator and the checks.

The message is the command's connection to the sandbox was lost. Sometimes a detail follows after a colon. The connection between the daemon and the helper ended before the exit status of the command arrived.

The HTTP API gives the code internal (HTTP 500), or an error event in a streamed command. For a file operation, the message is the file operation's connection to the sandbox was lost.

These are the causes:

  • The container of the sandbox stopped. The engine stopped it, its first process ended, or a person stopped it.
  • A process in the sandbox killed the helper. The helper is the program /.boxfork/guest.

If a client killed the sandbox, or its timeout ended, the client gets no sandbox with that id and not this message. The daemon looks for stopped containers each 20 seconds. Until then, boxfork ls can still show the sandbox.

The daemon does not run the command again. The command possibly ran, completely or in part.

  1. Run boxfork ls. Find the sandbox in the list.
  2. If the sandbox is not in the list, see A sandbox disappeared.
  3. Search the log of the daemon for the identifier of the sandbox.
  4. If the log has sandbox ended on its own with oom_killed=true, the sandbox used all its memory.
  5. In that case, create the sandbox again with more memory: boxfork create --memory-mb <MiB>.
  6. If the sandbox runs, make sure that your command does not kill the process /.boxfork/guest.
  7. Find out if the command did its work before you run it again.
  8. Run the command again. The daemon opens a new connection for it.

internals/kept-connection.md gives the effect of each operation on a connection. The messages come from internal/sandbox/run.go and internal/sandbox/kept.go.

A command fails: the helper did not answer

Section titled “A command fails: the helper did not answer”

The message is the sandbox's helper did not answer for the command; whatever runs in the sandbox may have stopped it. The HTTP API gives the code internal (HTTP 500).

Only a command without stream can get this message. These clients send such commands:

  • run of the Python SDK without on_stdout and on_stderr
  • the tool sandbox_exec
  • POST /v1/sandboxes/{id}/exec without stream

boxfork exec streams each command. It does not get this message.

The daemon keeps one connection to the helper for the commands of a sandbox. The helper answers each command immediately. In this case, the helper sent nothing about the command for 10 seconds. The daemon then did these steps:

  1. It stopped the use of the connection for new commands.
  2. It told the helper to stop the command.
  3. It let the other commands on the connection continue to their end.
  4. It gave this error.

The next command opens a new connection with a new helper. The cause is a process in the sandbox that stopped the helper, for example with the signal SIGSTOP, or that replaced it. The command possibly ran. The daemon does not send it again.

Do these steps to correct the problem:

  1. Find out if the command did its work. The command possibly ran.
  2. Run a short command in the sandbox, for example true. The daemon opens a new connection for it.
  3. If the short command works, run your command again.
  4. If the error comes again, find the process in the sandbox that stops or replaces /.boxfork/guest.
  5. If you cannot find the cause, kill the sandbox and create a new one.

The flag --connection-idle 0 of boxfork serve gives each command its own connection. Then no kept connection exists. Each command then takes more time. internals/kept-connection.md gives the behavior and the measurements.

The message is no sandbox with that id; it may have timed out or been killed. The HTTP API gives the code sandbox_not_found (HTTP 404). The Python SDK raises NotFound.

The default timeout of the daemon is 5 minutes (--default-timeout). A sandbox without a timeout of its own goes 5 minutes after its create.

  1. Search the log of the daemon for the identifier of the sandbox: journalctl -u boxfork | grep <sandbox>.
  2. Find the last line about the sandbox in the table below.
  3. Do the action in the table.
Line in the log Cause Action
sandbox timed out The timeout of the sandbox ended. An MCP session sets the timeout of its sandboxes to --idle-timeout (30 minutes) after each use. Give a longer timeout. See the list below.
sandbox removed A client killed the sandbox. An MCP session kills its sandboxes when it ends. To keep the sandboxes of an MCP session after it ends, use boxfork mcp --keep.
sandbox ended on its own The container stopped without the daemon. oom_killed=true means that the sandbox used all its memory. Give the sandbox more memory with --memory-mb.
dropping a sandbox whose container is gone At a start of the daemon, the container of the sandbox did not run. Create a new sandbox.
dropping a GPU sandbox At a start of the daemon, a GPU of the sandbox had a different owner in the state. See A GPU is not seen.
dropping a suspended sandbox whose files are gone At a start of the daemon, the saved files of a suspended sandbox were not on the engine. Create a new sandbox.
No line A second daemon on the same engine removed the container, or the log is from a different daemon. Use one daemon for one engine.

To keep a sandbox for a longer time, use one of these methods:

  • Give a timeout at the create: boxfork create --timeout 2h. The value 0 gives a sandbox that does not expire, if --max-timeout permits it.
  • Set a new timeout for a sandbox that runs: set_timeout of the Python SDK, or POST /v1/sandboxes/{id}/timeout. The CLI has no command for this.
  • Pause the sandbox: boxfork pause <sandbox>. Its timeout stops while it is paused.

The column EXPIRES of boxfork ls shows the time that is left. The timeout also runs while a sandbox is suspended. A wake does not extend the timeout.

boxfork ls shows the state suspended. A suspended sandbox has no container. The daemon saved its files and released its GPUs. The sandbox keeps its identifier and its record.

The daemon suspends a sandbox that was idle for its idle time. A sandbox gets an idle time in one of two ways:

  • The create gives --suspend-after (suspend_after_seconds in the HTTP API).
  • The daemon runs with --gpu-idle-suspend. This default applies only to a sandbox with GPUs.

Idle means that no command, no file operation and no process other than the helper runs in the sandbox.

  1. Run a command in the sandbox, or do a file operation. The daemon first wakes the sandbox.
  2. To wake the sandbox before you need it, run boxfork resume <sandbox>.
  3. If the wake fails, find the message in the table below.

The first call after a suspension waits for a full start of a container. A wake restores the files and the volumes. It does not restore processes, memory or the environment variables of the create. internals/suspend.md gives the full list.

Message Cause Action
was suspended while it sat idle and cannot carry on until it has a GPU again No GPU of the requested type is free. The code is gpu_unavailable (HTTP 409). Make a GPU free, then try again. boxfork gpus shows who has each GPU.
is suspended and cannot be brought back, because a volume it mounts is gone A volume of the sandbox does not exist. The code is sandbox_stuck (HTTP 409). Make a volume with the same name: boxfork mkvolume <name>. The new volume is empty. Or kill the sandbox.
cannot come back yet: its earlier container is still being removed The engine did not remove the old container yet. Try again later.
was suspended and cannot come back The saved files are no longer on the engine. Kill the sandbox. Each call fails until a kill or the timeout.
is suspended and could not be brought back; it stays suspended, with its files A different step of the start failed. The reason follows. Read the reason, and see A create fails.
recording that sandbox <sandbox> is back The daemon could not write the state file. Read the error after the colon.

To prevent a suspension, create the sandbox with --suspend-after 0. Zero means “never”, also on a host with --gpu-idle-suspend. A suspended sandbox counts for --max-sandboxes. The code is in internal/sandbox/suspend.go.

boxfork pools shows each pool. The column READY gives the waiting sandboxes and the size, for example 3/8. The column PROBLEM gives the reason why the daemon did not start the last sandbox. A - means no problem.

The daemon starts the sandboxes of the pools in the background, each 10 seconds and after each change. It starts a maximum of 4 sandboxes at the same time and a maximum of 8 in one pass. After a failed start, the daemon waits 30 seconds before it tries that pool again.

  1. Run boxfork pools. Read READY and PROBLEM of the pool.
  2. If PROBLEM is -, wait. A large pool fills in steps of 8 sandboxes.
  3. If PROBLEM has a message, find the message in A create fails.
  4. Correct the cause. The daemon tries again in 30 seconds and clears PROBLEM after a start that works.
  5. Search the log for could not start a sandbox for a pool. The line gives the pool, its source and the error.
  6. If PROBLEM says that the files of the snapshot are no longer on this machine, delete the pool.
  7. Take a new snapshot, and create the pool again from it.

A waiting sandbox does not count for --max-sandboxes. --max-pooled (default 64) limits the sum of the sizes of all pools. The daemon applies it when you create or resize a pool.

After an upgrade or a change to the settings of the daemon, the daemon replaces all waiting sandboxes. Thus a pool can have fewer waiting sandboxes for a short time after a restart. internals/pools.md gives the fill loop. reference/cli.md gives the columns.

The daemon refuses to delete a snapshot that a pool or a sandbox uses. The HTTP API gives the code in_use (HTTP 409).

Message Cause Action
snapshot <snapshot> has a pool of sandboxes kept ready from it (<pool>); delete the pool first A pool starts its sandboxes from the snapshot. Run boxfork rmpool <pool>.
snapshot <snapshot> is in use by <n> sandbox(es) created from it; kill them first Sandboxes started from the snapshot. Their files are built on it. Suspended sandboxes also count. Kill those sandboxes. See the procedure below.
snapshot <snapshot> is still in use by a container The engine refused to delete the image of the snapshot, because a container uses it. Try again later. The daemon tries again each 20 seconds to remove each container that it could not remove before.
no snapshot with that id No snapshot has this identifier (HTTP 404, snapshot_not_found). Run boxfork snapshots.
deleting the snapshot's files: The engine could not delete the image. The answer of the engine follows. Read the answer of the engine.
  1. Run boxfork ls --json. Find each sandbox whose field snapshot has the identifier of the snapshot.

Caution: A kill removes the sandbox and all its files. If you need the files of a sandbox, take a snapshot of it first.

  1. Kill those sandboxes: boxfork kill <sandbox>....
  2. Run boxfork rmsnapshot <snapshot> again.

The code is DeleteSnapshot in internal/sandbox/snapshot.go.

The installer stops when a condition is not correct. It writes install.sh: and the reason on the standard error output, and ends with the exit status 1. For a different condition, the installer writes a line that starts with WARNING: and continues. At its end, it gives all warnings again under Warnings from this run:.

  1. Read the last line that starts with install.sh:.
  2. Find the first words of the reason in the table below.
  3. Correct the cause.
  4. Run the installer again with the same options. A second run continues the install, or upgrades in place.
Reason Action
run this as root Run the installer with sudo.
boxfork runs sandboxes on Linux Use a Linux machine. On a Mac, build from source and use a local engine. See development.md.
unsupported chip type Use an x86_64 machine or an arm64 machine.
unknown option, needs a value Run sh install.sh --help, and correct the options.
must be yes or no Give yes or no in the environment variable that the message names.
--isolation must be auto, gvisor or container, --listen must be host:port Correct the value of the option.
say where to take boxfork from: --from <file or URL> Give --from with the path of the archive. No release address is set at this time.
<file> is not a file Correct the path in --from.
a downloaded file is only installed with a checksum Give --sha256 with the checksum from the .sha256 file of the archive.
checksum mismatch for The file is not the file of the checksum. Get the file again, or correct --sha256. Nothing was installed.
is an archive without an "boxfork" file in it Use an archive that make dist made.
does not run on this machine (it must be the Linux <arch> build) Use the archive for the chip type of the machine.
--tls-cert and --tls-key go together Give the two options, or give --no-tls.
give <file> as a full path Give the full path of the file.
<file> is not a file; the service would not start without it Correct the path of the certificate or of the key.
give the certificate with --tls-cert and --tls-key, not inside --extra-args Remove the TLS flags from --extra-args, and give --tls-cert and --tls-key.
a setting in /etc/boxfork/boxfork.env goes on in the next line Put the setting on one line.
options cannot contain a line break, options cannot contain a backslash Remove the line break or the backslash from the options and from /etc/boxfork/boxfork.env.
neither curl nor wget is installed Install curl or wget.
neither sha256sum nor shasum is installed, neither sha512sum nor shasum is installed Install the checksum program.
Docker on this machine is not run by a systemd service named docker.service Install Docker Engine from https://docs.docker.com/engine/install/. The installer does not accept Docker from a snap package or a different engine.
Docker is installed but "docker info" fails Start Docker. Run docker info as root, and correct the problem that it shows.
Docker was installed but "docker info" still fails Run systemctl status docker, and correct the problem that it shows.
Docker's command is on this machine but its service is not, and --no-docker was given Complete the install of Docker Engine, or leave out --no-docker.
Docker is not installed and --no-docker was given Install Docker, or leave out --no-docker.
Docker's install script failed 3 times Read the messages of the script of Docker above the line.
Docker did not take a reload of its settings, and restarting it would stop the containers that are running Caution: A restart of Docker stops all containers, also the sandboxes. If that is acceptable, run systemctl restart docker. Then run the installer again.
"apt-get update" keeps failing Read the message of apt-get above the line.
gVisor is not installed, --no-gvisor was given, and --isolation gvisor requires it Leave out --no-gvisor, or install gVisor.
the checksum published for the gVisor download is not a SHA-512, the gVisor download did not match its checksum, the gVisor download holds no "runsc" program Run the installer again later. Nothing was installed from that download.
the gVisor download is a .tar.bz2 and this machine has no bzip2 to unpack it Install bzip2.
gVisor was installed but "runsc" is not on the PATH Make sure that the directory of runsc is in PATH.
the service was installed but the daemon does not answer (--require-daemon) See The daemon does not start.

Without --require-daemon, a daemon that does not answer in one minute gives only the warning the daemon did not answer within a minute. install.md gives the options of the installer. The installer is scripts/install.sh.

The daemon refuses each request that does not have its API key. Only GET /v1/health needs no key. The answer has the HTTP status 401, the code unauthorized and the message send the API key as "Authorization: Bearer <key>". The CLI prints this message after boxfork:. The Python SDK raises Unauthorized.

The daemon accepts the key in the header Authorization: Bearer <key> or in the header X-API-Key. A client uses the first key that it finds:

  1. The --key flag, or the argument api_key of the Python SDK.
  2. The variable BOXFORK_API_KEY.
  3. The file api-key in the data directory of the user that runs the client.

The client reads the file only for the address localhost, 127.0.0.1 or ::1. reference/cli.md gives the full rule.

These are the causes:

  • BOXFORK_API_KEY has an old key. The variable comes before the file.
  • The client reads a different file. A user who is not root reads ~/.boxfork/api-key, not the file of the service in /var/lib/boxfork. That file can hold the key of a different daemon, for example a daemon that the user started before.
  • The daemon has a new key. The daemon makes a new key when the file api-key is not there at its start.
  • The address goes to a different daemon, for example through a tunnel to a different machine.

Do these steps to correct the problem:

  1. Make sure that the daemon answers: curl http://127.0.0.1:7070/v1/health. Use the address of your daemon.
  2. Make sure that the answer is {"status":"ok"}. This route needs no key.
  3. Read the key of the daemon. For the service of the installer, run sudo cat /var/lib/boxfork/api-key.
  4. Find the key that the client sends: the --key flag, BOXFORK_API_KEY or the file.
  5. Give the correct key to the client: export BOXFORK_API_KEY=<key>.
  6. Run boxfork info.

A different error is no API key: set BOXFORK_API_KEY, or pass --key. In that case, the client found no key and sent no request. The check of the key is auth in internal/api/server.go.

  • Nobody ran the GPU procedures on a machine with an NVIDIA GPU. The GPU code ran only against stand-ins.
  • Nobody ran boxfork on x86_64 or on a real cloud account.
  • The installer ran on Ubuntu 24.04 on arm64. On a system without apt, its steps ran only against stand-ins.
  • A change to the code can change an error text. Change this page in the same pull request as the text.