{"record":{"id":"49ca83d122f39cb9","repo":"crowdsecurity/crowdsec","slug":"plugin-at-s-does-not-exist","errorCode":null,"errorMessage":"plugin at %s does not exist","messagePattern":"plugin at (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/csplugin/utils_windows.go","lineNumber":234,"sourceCode":"\treturn cmd, err\n}\n\nfunc getPluginTypeAndSubtypeFromPath(path string) (string, string, error) {\n\tpluginFileName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))\n\n\tparts := strings.Split(pluginFileName, \"-\")\n\tif len(parts) < 2 {\n\t\treturn \"\", \"\", fmt.Errorf(\"plugin name %s is invalid. Name should be like {type-name}\", path)\n\t}\n\treturn strings.Join(parts[:len(parts)-1], \"-\"), parts[len(parts)-1], nil\n}\n\nfunc pluginIsValid(path string) error {\n\tvar err error\n\n\t// check if it exists\n\tif _, err = os.Stat(path); err != nil {\n\t\treturn fmt.Errorf(\"plugin at %s does not exist\", path)\n\t}\n\n\t// check if it is owned by root\n\terr = CheckPerms(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":216,"sourceCodeEnd":245,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/csplugin/utils_windows.go#L216-L245","documentation":"pluginIsValid checks a plugin binary path before registration; if os.Stat fails, the file does not exist at that path, so this error is returned. CrowdSec refuses to load a plugin whose binary cannot be found on disk.","triggerScenarios":"Registering a plugin via pluginIsValid (or the plugin watcher loading the plugin directory) with a path that is missing, misspelled, or where the binary was deleted/moved after configuration.","commonSituations":"Wrong path in plugin configuration; plugin directory configured but plugins never installed; binary removed by packaging upgrade; symlink pointing to a nonexistent target; wrong drive/path on Windows.","solutions":["Verify the path exists: run os.Stat or 'ls <path>' and correct the configured plugin path.","Install the plugin binary into the configured plugin directory (default /usr/lib/crowdsec/plugins/ on Linux, or the plugins dir set in config).","If it was a stale entry, remove the plugin reference from configuration or delete the dangling file/symlink."],"exampleFix":"// before\nplugins:\n  - /usr/lib/crowdsec/plugins/notification-slak\n// after\nplugins:\n  - /usr/lib/crowdsec/plugins/notification-slack","handlingStrategy":"validation","validationCode":"if _, err := os.Stat(pluginPath); err != nil {\n\treturn fmt.Errorf(\"plugin binary missing at %s\", pluginPath)\n}","typeGuard":null,"tryCatchPattern":"if _, err := os.Stat(path); err != nil {\n\tif os.IsNotExist(err) { /* handle missing plugin: fix path or reinstall */ }\n}","preventionTips":["Confirm the binary exists with ls/os.Stat before configuring it","Use the distribution package or official install paths for plugins","Check symlinks resolve to existing targets"],"tags":["plugins","file-not-found","configuration"],"backgroundTag":"file-not-found","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}