Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewFailoverClient seems to not support TLS #1732

Closed
mdouchement opened this issue Apr 20, 2021 · 0 comments · Fixed by #1734
Closed

NewFailoverClient seems to not support TLS #1732

mdouchement opened this issue Apr 20, 2021 · 0 comments · Fixed by #1734

Comments

@mdouchement
Copy link

NewFailoverClient seems to not support TLS, a tcpdump shows plaintext auth.

Expected Behavior

It should PING the Redis server.

Current Behavior

$ go run .
redis: 2021/04/20 10:11:24 sentinel.go:682: sentinel: discovered new sentinel="r1.example.org:26379" for master="master"
redis: 2021/04/20 10:11:24 sentinel.go:643: sentinel: new master="master" addr="r0.example.org:6379"
panic: read: connection reset by peer

Steps to Reproduce

package main

import (
	"context"
	"crypto/tls"
	"fmt"
	"time"

	"github.com/go-redis/redis/v8"
)

func main() {
	rdb := redis.NewFailoverClient(&redis.FailoverOptions{
		MasterName: "master",
		SentinelAddrs: []string{
			"r0.example.org:26379",
			"r1.example.org:26379",
		},
		SentinelPassword: "strongpassword",
		Password:         "strongpassword",
		TLSConfig:        &tls.Config{},
		DB:               1,
	})

	err := rdb.Ping(context.Background()).Err()
	if err != nil {
		panic(err)
	}
}

Context (Environment)

  • github.com/go-redis/redis/v8 v8.8.2
  • redis_version:6.2.1

Detailed Description

Possible Implementation

monkey92t added a commit to monkey92t/redis that referenced this issue Apr 21, 2021
Signed-off-by: monkey <[email protected]>
@monkey92t monkey92t mentioned this issue Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant