{"record":{"id":"388e7fb82b558fe3","repo":"hashicorp/nomad","slug":"failed-to-launch-docker-logger-plugin-v","errorCode":null,"errorMessage":"failed to launch docker logger plugin: %v","messagePattern":"failed to launch docker logger plugin: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/docker/driver.go","lineNumber":222,"sourceCode":"\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tdlogger, dloggerPluginClient, err := docklog.ReattachDockerLogger(reattach)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to reattach to docker logger process: %v\", err)\n\t}\n\n\treturn dlogger, dloggerPluginClient, nil\n}\n\nfunc (d *Driver) setupNewDockerLogger(container mclient.ContainerInspectResult, cfg *drivers.TaskConfig, startTime time.Time) (docklog.DockerLogger, *plugin.Client, error) {\n\tdlogger, pluginClient, err := docklog.LaunchDockerLogger(d.logger)\n\tif err != nil {\n\t\tif pluginClient != nil {\n\t\t\tpluginClient.Kill()\n\t\t}\n\t\treturn nil, nil, fmt.Errorf(\"failed to launch docker logger plugin: %v\", err)\n\t}\n\n\tif err := dlogger.Start(&docklog.StartOpts{\n\t\tEndpoint:    d.config.Endpoint,\n\t\tContainerID: container.Container.ID,\n\t\tTTY:         container.Container.Config.Tty,\n\t\tStdout:      cfg.StdoutPath,\n\t\tStderr:      cfg.StderrPath,\n\t\tTLSCert:     d.config.TLS.Cert,\n\t\tTLSKey:      d.config.TLS.Key,\n\t\tTLSCA:       d.config.TLS.CA,\n\t\tStartTime:   startTime.Unix(),\n\t}); err != nil {\n\t\tpluginClient.Kill()\n\t\treturn nil, nil, fmt.Errorf(\"failed to launch docker logger process %s: %v\", container.Container.ID, err)\n\t}\n\n\treturn dlogger, pluginClient, nil","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/docker/driver.go#L204-L240","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: plugin missing or not executable\n-rw-r--r-- nomad-docker-logger\n// after\nchmod +x /opt/nomad/plugins/nomad-docker-logger && systemctl restart nomad","handlingStrategy":"validation","validationCode":"p := filepath.Join(pluginDir, \"nomad-docker-logger\")\nif fi, err := os.Stat(p); err != nil || !isExecutable(fi) {\n    return fmt.Errorf(\"docker logger plugin missing or not executable at %s\", p)\n}","typeGuard":"func isPluginLaunchErr(err error) bool { return err != nil && strings.Contains(err.Error(), \"failed to launch docker logger plugin\") }","tryCatchPattern":"dlogger, client, err := setupNewDockerLogger(...)\nif err != nil {\n    if isPluginLaunchErr(err) {\n        logger.Error(\"plugin launch failed; check binary/permissions\", \"err\", err)\n        return retry.NewBackoff().Do(func() error { return startTask(cfg) })\n    }\n    return err\n}","preventionTips":["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."],"tags":["docker","go-plugin","plugin-launch","nomad-driver"],"backgroundTag":"plugin-launch-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"}