redis/go-redis · error

redis: all sentinels specified in configuration are unreacha

Error message

redis: all sentinels specified in configuration are unreachable: %w

What it means

Error "redis: all sentinels specified in configuration are unreachable: %w" thrown in redis/go-redis.

Source

Thrown at sentinel.go:1044

				cancel()
			})

			if sentinelCli != c.sentinel {
				_ = sentinelCli.Close()
			}
		}(i, sentinelAddr)
	}

	wg.Wait()
	close(errCh)
	if masterAddr != "" {
		return masterAddr, nil
	}
	errs := make([]error, 0, len(errCh))
	for err := range errCh {
		errs = append(errs, err)
	}
	return "", fmt.Errorf("redis: all sentinels specified in configuration are unreachable: %w", errors.Join(errs...))
}

func (c *sentinelFailover) replicaAddrs(ctx context.Context, useDisconnected bool) ([]string, error) {
	c.mu.RLock()
	sentinel := c.sentinel
	c.mu.RUnlock()

	if sentinel != nil {
		addrs, err := c.getReplicaAddrs(ctx, sentinel)
		if err != nil {
			if isContextError(ctx.Err()) {
				return nil, err
			}
			// Continue on other errors
			internal.Logger.Printf(ctx, "sentinel: Replicas name=%q failed: %s",
				c.opt.MasterName, err)
		} else if len(addrs) > 0 {
			return addrs, nil

View on GitHub (pinned to c5cad058c7)

When it happens

Trigger: Thrown at sentinel.go:1044 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of redis/go-redis@c5cad058c7 (2026-09-01). Data as JSON: /api/errors/665ae4a1a0fd5062. Report an issue: GitHub.