{"record":{"id":"12e9ef0c53a1dc20","repo":"hashicorp/nomad","slug":"failed-to-get-plugin-info-for-plugin-v","errorCode":null,"errorMessage":"failed to get plugin info for plugin: %v","messagePattern":"failed to get plugin info for plugin: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"helper/pluginutils/loader/loader.go","lineNumber":268,"sourceCode":"\t\treturn nil, err\n\t}\n\n\tinstance := &externalPluginInstance{\n\t\tclient:   client,\n\t\tinstance: raw,\n\t}\n\n\tif apiVersion != \"\" {\n\t\tinstance.apiVersion = apiVersion\n\t} else {\n\t\t// We do not know the API version since we are reattaching, so discover\n\t\t// it\n\t\tbplugin := raw.(base.BasePlugin)\n\n\t\t// Retrieve base plugin information\n\t\ti, err := bplugin.PluginInfo()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to get plugin info for plugin: %v\", err)\n\t\t}\n\n\t\tapiVersion, err := l.selectApiVersion(i)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to validate API versions %v for plugin %s: %v\", i.PluginApiVersions, i.Name, err)\n\t\t}\n\t\tif apiVersion == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"failed to reattach to plugin because supported API versions for the plugin and Nomad do not overlap\")\n\t\t}\n\n\t\tinstance.apiVersion = apiVersion\n\t}\n\n\treturn instance, nil\n}\n\n// getPluginMap returns a plugin map based on the type of plugin being launched.\nfunc getPluginMap(pluginType string, logger log.Logger) map[string]plugin.Plugin {","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/helper/pluginutils/loader/loader.go#L250-L286","documentation":"During plugin dispense, the loader calls PluginInfo() on the loaded base plugin to retrieve its metadata (name, API versions, etc.). If the plugin process itself returns an error from that RPC, the loader wraps it as 'failed to get plugin info for plugin: <err>'. This means the plugin was launched/reattached but could not report its own info.","triggerScenarios":"Calling loader.Dispense or loader.Reattach where the plugin's PluginInfo() method returns an error, e.g. the plugin binary crashed mid-handshake or its info endpoint failed.","commonSituations":"Broken or incompatible plugin binaries, plugins that panic during init, corrupted plugin installs, or a plugin exiting right after launch so the PluginInfo RPC fails.","solutions":["Check the wrapped error to see why the plugin failed PluginInfo()","Reinstall/upgrade the plugin binary to a version compatible with this Nomad build","Run the plugin binary manually to verify it starts and responds","Check the plugin's own logs for a panic or fatal error during startup"],"exampleFix":"// before: plugin binary built against mismatched SDK\n// after: rebuild plugin with matching go-plugin/proto\n// e.g. upgrade plugin repo's nomad-sdk dependency then redeploy the binary into the plugin_dir","handlingStrategy":"try-catch","validationCode":"// precheck: ensure plugin binary exists and is executable before Dispense\ninfo, err := os.Stat(filepath.Join(pluginDir, name))\nif err != nil || info.IsDir() { return fmt.Errorf(\"plugin binary missing\") }\nif info.Mode()&0o111 == 0 { return fmt.Errorf(\"plugin binary not executable\") }","typeGuard":null,"tryCatchPattern":"inst, err := loader.Dispense(name, ptype, cfg, logger)\nif err != nil {\n    if strings.Contains(err.Error(), \"failed to get plugin info\") {\n        logger.Error(\"plugin failed its PluginInfo RPC; reinstall/upgrade plugin\", \"err\", err)\n        // do not hot-loop; backoff and surface to operator\n    }\n    return err\n}","preventionTips":["Build plugins against the same go-plugin/proto versions as Nomad","Smoke-test plugin binaries (run standalone) before deploying into plugin_dir","Watch plugin stderr for panics at startup"],"tags":["plugin-loader","go-plugin","plugin-handshake"],"backgroundTag":"plugin-info-failed","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}