hashicorp/nomad · error
failed to launch docker logger plugin: %v
Error message
failed to launch docker logger plugin: %v
What it means
This error comes from setupNewDockerLogger when `docklog.LaunchDockerLogger(d.logger)` cannot spawn the docker-logger plugin subprocess (a go-plugin launch). Any plugin.Client launch failure is wrapped here; if a pluginClient handle was partially created it is killed first, then the task start/recover aborts with this message.
Source
Thrown at drivers/docker/driver.go:222
if err != nil {
return nil, nil, err
}
dlogger, dloggerPluginClient, err := docklog.ReattachDockerLogger(reattach)
if err != nil {
return nil, nil, fmt.Errorf("failed to reattach to docker logger process: %v", err)
}
return dlogger, dloggerPluginClient, nil
}
func (d *Driver) setupNewDockerLogger(container mclient.ContainerInspectResult, cfg *drivers.TaskConfig, startTime time.Time) (docklog.DockerLogger, *plugin.Client, error) {
dlogger, pluginClient, err := docklog.LaunchDockerLogger(d.logger)
if err != nil {
if pluginClient != nil {
pluginClient.Kill()
}
return nil, nil, fmt.Errorf("failed to launch docker logger plugin: %v", err)
}
if err := dlogger.Start(&docklog.StartOpts{
Endpoint: d.config.Endpoint,
ContainerID: container.Container.ID,
TTY: container.Container.Config.Tty,
Stdout: cfg.StdoutPath,
Stderr: cfg.StderrPath,
TLSCert: d.config.TLS.Cert,
TLSKey: d.config.TLS.Key,
TLSCA: d.config.TLS.CA,
StartTime: startTime.Unix(),
}); err != nil {
pluginClient.Kill()
return nil, nil, fmt.Errorf("failed to launch docker logger process %s: %v", container.Container.ID, err)
}
return dlogger, pluginClient, nilView on GitHub (pinned to 482b49bf1a)
Solutions
- Confirm the docker-logger plugin binary exists in the expected plugin path and is executable (chmod +x).
- Reinstall or repair the Nomad client installation so the plugin ships with a matching version.
- Check client logs for the underlying launch error (exec not found vs handshake timeout) and fix permissions/SELinux/AppArmor accordingly.
- Ensure the plugin handshake timeout is sufficient on slow or heavily loaded hosts.
Example fix
// before: plugin missing or not executable -rw-r--r-- nomad-docker-logger // after chmod +x /opt/nomad/plugins/nomad-docker-logger && systemctl restart nomad
Defensive patterns
Strategy: validation
Validate before calling
p := filepath.Join(pluginDir, "nomad-docker-logger")
if fi, err := os.Stat(p); err != nil || !isExecutable(fi) {
return fmt.Errorf("docker logger plugin missing or not executable at %s", p)
} Type guard
func isPluginLaunchErr(err error) bool { return err != nil && strings.Contains(err.Error(), "failed to launch docker logger plugin") } Try / catch
dlogger, client, err := setupNewDockerLogger(...)
if err != nil {
if isPluginLaunchErr(err) {
logger.Error("plugin launch failed; check binary/permissions", "err", err)
return retry.NewBackoff().Do(func() error { return startTask(cfg) })
}
return err
} Prevention
- Verify plugin binary presence and +x permission in client health checks before scheduling.
- Install plugins via package management so upgrades never leave a partial/missing binary.
- Test plugin exec under the client's SELinux/AppArmor profile.
- Restart the Nomad client after installing or replacing plugins.
When it happens
Trigger: StartTask or RecoverTask call setupNewDockerLogger and the plugin launcher fails: the docker-logger binary is missing or not executable, the plugin handshake timed out, or the launch failed at exec time.
Common situations: Nomad data_dir or plugin directory missing/inaccessible; binary removed by a partial upgrade; overly restrictive permissions or AppArmor/SELinux blocking exec of the plugin; environment (e.g. containerized client) lacking the runtime to execute the plugin.
Related errors
- failed to reattach to docker logger process: %v
- failed to launch docker logger process %s: %v
- failed to get docker client: %w
- task with ID %q already started
- failed to decode driver config: %v
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/388e7fb82b558fe3.
Report an issue: GitHub.