tair-opensource / RedisShake

RedisShake is a Redis data processing and migration tool.
https://tair-opensource.github.io/RedisShake/
MIT License
3.86k stars 700 forks source link

ERROR NOAUTH Authentication required [redis_writer] sentinel=true #868

Open opencmit2 opened 1 month ago

opencmit2 commented 1 month ago

环境: RedisShake Version:latest Redis Source Version:6.2.12 Redis Destination Version:6.2.12 Redis 部署方式(standalone/cluster/sentinel):standalone -> sentinel 报错如下: 2024-10-10 15:49:39 INF load config from file: shake.toml 2024-10-10 15:49:39 INF log_level: [info], log_file: [/root/shake/data/shake.log] 2024-10-10 15:49:39 INF changed work dir. dir=[/root/shake/data] 2024-10-10 15:49:39 INF GOMAXPROCS defaults to the value of runtime.NumCPU [8] 2024-10-10 15:49:39 INF not set pprof port 2024-10-10 15:49:39 INF create SyncStandaloneReader: 192.168.123.240:30044 2024-10-10 15:49:39 ERR NOAUTH Authentication required. RedisShake/internal/client/redis.go:152 -> (Redis).DoWithStringReply() RedisShake/internal/client/redis.go:72 -> NewRedisClient() RedisShake/internal/client/redis.go:26 -> NewSentinelMasterClient() RedisShake/internal/writer/redis_sentinel_writer.go:11 -> NewRedisSentinelWriter() RedisShake/cmd/redis-shake/main.go:104 -> main() runtime/proc.go:267 -> main() runtime/asm_amd64.s:1650 -> goexit() 查看代码: sentinel := client.NewSentinelMasterClient(ctx, opts.Address, opts.Tls) sentinel.Send("SENTINEL", "GET-MASTER-ADDR-BY-NAME", opts.Master) ... func NewSentinelMasterClient(ctx context.Context, address string, Tls bool) Redis { return NewRedisClient(ctx, address, "", "", Tls, false) } ... func NewRedisClient(ctx context.Context, address string, username string, password string, Tls bool, replica bool) *Redis { r := new(Redis) ...} 我们的哨兵密码授权,这里密码写死为空,造成noauth问题?

suxb201 commented 1 month ago

是的,BUG。