{"record":{"id":"093d013d55601a39","repo":"chenhg5/cc-connect","slug":"daemon-management-is-not-supported-on-s-use-a-pr","errorCode":null,"errorMessage":"daemon management is not supported on %s; use a process manager (e.g. nssm, pm2) instead","messagePattern":"daemon management is not supported on (.+?); use a process manager \\(e\\.g\\. nssm, pm2\\) instead","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"daemon/unsupported.go","lineNumber":11,"sourceCode":"//go:build !linux && !darwin && !windows\n\npackage daemon\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n)\n\nfunc newPlatformManager() (Manager, error) {\n\treturn nil, fmt.Errorf(\"daemon management is not supported on %s; use a process manager (e.g. nssm, pm2) instead\", runtime.GOOS)\n}\n\n// CheckLinger is a no-op on unsupported platforms (always returns false).\nfunc CheckLinger() (enabled bool, user string) {\n\treturn false, \"\"\n}\n","sourceCodeStart":1,"sourceCodeEnd":18,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/daemon/unsupported.go#L1-L18","documentation":"daemon/unsupported.go is the build-tag-selected fallback for operating systems cc-connect has no daemon manager for (anything other than Linux/systemd, macOS/launchd, Windows/schtasks). Its newPlatformManager unconditionally returns this error naming runtime.GOOS. It tells the user daemon install/uninstall is a no-go on that OS and to use a native process manager such as nssm or pm2.","triggerScenarios":"Running any `cc-connect daemon ...` subcommand on an OS without a dedicated daemon implementation (e.g. FreeBSD, OpenBSD, NetBSD, Solaris, AIX, plan9), or on a Linux/macOS/Windows build compiled with the daemon-specific platform files excluded via build tags.","commonSituations":"Deploying cc-connect on a BSD server; cross-compiling with GOOS set to an unsupported value; building with exclusions that drop daemon/ files for the target platform.","solutions":["Use a native process manager on that OS: nssm on Windows-adjacent setups, pm2 (`pm2 start cc-connect`), supervisord, s6, or rc.init scripts on BSD","Run cc-connect under a container orchestrator (Docker restart policy, Kubernetes) instead of a local daemon","If the OS should be supported, build for a supported target (linux/darwin/windows) or contribute a daemon/<os>.go Manager implementation","For long-running use, wrap the process in tmux/screen as a stopgap"],"exampleFix":"// before (on FreeBSD)\n$ cc-connect daemon install\n// error: daemon management is not supported on freebsd\n// after: use pm2\n$ pm2 start cc-connect --name cc-connect\n$ pm2 save && pm2 startup","handlingStrategy":"fallback","validationCode":"supported := map[string]bool{\"linux\": true, \"darwin\": true, \"windows\": true}\nif !supported[runtime.GOOS] {\n    // use pm2/nssm/supervisord instead of cc-connect daemon\n    fmt.Println(\"daemon subcommands unsupported here; use pm2 or a native supervisor\")\n}","typeGuard":null,"tryCatchPattern":"mgr, err := daemon.NewPlatformManager()\nif err != nil {\n    if errors.Is(err, daemon.ErrUnsupportedPlatform) || strings.Contains(err.Error(), \"not supported on\") {\n        return superviseWithPm2(cfg) // external supervisor fallback\n    }\n    return err\n}","preventionTips":["Check runtime.GOOS / the target OS in deployment scripts and pick a supervisor (pm2, nssm, supervisord, s6) accordingly","Build only for supported GOOS/GOARCH combinations in CI (linux, darwin, windows)","Avoid stripping daemon platform files with build tags on targets where you need `daemon install`","For containers/BSDs, standardize on an external process manager instead of in-app daemon management"],"tags":["daemon","platform-support","goos","process-management"],"backgroundTag":"unsupported-platform","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}