abiosoft/colima · warning

error starting network

Error message

error starting network: %w

What it means

A non-fatal warning logged when the daemon chain failed, network dependencies WERE installed, but the daemon's status (ctx statusKey) reports the daemon overall is not Running — i.e. the network daemon process died or never launched after installation. Distinguished from 'error setting up network dependencies' by the installed flag being true here.

Solutions

  1. Check daemon vitals in the guest: 'colima ssh -- ps aux | grep -i daemon' and its logs to find why it exited after install.
  2. Restart cleanly to re-spawn the daemon: 'colima stop -f && colima start --network-address'.
  3. After macOS upgrades, reinstall helpers and recreate: 'brew reinstall socket_vmnet' then 'colima delete -f && colima start --network-address'.
  4. If you don't need addressable VMs, drop the flag — 'colima start' — and the warning path is skipped entirely.
Defensive patterns

Strategy: retry

Validate before calling

// probe daemon liveness before declaring failure
if s, err := l.daemon.Running(ctx, conf); err == nil && s.Running {
    // safe to proceed with network-dependent steps
} else {
    log.Warnln("network daemon not running; addressable networks unavailable")
}

Try / catch

status, ok := ctx.Value(statusKey).(daemon.Status)
if ok && !status.Running {
    // one re-spawn attempt before warning
    if s2, err := l.daemon.Running(ctx, conf); err != nil || !s2.Running {
        log.Warnln(fmt.Errorf("error starting network: %w", err))
    }
}

Prevention

When it happens

Trigger: 'colima start --network-address' where installation succeeded but the root daemon immediately exits: vmnet interface creation denied by macOS, the daemon binary crashing (version mismatch after upgrade), OOM, or its runtime dependencies missing; the status probe then reports Running=false and this warning fires instead of a fatal error because network is best-effort.

Common situations: macOS upgrades breaking vmnet; colima upgraded while the VM was resumed (old daemon binary path); concurrent starts racing over the daemon socket; security software killing the privileged helper.

Related errors


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

Appendix: source

Thrown at environment/vm/lima/daemon.go:120

		})
	}

	// network failure is not fatal
	if err := a.Exec(); err != nil {
		if useVmnet {
			func() {
				installed, _ := ctx.Value(networkInstalledKey).(bool)
				if !installed {
					log.Warnln(fmt.Errorf("error setting up network dependencies: %w", err))
					return
				}

				status, ok := ctx.Value(statusKey).(daemon.Status)
				if !ok {
					return
				}
				if !status.Running {
					log.Warnln(fmt.Errorf("error starting network: %w", err))
					return
				}

				for _, p := range status.Processes {
					// TODO: handle inotify separate from network
					if p.Name == inotify.Name {
						continue
					}
					if !p.Running {
						ctx = context.WithValue(ctx, daemon.CtxKey(p.Name), false)
						log.Warnln(fmt.Errorf("error starting %s: %w", p.Name, err))
					}
				}
			}()
		}
	}

	// check if inotify is running

View on GitHub (pinned to c3a5f9184d)