//my redis is not set passwd for connection
./kala run -p 40001 --jobDB=redis --jobDBAddress=192.168.6.151:6379
FATA[0000] ERR Client sent AUTH, but no password is set
./kala run -p 40001 --jobDB=redis --jobDBAddress=192.168.6.151:6379 --jobDBPassword=""
panic: runtime error: invalid memory address or nil pointer dereference
Because of default jobDBPassword is 'password'
Because of DialOption in kala/job/storage/redis.go is nil and redigo/redis will get error in calling Dial func.
//redigo/redis/conn.go
for _, option := range options {
option.f(&do)
}
fixed
I think we should change the default password to be empty string instead of password.
Instead of using Newnopass, I think we should do the if-else in the redis.New() on checking whether the DialOption is nil.
--- golang struct can not check whether it is nil when struct initialized, and DialOption struct also can not compare with empty DialOption struct because of the f func in it. So, I add para in redis.New() instead of add redis.Newnopass function.
//my redis is not set passwd for connection ./kala run -p 40001 --jobDB=redis --jobDBAddress=192.168.6.151:6379 FATA[0000] ERR Client sent AUTH, but no password is set
./kala run -p 40001 --jobDB=redis --jobDBAddress=192.168.6.151:6379 --jobDBPassword="" panic: runtime error: invalid memory address or nil pointer dereference
fixed
Please check if it needs merge, Thanks.