t8y2/dbx · critical

No etcd endpoint configured

Error message

No etcd endpoint configured

What it means

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.

Source

Thrown at agents/drivers/etcd2-go/client.go:90

	}
	endpointList := connectionEndpoints(connection)
	var lastErr error
	for _, endpoint := range endpointList {
		client, _, err := probeClient(endpoint, connection)
		if err != nil {
			lastErr = err
			continue
		}
		s.close()
		s.clientMu.Lock()
		s.httpClient = client
		s.connectedEndpoints = endpointList
		s.serverVersion = client.serverVersion
		s.clientMu.Unlock()
		return map[string]bool{"ok": true}, nil
	}
	if lastErr == nil {
		lastErr = errors.New("No etcd endpoint configured")
	}
	return nil, lastErr
}

func (s *etcd2Session) activeClient() (*authenticatedClient, error) {
	s.clientMu.Lock()
	client := s.httpClient
	s.clientMu.Unlock()
	if client == nil {
		return nil, errors.New("Not connected")
	}
	return client, nil
}

func (s *etcd2Session) connectedEndpointList() []string {
	s.clientMu.Lock()
	defer s.clientMu.Unlock()
	return append([]string(nil), s.connectedEndpoints...)

View on GitHub (pinned to c0390bff16)

Solutions

  1. Configure at least one etcd endpoint URL (e.g. http://127.0.0.1:2379)
  2. Verify the environment variable/config key holding endpoints is set and non-empty
  3. Check config merging hasn't dropped the endpoints list
  4. If endpoints exist but all fail, the error returned will be the last connect error, not this one

Example fix

// before
session.Connect(nil) // no endpoints
// after
session.Connect([]string{"http://127.0.0.1:2379"})
Defensive patterns

Strategy: validation

Validate before calling

if len(endpoints) == 0 {
	return fmt.Errorf("configuration error: at least one etcd endpoint is required")
}

Try / catch

ok, err := session.testConnection(nil)
if err != nil {
	if strings.Contains(err.Error(), "No etcd endpoint configured") {
		return fmt.Errorf("check ETCD endpoints config/env; none were provided")
	}
	return err
}

Prevention

When it happens

Trigger: Opening a session or calling testConnection/connect with an empty or unset endpoints configuration (no URLs provided).

Common situations: Missing ETCD_ENDPOINTS-style env var; empty config file section; endpoints list cleared by config-merge logic; deployment where the config key was renamed.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/7de216d97bac6d0d. Report an issue: GitHub.