crowdsecurity/crowdsec · error

plugin at %s does not exist

Error message

plugin at %s does not exist

What it means

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.

Source

Thrown at pkg/csplugin/utils_windows.go:234

	return cmd, err
}

func getPluginTypeAndSubtypeFromPath(path string) (string, string, error) {
	pluginFileName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))

	parts := strings.Split(pluginFileName, "-")
	if len(parts) < 2 {
		return "", "", fmt.Errorf("plugin name %s is invalid. Name should be like {type-name}", path)
	}
	return strings.Join(parts[:len(parts)-1], "-"), parts[len(parts)-1], nil
}

func pluginIsValid(path string) error {
	var err error

	// check if it exists
	if _, err = os.Stat(path); err != nil {
		return fmt.Errorf("plugin at %s does not exist", path)
	}

	// check if it is owned by root
	err = CheckPerms(path)
	if err != nil {
		return err
	}

	return nil
}

View on GitHub (pinned to 909b515798)

Solutions

  1. Verify the path exists: run os.Stat or 'ls <path>' and correct the configured plugin path.
  2. Install the plugin binary into the configured plugin directory (default /usr/lib/crowdsec/plugins/ on Linux, or the plugins dir set in config).
  3. If it was a stale entry, remove the plugin reference from configuration or delete the dangling file/symlink.

Example fix

// before
plugins:
  - /usr/lib/crowdsec/plugins/notification-slak
// after
plugins:
  - /usr/lib/crowdsec/plugins/notification-slack
Defensive patterns

Strategy: validation

Validate before calling

if _, err := os.Stat(pluginPath); err != nil {
	return fmt.Errorf("plugin binary missing at %s", pluginPath)
}

Try / catch

if _, err := os.Stat(path); err != nil {
	if os.IsNotExist(err) { /* handle missing plugin: fix path or reinstall */ }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06). Data as JSON: /api/errors/49ca83d122f39cb9. Report an issue: GitHub.