{"record":{"id":"a6698c1fc9e7e951","repo":"hashicorp/nomad","slug":"failed-to-get-plugin-info-for-plugin-q-v","errorCode":null,"errorMessage":"failed to get plugin info for plugin %q: %v","messagePattern":"failed to get plugin info for plugin %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"helper/pluginutils/loader/init.go","lineNumber":375,"sourceCode":"\t// Connect via RPC\n\trpcClient, err := client.Client()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Request the plugin\n\traw, err := rpcClient.Dispense(base.PluginTypeBase)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Cast the plugin to the base type\n\tbplugin := raw.(base.BasePlugin)\n\n\t// Retrieve base plugin information\n\ti, err := bplugin.PluginInfo()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get plugin info for plugin %q: %v\", info.exePath, err)\n\t}\n\tinfo.baseInfo = i\n\n\t// Parse and set the plugin version\n\tv, err := version.NewVersion(i.PluginVersion)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse plugin %q (%v) version %q: %v\",\n\t\t\ti.Name, info.exePath, i.PluginVersion, err)\n\t}\n\tinfo.version = v\n\n\t// Detect the plugin API version to use\n\tav, err := l.selectApiVersion(i)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to validate API versions %v for plugin %s (%v): %v\", i.PluginApiVersions, i.Name, info.exePath, err)\n\t}\n\tif av == \"\" {\n\t\tl.logger.Warn(\"skipping plugin because supported API versions for plugin and Nomad do not overlap\", \"plugin\", i.Name, \"path\", info.exePath)","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/helper/pluginutils/loader/init.go#L357-L393","documentation":"fingerprintPlugin() casts the go-plugin raw instance to base.BasePlugin and calls PluginInfo() to obtain the plugin's metadata (name, version, API versions). This error is returned when the plugin's PluginInfo() method itself returns an error during fingerprinting. It indicates the plugin process launched but failed to report its own metadata.","triggerScenarios":"bplugin.PluginInfo() returns a non-nil error during fingerprintPlugins: the plugin binary is a different (incompatible) implementation, its go-plugin handshake misconfigured, or the plugin panics/returns an error inside PluginInfo.","commonSituations":"Deploying a plugin built against an old/different base.BasePlugin contract; a third-party plugin that returns an error from PluginInfo due to internal initialization failure; mixing plugin binaries from different Nomad versions.","solutions":["Check the wrapped %v error from PluginInfo for the plugin's own failure message.","Rebuild the plugin against the same helper/pluginutils/base package version used by the Nomad agent.","Verify the plugin binary matches the installed Nomad version's plugin API expectations.","Test the plugin binary standalone with its own launcher command to reproduce the PluginInfo failure.","Remove or replace the malfunctioning plugin from plugin_dir."],"exampleFix":"// before: plugin built against vendored old base\nimport \"github.com/hashicorp/nomad/vendor/...\"\n// after\nimport \"github.com/hashicorp/nomad/plugins/base\"\nfunc (p *MyPlugin) PluginInfo() (*base.PluginInfoResponse, error) {\n\treturn &base.PluginInfoResponse{Type: base.PluginTypeDevice,\n\t\tPluginApiVersions: []string{\"v0.1.0\"}, PluginVersion: \"0.1.0\"}, nil\n}","handlingStrategy":"try-catch","validationCode":"// smoke-test the plugin binary's basic health before registering it\n// (launch the plugin launcher externally and confirm it starts and responds)\ncmd := exec.Command(pluginPath, \"--help\")\nif err := cmd.Run(); err != nil {\n\tlog.Printf(\"plugin binary %s fails to run: %v\", pluginPath, err)\n}","typeGuard":null,"tryCatchPattern":"// Go: handle fingerprint errors from the loader\ninfos, err := loader.Load()\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to get plugin info\") {\n\t\tlog.Printf(\"plugin returned error from PluginInfo; rebuilding against current nomad/plugins/base: %v\", err)\n\t}\n}","preventionTips":["Build plugins with the same nomad/plugins/base version as the target Nomad agent.","Test plugins standalone (their own main/launcher) before deploying to plugin_dir.","Keep plugin binaries and Nomad agent on matching release versions.","Watch agent logs at fingerprint time; a plugin failing PluginInfo fails fast."],"tags":["plugin-loader","nomad","fingerprinting","go-plugin"],"backgroundTag":"plugin-fingerprint-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"}