{"record":{"id":"a0d874c4dc5f0fbf","repo":"netbirdio/netbird","slug":"start-service-w","errorCode":null,"errorMessage":"start service: %w","messagePattern":"start service: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/service_controller.go","lineNumber":278,"sourceCode":"\t\treturn s.Run()\n\t},\n}\n\nvar startCmd = &cobra.Command{\n\tUse:   \"start\",\n\tShort: \"starts NetBird service\",\n\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\tctx, cancel := context.WithCancel(cmd.Context())\n\t\ts, err := setupServiceControlCommand(cmd, ctx, cancel, false)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := validateJSONSocketFlags(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := s.Start(); err != nil {\n\t\t\treturn fmt.Errorf(\"start service: %w\", err)\n\t\t}\n\t\tcmd.Println(\"NetBird service has been started\")\n\t\treturn nil\n\t},\n}\n\nvar stopCmd = &cobra.Command{\n\tUse:   \"stop\",\n\tShort: \"stops NetBird service\",\n\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\tctx, cancel := context.WithCancel(cmd.Context())\n\t\ts, err := setupServiceControlCommand(cmd, ctx, cancel, false)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := s.Stop(); err != nil {\n\t\t\treturn fmt.Errorf(\"stop service: %w\", err)","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/service_controller.go#L260-L296","documentation":"The service-control start command could not start the netbird service via the OS service manager. Setup and JSON-socket validation had already passed; the failure is at the manager level — insufficient privileges, an uninstalled service, or an init-system error.","triggerScenarios":"Thrown at client/cmd/service_controller.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run with elevated privileges (root/administrator)","Install the service first if it is not present","Check the init system journal / Event Log for the manager's own error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","contentChangedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}