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

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

Open
opencmit2 opened this issue Oct 10, 2024 · 1 comment
Open
Labels
type: question Further information is requested

Comments

@opencmit2
Copy link

环境:
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问题?

@opencmit2 opencmit2 added the type: question Further information is requested label Oct 10, 2024
@suxb201
Copy link
Member

suxb201 commented Oct 10, 2024

是的,BUG。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants