abiosoft/colima · error

could not start docker-model-runner after 3 attempts

Error message

could not start docker-model-runner after 3 attempts

What it means

ensureDockerModelRunner loops up to 3 times: it checks guest.RunQuiet("docker","inspect","docker-model-runner") and, when absent, runs `docker model start-runner` then sleeps 2s. This error means the container was still not inspectable after the third attempt — start-runner is failing (image pull, disk, unsupported docker/arch) or the docker engine in the VM is unhealthy.

Source

Thrown at model/docker.go:278

	return err
}

// ensureDockerModelRunner ensures the docker-model-runner container is running.
// Attempts to start it up to 3 times if not found.
func ensureDockerModelRunner(guest environment.VM) error {
	for attempt := 1; attempt <= 3; attempt++ {
		// Check if container exists
		if err := guest.RunQuiet("docker", "inspect", "docker-model-runner"); err == nil {
			return nil
		}

		log.Infof("docker-model-runner not found, starting it (attempt %d/3)...", attempt)
		_ = guest.Run("docker", "model", "start-runner")
		time.Sleep(2 * time.Second)
	}

	return fmt.Errorf("could not start docker-model-runner after 3 attempts")
}

// getDockerModelRunnerIP returns the IP address of the docker-model-runner container.
func getDockerModelRunnerIP(guest environment.VM) (string, error) {
	output, err := guest.RunOutput("docker", "inspect", "docker-model-runner",
		"--format", "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}")
	if err != nil {
		return "", fmt.Errorf("failed to get container IP: %w", err)
	}

	ip := strings.TrimSpace(output)
	if ip == "" {
		return "", fmt.Errorf("container IP is empty")
	}

	return ip, nil
}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Run it manually and read the error: colima ssh -- docker model start-runner
  2. Check the engine: colima ssh -- docker info and docker ps; restart colima if the daemon is wedged
  3. Free disk space and retry
  4. Update Docker/colima; confirm Model Runner is supported on your arch/OS combination
Defensive patterns

Strategy: retry

Validate before calling

// Cheaper than looping: verify model support before attempting starts.
func modelRunnerAvailable(guest environment.VM) bool {
    return guest.RunQuiet("docker", "model", "version") == nil
}

Try / catch

for attempt := 1; attempt <= 3; attempt++ {
    if guest.RunQuiet("docker", "inspect", "docker-model-runner") == nil { return nil }
    _ = guest.Run("docker", "model", "start-runner")
    time.Sleep(time.Duration(attempt) * 2 * time.Second) // backoff
}
return fmt.Errorf("could not start docker-model-runner after 3 attempts — run 'docker model start-runner' in the VM for the real error")

Prevention

When it happens

Trigger: docker model start-runner erroring on each attempt (registry unreachable, disk full); docker daemon in the VM not running; docker version/arch without Model Runner support; start-runner taking longer than the fixed 3x2s window.

Common situations: Offline/proxied setups that cannot pull the runner image; low disk after storing many models; AMD64 hosts where Model Runner support is unavailable; heavy VM load making 2s sleeps insufficient.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/942ce94c6062f3eb. Report an issue: GitHub.