{"record":{"id":"7de216d97bac6d0d","repo":"t8y2/dbx","slug":"no-etcd-endpoint-configured-7de216","errorCode":null,"errorMessage":"No etcd endpoint configured","messagePattern":"No etcd endpoint configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"agents/drivers/etcd2-go/client.go","lineNumber":90,"sourceCode":"\t}\n\tendpointList := connectionEndpoints(connection)\n\tvar lastErr error\n\tfor _, endpoint := range endpointList {\n\t\tclient, _, err := probeClient(endpoint, connection)\n\t\tif err != nil {\n\t\t\tlastErr = err\n\t\t\tcontinue\n\t\t}\n\t\ts.close()\n\t\ts.clientMu.Lock()\n\t\ts.httpClient = client\n\t\ts.connectedEndpoints = endpointList\n\t\ts.serverVersion = client.serverVersion\n\t\ts.clientMu.Unlock()\n\t\treturn map[string]bool{\"ok\": true}, nil\n\t}\n\tif lastErr == nil {\n\t\tlastErr = errors.New(\"No etcd endpoint configured\")\n\t}\n\treturn nil, lastErr\n}\n\nfunc (s *etcd2Session) activeClient() (*authenticatedClient, error) {\n\ts.clientMu.Lock()\n\tclient := s.httpClient\n\ts.clientMu.Unlock()\n\tif client == nil {\n\t\treturn nil, errors.New(\"Not connected\")\n\t}\n\treturn client, nil\n}\n\nfunc (s *etcd2Session) connectedEndpointList() []string {\n\ts.clientMu.Lock()\n\tdefer s.clientMu.Unlock()\n\treturn append([]string(nil), s.connectedEndpoints...)","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/etcd2-go/client.go#L72-L108","documentation":"connect iterates the configured endpoint list trying to establish a session; if the list is empty there is nothing to try, so lastErr stays nil and this fallback error is returned. It signals a configuration problem: no etcd v2 endpoints were supplied at all.","triggerScenarios":"Opening a session or calling testConnection/connect with an empty or unset endpoints configuration (no URLs provided).","commonSituations":"Missing ETCD_ENDPOINTS-style env var; empty config file section; endpoints list cleared by config-merge logic; deployment where the config key was renamed.","solutions":["Configure at least one etcd endpoint URL (e.g. http://127.0.0.1:2379)","Verify the environment variable/config key holding endpoints is set and non-empty","Check config merging hasn't dropped the endpoints list","If endpoints exist but all fail, the error returned will be the last connect error, not this one"],"exampleFix":"// before\nsession.Connect(nil) // no endpoints\n// after\nsession.Connect([]string{\"http://127.0.0.1:2379\"})","handlingStrategy":"validation","validationCode":"if len(endpoints) == 0 {\n\treturn fmt.Errorf(\"configuration error: at least one etcd endpoint is required\")\n}","typeGuard":null,"tryCatchPattern":"ok, err := session.testConnection(nil)\nif err != nil {\n\tif strings.Contains(err.Error(), \"No etcd endpoint configured\") {\n\t\treturn fmt.Errorf(\"check ETCD endpoints config/env; none were provided\")\n\t}\n\treturn err\n}","preventionTips":["Validate endpoint config at startup with a fail-fast check","Read endpoints from env with a sensible default like http://127.0.0.1:2379","Add a smoke test that asserts non-empty endpoints before integration tests","Guard config-merge code so an empty list never overwrites a populated one"],"tags":["etcd","configuration","connectivity"],"backgroundTag":"missing-endpoint-configuration","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}