Skip to content
COMA

Troubleshooting

Diagnose COMA with coma doctor and coma endpoint doctor, and fix local fallback, busy ports, sync conflicts and reconnects.

Start with coma doctor

coma doctor

coma doctor checks the COMA installation, then the tools on your computer for traps that send commands somewhere other than the machine. Every check reports PASS, WARN or FAIL, with a hint after -> when something needs attention:

PASS  version                coma v0.1.0-rc.4-3-g07087e6 (07087e66d988), go1.27.1
PASS  platform               darwin is supported
PASS  paths                  resolved from macos
PASS  run-dir-socket-length  endpoint socket paths fit (72 of 103 bytes)
PASS  run-dir                /Users/you/.coma/run is private (0700)
PASS  config                 valid
PASS  state-db               schema v9
PASS  state-writable         write transaction succeeded
PASS  current-context        "default" exists
PASS  local-fallback         watching 2 local engine(s); none used while connected
WARN  docker-credentials     Docker's config.json names helpers that are not installed: docker-credential-osxkeychain; every image pull fails
                             -> remove credsStore/credHelpers from config.json or install the helper; tools that work around it with DOCKER_CONFIG lose the coma context
PASS  docker-compose         /usr/local/bin/docker-compose 2.39.3
PASS  cli-routing            connected to dev (docker)
PASS  sync-helper            /Users/you/.local/lib/coma/coma-sync (Mutagen)

13 passed, 1 warnings, 0 failed
CheckWhat it looks at
version, platformThe build, and whether this OS is supported
paths, run-dir-socket-length, run-dirWhere COMA keeps its files; socket paths fit the OS limit; the run directory is private
configThe config file parses and its values are valid
state-db, state-writableThe local state database opens, has a known schema and accepts writes
current-contextThe current COMA context exists
local-fallbackContainers created on a local engine while you were connected
docker-credentialsCredential helpers named in Docker's config.json are installed
docker-composeEvery docker-compose on PATH, and whether any is Compose v1
cli-routingWhile connected: whether the podman CLI (and a docker alias for it) reaches the same machine
sync-helperThe coma-sync helper is installed and matches this COMA

A WARN does not change the exit code. Any FAIL makes coma doctor exit with 10 (doctor_failed), so scripts and coding agents can act on it. coma doctor --json returns the same report as a DoctorReport.

Check one endpoint

An endpoint is the local socket that serves one machine's engine. Endpoints are named <machine>-<engine>; coma endpoint list shows them and their state (ready, reconnecting, degraded, stopped).

coma endpoint doctor dev-docker

checks comad, the endpoint's state, that the engine answers through the socket, and whether the coma Docker context reaches it. It exits with 10 when a check fails.

To see what COMA did to the last container it handled:

coma endpoint doctor dev-docker --explain-last

This shows the most recent request COMA intercepted: whether it was forwarded or refused (and why), and each change: ports moved to 127.0.0.1 on the machine, -P expanded, bind sources mapped to the synced copy, the Docker socket mapped, a start held until port mirrors were open. Request bodies are never stored or shown.

Common problems

Logs

Every command can log to stderr:

FlagShows
--verboseWhat is happening (info level)
--debugDebug logs
--traceTrace logs, including timings
--log-format jsonLogs as JSON lines instead of text

COMA_LOG_LEVEL and COMA_LOG_FORMAT set the same for every command. See Environment variables.

comad, COMA's background process, writes its own log, with a date and time on every line. Print the end of it with:

coma daemon logs --lines 100

coma daemon status shows whether comad is running and where the log is:

Setupcomad log
macOS~/Library/Logs/coma/comad.log
Linux$XDG_STATE_HOME/coma/logs/comad.log (default ~/.local/state/coma/logs/comad.log)
COMA_HOME set$COMA_HOME/logs/comad.log

coma daemon stop stops comad. Docker commands through COMA then fail until the next coma connect, which starts it again.

If COMA itself hits a bug, it says so and asks you to report it with the output of coma doctor --json. Add --debug to the failing command to include a stack trace.

On this page