{"id":"1b04e6a9a1cc9fe7","repo":"docker/cli","slug":"errors-pretty-printing-info","errorCode":null,"errorMessage":"errors pretty printing info","messagePattern":"errors pretty printing info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/system/info.go","lineNumber":212,"sourceCode":"\t}\n\tif info.ClientInfo != nil {\n\t\tprettyPrintClientInfo(streams, *info.ClientInfo)\n\t}\n\tfor _, err := range info.ClientErrors {\n\t\tfprintln(streams.Err(), \"ERROR:\", err)\n\t}\n\n\tfprintln(streams.Out())\n\tfprintln(streams.Out(), \"Server:\")\n\tif info.Info != nil {\n\t\tprettyPrintServerInfo(streams, &info)\n\t}\n\tfor _, err := range info.ServerErrors {\n\t\tfprintln(streams.Err(), \"ERROR:\", err)\n\t}\n\n\tif len(info.ServerErrors) > 0 || len(info.ClientErrors) > 0 {\n\t\treturn errors.New(\"errors pretty printing info\")\n\t}\n\treturn nil\n}\n\nfunc prettyPrintClientInfo(streams command.Streams, info clientInfo) {\n\tfprintlnNonEmpty(streams.Out(), \" Version:   \", info.Version)\n\tfprintln(streams.Out(), \" Context:   \", info.Context)\n\tfprintln(streams.Out(), \" Debug Mode:\", info.Debug)\n\n\tif len(info.Plugins) > 0 {\n\t\tfprintln(streams.Out(), \" Plugins:\")\n\t\tfor _, p := range info.Plugins {\n\t\t\tif p.Err == nil {\n\t\t\t\tfprintf(streams.Out(), \"  %s: %s (%s)\\n\", p.Name, p.ShortDescription, p.Vendor)\n\t\t\t\tfprintlnNonEmpty(streams.Out(), \"    Version: \", p.Version)\n\t\t\t\tfprintlnNonEmpty(streams.Out(), \"    Path:    \", p.Path)\n\t\t\t} else {\n\t\t\t\tinfo.Warnings = append(info.Warnings, fmt.Sprintf(\"WARNING: Plugin %q is not valid: %s\", p.Path, p.Err))","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/system/info.go#L194-L230","documentation":"Returned by `docker info` (pretty, non-format output) after printing everything, if any client-side or server-side errors were collected while gathering the info (info.ClientErrors / info.ServerErrors). The individual errors were already printed to stderr as `ERROR: ...` lines; this sentinel error just makes the command exit non-zero so scripts can detect the partial failure.","triggerScenarios":"`docker info` when the daemon is unreachable (server section errors), a CLI plugin fails to load or report its version (client errors), or the /info API call partially fails — any entry in ClientErrors or ServerErrors triggers it at cli/command/system/info.go:212.","commonSituations":"Docker daemon not running or socket permission denied (user not in docker group); broken or outdated CLI plugins in ~/.docker/cli-plugins (e.g. stale buildx/compose binaries); DOCKER_HOST pointing at a dead endpoint; TLS/cert misconfiguration.","solutions":["Read the `ERROR:` lines printed just above on stderr — they contain the real cause; fix that (start the daemon, fix socket permissions, correct DOCKER_HOST).","Check daemon connectivity: `systemctl status docker` and `docker version`.","Remove or update broken CLI plugins in ~/.docker/cli-plugins if the errors reference plugins.","Ensure your user can access the socket (add to the docker group or use sudo)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker-cli","docker-info","daemon","diagnostics"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}