{"record":{"id":"6e4c6513d8b22c34","repo":"multica-ai/multica","slug":"refusing-to-restart-cannot-reach-the-multica-serv","errorCode":null,"errorMessage":"refusing to restart: cannot reach the Multica server at %s (%w); the running daemon was left untouched.\nMake sure the server is running and reachable, then rerun 'multica daemon restart'","messagePattern":"refusing to restart: cannot reach the Multica server at (.+?) \\(%w\\); the running daemon was left untouched\\.\nMake sure the server is running and reachable, then rerun 'multica daemon restart'","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1193,"sourceCode":"\t\treturn fmt.Errorf(\"refusing to restart: invalid server URL %q: %w\", rawURL, err)\n\t}\n\n\tloginHint := \"multica login\"\n\tif profile != \"\" {\n\t\tloginHint += \" --profile \" + profile\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\tif err := cli.NewAPIClient(baseURL, \"\", cfg.Token).GetJSON(ctx, \"/api/me\", nil); err != nil {\n\t\tvar httpErr *cli.HTTPError\n\t\tif errors.As(err, &httpErr) {\n\t\t\tif httpErr.StatusCode == http.StatusUnauthorized {\n\t\t\t\treturn fmt.Errorf(\"refusing to restart: the server rejected your login token (it may have expired or been revoked); the running daemon was left untouched.\\nRun '%s' to sign in again, then rerun 'multica daemon restart'\", loginHint)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"refusing to restart: preflight check against %s failed (%w); the running daemon was left untouched\", baseURL, err)\n\t\t}\n\t\treturn fmt.Errorf(\"refusing to restart: cannot reach the Multica server at %s (%w); the running daemon was left untouched.\\nMake sure the server is running and reachable, then rerun 'multica daemon restart'\", baseURL, err)\n\t}\n\treturn nil\n}\n\nfunc runDaemonRestart(cmd *cobra.Command, args []string) error {\n\tif err := requireHumanLocalCommand(\"daemon restart\"); err != nil {\n\t\treturn err\n\t}\n\tprofile := resolveProfile(cmd)\n\tif err := requireKnownProfile(profile); err != nil {\n\t\treturn err\n\t}\n\thealthPort := healthPortForProfile(profile)\n\n\tctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)\n\tdefer cancel()\n\thealth := checkDaemonHealthOnPort(ctx, healthPort)\n\tif daemonAlive(health) {","sourceCodeStart":1175,"sourceCodeEnd":1211,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1175-L1211","documentation":"Error \"refusing to restart: cannot reach the Multica server at %s (%w); the running daemon was left untouched.\nMake sure the server is running and reachable, then rerun 'multica daemon restart'\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make sure the server is running and reachable, then rerun 'multica daemon restart'."],"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-15T17:31:12.345Z"}