{"record":{"id":"8177381bafd4de91","repo":"k3s-io/k3s","slug":"etcd-disabled","errorCode":null,"errorMessage":"etcd disabled","messagePattern":"etcd disabled","errorType":"http","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"pkg/server/handlers/handlers.go","lineNumber":208,"sourceCode":"\t\tif control.Runtime.Core == nil {\n\t\t\tutil.SendError(util.ErrCoreNotReady, resp, req, http.StatusServiceUnavailable)\n\t\t\treturn\n\t\t}\n\t\tdata := []byte(\"ok\")\n\t\tresp.WriteHeader(http.StatusOK)\n\t\tresp.Header().Set(\"Content-Type\", \"text/plain\")\n\t\tresp.Header().Set(\"Content-Length\", strconv.Itoa(len(data)))\n\t\tresp.Write(data)\n\t})\n}\n\nfunc Bootstrap(control *config.Control) http.Handler {\n\tif control.Runtime.HTTPBootstrap != nil {\n\t\treturn control.Runtime.HTTPBootstrap\n\t}\n\treturn http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {\n\t\tlogrus.Warnf(\"Received HTTP bootstrap request from %s, but embedded etcd is not enabled.\", req.RemoteAddr)\n\t\tutil.SendError(errors.New(\"etcd disabled\"), resp, req, http.StatusBadRequest)\n\t})\n}\n\nfunc Static(urlPrefix, staticDir string) http.Handler {\n\treturn http.StripPrefix(urlPrefix, http.FileServer(http.Dir(staticDir)))\n}\n\n// csrSigner wraps a CSR with a Public() method and dummy Sign() method to satisfy the\n// crypto.Signer interface required by dynamiclistener's cert helpers.\ntype csrSigner struct {\n\tcsr *x509.CertificateRequest\n}\n\nfunc (c *csrSigner) Public() crypto.PublicKey {\n\treturn c.csr.PublicKey\n}\n\nfunc (c csrSigner) Sign(_ io.Reader, _ []byte, _ crypto.SignerOpts) ([]byte, error) {","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/k3s-io/k3s/blob/6ba341e396edc16b8dcae978a7c5e3ac7ee5606e/pkg/server/handlers/handlers.go#L190-L226","documentation":"The Bootstrap handler in pkg/server/handlers/handlers.go serves /v1-k3s/bootstrap. When control.Runtime.HTTPBootstrap is nil - true when the datastore is not embedded etcd (SQLite default or external datastore) - the fallback handler logs 'Received HTTP bootstrap request from ..., but embedded etcd is not enabled.' and returns HTTP 400 'etcd disabled'. Only embedded-etcd servers implement HTTP bootstrap.","triggerScenarios":"A node (agent or joining server) sends a bootstrap request to a k3s server whose datastore is SQLite or an external SQL database, i.e. started without embedded etcd. Also seen when a client manually hits /v1-k3s/bootstrap on such a server.","commonSituations":"Mixed HA setup where a join URL points at a non-etcd server; nodes configured with a --server URL to a SQLite-backed node; curl/health-check traffic probing the endpoint.","solutions":["Point joining nodes' --server at an embedded-etcd server (in an etcd HA cluster, any etcd member).","Verify the target server's datastore: 'k3s kubectl get -o json leve... ' or simpler, check that /v1-k3s/bootstrap on an etcd member answers 200.","If you did not intend a bootstrap call, exclude /v1-k3s/bootstrap from probes/scanners hitting the supervisor port."],"exampleFix":"# before: joining against a SQLite/external-DB server -> 400 etcd disabled\nk3s server --server https://sqlite-node:6443 --token ...\n\n# after: join an embedded-etcd member\nk3s server --server https://etcd-node:6443 --token ...","handlingStrategy":"validation","validationCode":"# Before pointing a join at a server, confirm it runs embedded etcd\nsystemctl show k3s -p ExecStart | grep -q 'etcd' || echo 'target may reject bootstrap'","typeGuard":null,"tryCatchPattern":"if resp.StatusCode == http.StatusBadRequest && strings.Contains(body, \"etcd disabled\") {\n    // redirect the join to an embedded-etcd server; this node will never serve bootstrap\n}","preventionTips":["Only join nodes to etcd-enabled servers in etcd clusters.","Keep a documented list of which supervisors run embedded etcd.","Exclude /v1-k3s/bootstrap from generic probing on non-etcd nodes."],"tags":["k3s","etcd","bootstrap","clustering","http"],"backgroundTag":null,"analyzedSha":"6ba341e396edc16b8dcae978a7c5e3ac7ee5606e","analyzedAt":"2026-08-15T16:27:54.286Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}