multica-ai/multica · error

daemon failed to start: cannot reach

Error message

daemon failed to start: cannot reach %s.
Make sure the server is running and reachable, then rerun 'multica daemon start'.
Full log: %s

What it means

daemonStartupFailureError inspects the daemon's captured startup log and, when it contains connection-refused / no-such-host style text, converts the raw failure into this actionable error. It fires when the freshly started daemon could not reach the configured Multica server URL during startup.

Solutions

  1. Make sure the server is running and reachable, then rerun 'multica daemon start'.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:770 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/6b67318c21b9caf0. Report an issue: GitHub.

Appendix: source

Thrown at server/cmd/multica/cmd_daemon.go:770

	loginHint := "multica login"
	if profile != "" {
		loginHint += " --profile " + profile
	}

	switch {
	case strings.Contains(joined, "auth token rejected") ||
		strings.Contains(joined, "returned 401") ||
		strings.Contains(joined, "not authenticated"):
		return fmt.Errorf("daemon failed to start: the server rejected your login token (it may have expired or been revoked).\nRun '%s' to sign in again, then rerun 'multica daemon start'.\nFull log: %s", loginHint, logs.logPath)
	case strings.Contains(joined, "connection refused") ||
		strings.Contains(joined, "no such host") ||
		strings.Contains(joined, "i/o timeout") ||
		strings.Contains(joined, "network is unreachable"):
		target := "the Multica server"
		if serverURL != "" {
			target += " at " + serverURL
		}
		return fmt.Errorf("daemon failed to start: cannot reach %s.\nMake sure the server is running and reachable, then rerun 'multica daemon start'.\nFull log: %s", target, logs.logPath)
	}

	var b strings.Builder
	if exitErr := (&exec.ExitError{}); errors.As(waitErr, &exitErr) {
		fmt.Fprintf(&b, "daemon exited during startup (%s).", exitErr)
	} else {
		b.WriteString("daemon exited during startup.")
	}
	excerpt := filterDaemonLogNoise(lines, 5)
	// Crash output is already raw (panics, the final cobra error line) — no
	// noise filter, just cap it like the structured excerpt.
	if len(crashLines) > 5 {
		crashLines = crashLines[len(crashLines)-5:]
	}
	excerpt = append(excerpt, crashLines...)
	if len(excerpt) > 0 {
		b.WriteString("\nLog output:")
		for _, line := range excerpt {

View on GitHub (pinned to 2c0912b6ec)