abiosoft/colima · info
pid file not found: %w
Error message
pid file not found: %w
What it means
Returned by status (cmd/daemon/daemon.go:115) when os.Stat fails on the daemon pid file (daemon.pid in the daemon directory). Within colima this is less an error than the 'daemon not running' sentinel: start() treats a non-nil status() result as not-running and proceeds, and stop() returns nil early.
Source
Thrown at cmd/daemon/daemon.go:115
for {
alive := status() == nil
if !alive {
return nil
}
select {
case <-ctx.Done():
return ctx.Err()
default:
time.Sleep(time.Second * 1)
}
}
}
func status() error {
info := Info()
if _, err := os.Stat(info.PidFile); err != nil {
return fmt.Errorf("pid file not found: %w", err)
}
// check if process is actually running
p, err := os.ReadFile(info.PidFile)
if err != nil {
return fmt.Errorf("error reading pid file: %w", err)
}
pid, _ := strconv.Atoi(string(p))
if pid == 0 {
return fmt.Errorf("invalid pid: %v", string(p))
}
process, err := os.FindProcess(pid)
if err != nil {
return fmt.Errorf("process not found: %v", err)
}
if err := process.Signal(syscall.Signal(0)); err != nil {View on GitHub (pinned to c3a5f9184d)
Solutions
- No action needed if the daemon is expected to be stopped — this message means 'not running'
- To have it running, start colima normally (features needing the daemon start it on demand) and re-check status
- If it should be running, the daemon died earlier — inspect daemon.log in the same directory for the cause
Defensive patterns
Strategy: validation
Validate before calling
// Interpret missing pid file as 'not running' instead of an error
info := daemon.Info()
if _, err := os.Stat(info.PidFile); os.IsNotExist(err) {
// daemon not running — proceed with start or report stopped status
} Type guard
// Classify daemon status outcomes
func daemonNotRunning(err error) bool {
return err != nil && strings.HasPrefix(err.Error(), "pid file not found")
} Try / catch
if err := daemonStatus(); err != nil {
if daemonNotRunning(err) {
// expected state on fresh installs — not a fault
return stoppedState, nil
}
return err
} Prevention
- Expect this message on fresh installs or after uninstalls — it is a sentinel, not a fault
- Start the daemon implicitly by using features that require it, then re-check status
- If the daemon should be running, look at daemon.log beside the pid file for the real crash cause
When it happens
Trigger: Any status/start/stop flow before the daemon has ever been started; the daemon crashed without cleaning up its pid file; cleanup tools removed the pid file; the daemon directory was deleted.
Common situations: Checking daemon status on a fresh install; inspecting the daemon after a colima uninstall/reinstall; log inspection showing this error although nothing is actually wrong.
Related errors
- invalid pid: %v
- process signal(0) returned error: %w
- cannot make dir: %w
- process not found: %v
- error checking vmnet process: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/73404c72d062c764.
Report an issue: GitHub.