{"record":{"id":"9f7a673ff37d32c1","repo":"docker/cli","slug":"no-ca-information-available","errorCode":null,"errorMessage":"no CA information available","messagePattern":"no CA information available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/swarm/ca.go","lineNumber":144,"sourceCode":"\n\terr := jsonstream.Display(ctx, pipeReader, dockerCLI.Out())\n\tif err == nil {\n\t\terr = <-errChan\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tres, err := apiClient.SwarmInspect(ctx, client.SwarmInspectOptions{})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn displayTrustRoot(dockerCLI.Out(), res)\n}\n\nfunc displayTrustRoot(out io.Writer, info client.SwarmInspectResult) error {\n\tif info.Swarm.ClusterInfo.TLSInfo.TrustRoot == \"\" {\n\t\treturn errors.New(\"no CA information available\")\n\t}\n\t_, _ = fmt.Fprintln(out, strings.TrimSpace(info.Swarm.ClusterInfo.TLSInfo.TrustRoot))\n\treturn nil\n}\n","sourceCodeStart":126,"sourceCodeEnd":149,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/swarm/ca.go#L126-L149","documentation":"Thrown by displayTrustRoot (cli/command/swarm/ca.go:144) when the inspected swarm's ClusterInfo.TLSInfo.TrustRoot is empty. `docker swarm ca` prints the root CA certificate; if the node has no trust root (not initialized as a swarm, CA not yet generated, or manager not converged), there is nothing to display.","triggerScenarios":"Running `docker swarm ca` on a node where SwarmInspect returns an empty TrustRoot — e.g. before `docker swarm init`, on a freshly-joined node whose CA hasn't propagated, or a manager mid-recovery.","commonSituations":"Fresh engine with no swarm; manager still converging after init/join; external CA misconfiguration; running on a worker where cluster info is incomplete.","solutions":["Initialize or join a swarm so a CA is established: `docker swarm init`.","Wait a moment for the manager to converge, then retry `docker swarm ca`.","Verify swarm state with `docker info` (Swarm: active)."],"exampleFix":"// before (node not yet in a swarm)\ndocker swarm ca   # -> no CA information available\n\n// after\ndocker swarm init\ndocker swarm ca   # prints the root CA","handlingStrategy":"validation","validationCode":"res, err := apiClient.SwarmInspect(ctx, client.SwarmInspectOptions{})\nif err != nil { return err }\nif res.Swarm.ClusterInfo.TLSInfo.TrustRoot == \"\" {\n\treturn errors.New(\"no trust root yet; initialize or wait for swarm convergence\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the node is an active manager before reading the CA.","Retry briefly after init/join to allow CA propagation.","Monitor swarm health so trust-root gaps surface early."],"tags":["docker","swarm","ca","tls","trust-root"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}