MarketlabMarketlabDocs

Daemon Troubleshooting

Diagnose Native, Docker, and worker failures.

Start with:

mlab daemon backend
mlab daemon status
mlab daemon events --limit 50

Native Logs

tail -f ~/.market-lab/execution/mlabd.log

Docker Logs

docker ps -a --filter name=marketlab-mlabd
docker logs marketlab-mlabd
docker inspect marketlab-mlabd

If Docker is unavailable, start Docker Desktop or Docker Engine and retry.

Independent Runtimes

If a command shows the wrong runtime or missing credentials, check that it has the intended MLAB_HOME. Omitting that variable selects the default ~/.market-lab home, not the runtime used by your previous command.

MLAB_HOME="$HOME/mlab-runtimes/alice" mlab daemon backend --output json
MLAB_HOME="$HOME/mlab-runtimes/alice" mlab daemon status --output json
docker logs mlab-alice
docker stats --no-stream mlab-alice

Use the selected container name in Docker commands and the selected home in filesystem log paths.

ProblemWhat to check
Container does not belong to this MLAB_HOMEChoose a unique container name or select its existing home. Do not delete another runtime's container to resolve the conflict.
Host port is already allocatedChoose an unused --port; separate containers can keep the same internal port.
Docker cannot enforce a requested limitEnable the required cgroup controllers on the Docker host. Setup deliberately refuses unsupported limits.
Container image or limits differ from daemon.jsonAfter stopping active work, rerun mlab daemon backend docker with the same home to apply the saved configuration.
Creating a process or thread failsInspect the container's PID usage and --pids-limit; OS threads also count.
Worker exits with memory pressureInspect Docker state and logs for an OOM kill, and review the shared container memory budget.

To change a budget, stop active jobs and managed orders, then rerun mlab daemon backend docker with the new limit. Settings changes recreate the container while retaining its state directory. See Independent Runtimes.

Worker Logs

tail -f ~/.market-lab/execution/jobs/<JOB_ID>/worker.log

mlab bot logs <JOB_ID> --follow
mlab strategy logs <JOB_ID> --follow
mlab script logs <JOB_ID> --follow

Upgrade

mlab upgrade --check
mlab upgrade

The CLI and daemon must use the same version. The official Docker daemon image is upgraded with the CLI.

For SSH connection failures, see SSH Transport.

On this page