{"record":{"id":"c664371a6cd9c454","repo":"multica-ai/multica","slug":"s-is-already-running-pid-v-use-daemon-restar","errorCode":null,"errorMessage":"%s is already running (pid %v). Use 'daemon restart' to restart it","messagePattern":"(.+?) is already running \\(pid (.+?)\\)\\. Use 'daemon restart' to restart it","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":574,"sourceCode":"\n\t// Check if daemon is already running.\n\tctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)\n\tdefer cancel()\n\thealth := checkDaemonHealthOnPort(ctx, healthPort)\n\tif daemonAlive(health) {\n\t\t// A live daemon on our port that belongs to someone else is a\n\t\t// collision, not an \"already running\" — starting would fail to bind\n\t\t// and \"already running\" would send the user looking for a daemon of\n\t\t// theirs that does not exist.\n\t\tif err := daemonIdentityMismatch(health, profile, healthPort); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlabel := \"daemon\"\n\t\tif profile != \"\" {\n\t\t\tlabel = fmt.Sprintf(\"daemon [%s]\", profile)\n\t\t}\n\t\tpid, _ := health[\"pid\"].(float64)\n\t\treturn fmt.Errorf(\"%s is already running (pid %v). Use 'daemon restart' to restart it\", label, int(pid))\n\t}\n\n\tif err := requireDaemonAuth(profile); err != nil {\n\t\treturn err\n\t}\n\n\t// Resolve current executable so the foreground child reuses this binary.\n\texePath, err := daemonExecutable()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve executable path: %w\", err)\n\t}\n\n\t// Build child args: daemon start --foreground + forwarded flags.\n\targs := buildDaemonStartArgs(cmd)\n\n\t// Ensure daemon directory exists.\n\tdir := daemonDirForProfile(profile)\n\tif err := os.MkdirAll(dir, 0o755); err != nil {","sourceCodeStart":556,"sourceCodeEnd":592,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L556-L592","documentation":"Error \"%s is already running (pid %v). Use 'daemon restart' to restart it\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:574 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The daemon is already running; use 'multica daemon restart' or stop it first."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}