hashicorp/nomad · error
failed to get plugin info for plugin %q: %v
Error message
failed to get plugin info for plugin %q: %v
What it means
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.
Source
Thrown at helper/pluginutils/loader/init.go:375
// Connect via RPC
rpcClient, err := client.Client()
if err != nil {
return nil, err
}
// Request the plugin
raw, err := rpcClient.Dispense(base.PluginTypeBase)
if err != nil {
return nil, err
}
// Cast the plugin to the base type
bplugin := raw.(base.BasePlugin)
// Retrieve base plugin information
i, err := bplugin.PluginInfo()
if err != nil {
return nil, fmt.Errorf("failed to get plugin info for plugin %q: %v", info.exePath, err)
}
info.baseInfo = i
// Parse and set the plugin version
v, err := version.NewVersion(i.PluginVersion)
if err != nil {
return nil, fmt.Errorf("failed to parse plugin %q (%v) version %q: %v",
i.Name, info.exePath, i.PluginVersion, err)
}
info.version = v
// Detect the plugin API version to use
av, err := l.selectApiVersion(i)
if err != nil {
return nil, fmt.Errorf("failed to validate API versions %v for plugin %s (%v): %v", i.PluginApiVersions, i.Name, info.exePath, err)
}
if av == "" {
l.logger.Warn("skipping plugin because supported API versions for plugin and Nomad do not overlap", "plugin", i.Name, "path", info.exePath)View on GitHub (pinned to 482b49bf1a)
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.
Example fix
// before: plugin built against vendored old base
import "github.com/hashicorp/nomad/vendor/..."
// after
import "github.com/hashicorp/nomad/plugins/base"
func (p *MyPlugin) PluginInfo() (*base.PluginInfoResponse, error) {
return &base.PluginInfoResponse{Type: base.PluginTypeDevice,
PluginApiVersions: []string{"v0.1.0"}, PluginVersion: "0.1.0"}, nil
} Defensive patterns
Strategy: try-catch
Validate before calling
// smoke-test the plugin binary's basic health before registering it
// (launch the plugin launcher externally and confirm it starts and responds)
cmd := exec.Command(pluginPath, "--help")
if err := cmd.Run(); err != nil {
log.Printf("plugin binary %s fails to run: %v", pluginPath, err)
} Try / catch
// Go: handle fingerprint errors from the loader
infos, err := loader.Load()
if err != nil {
if strings.Contains(err.Error(), "failed to get plugin info") {
log.Printf("plugin returned error from PluginInfo; rebuilding against current nomad/plugins/base: %v", err)
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- PluginInfo info failed for internal plugin %s: %v
- failed to parse plugin %q (%v) version %q: %v
- missing accessor ID
- operation on unknown device(s) "%s/%s/%s" (%v): %v
- failed to start plugin: %v
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/a6698c1fc9e7e951.
Report an issue: GitHub.