{"record":{"id":"6321d2e98ad67d43","repo":"crowdsecurity/crowdsec","slug":"only-one-docker-host-parameters-is-required-not","errorCode":null,"errorMessage":"only one 'docker_host' parameters is required, not many","messagePattern":"only one 'docker_host' parameters is required, not many","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/docker/config.go","lineNumber":287,"sourceCode":"\t\t\tfollowStdout, err := strconv.ParseBool(v[0])\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"parsing 'follow_stdout' parameters: %s\", err)\n\t\t\t}\n\t\t\td.Config.FollowStdout = followStdout\n\t\t\td.containerLogsOptions.ShowStdout = followStdout\n\t\tcase \"follow_stderr\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'follow_stderr' parameters is required, not many\")\n\t\t\t}\n\t\t\tfollowStdErr, err := strconv.ParseBool(v[0])\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"parsing 'follow_stderr' parameters: %s\", err)\n\t\t\t}\n\t\t\td.Config.FollowStdErr = followStdErr\n\t\t\td.containerLogsOptions.ShowStderr = followStdErr\n\t\tcase \"docker_host\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'docker_host' parameters is required, not many\")\n\t\t\t}\n\t\t\topts = append(opts, client.WithHost(v[0]))\n\t\t}\n\t}\n\n\td.Client, err = client.New(opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\td.backoffFactory = newDockerBackOffFactory()\n\n\treturn nil\n}\n","sourceCodeStart":269,"sourceCodeEnd":302,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/docker/config.go#L269-L302","documentation":"DSN validation in docker ConfigureByDSN: the docker_host query parameter (URL of the docker daemon socket) is repeated in the DSN. The guard demands a single value because only one daemon endpoint can be targeted.","triggerScenarios":"Thrown at pkg/acquisition/modules/docker/config.go:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass docker_host=... once, e.g. docker://container?docker_host=unix:///run/podman/podman.sock","For multiple daemons, define one datasource stanza per daemon instead of stacking parameters"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}