ioredis
ioredis copied to clipboard
[WARN] This Redis server's `default` user does not require a password, but a password was supplied
The url is look like:
redis://user:password@localhost:30000/0
even :
redis://:password@localhost:30000/0
used : new Redis('redis://user:password@localhost:30000/0')
I know, it's just a warning, but I wanna a clean log. And my redis server needs a password.
"ioredis": "^4.19.2" node v12.19.0 redis v6.0.9
Issue is still presented
According to the logs, I think the cause is a password is provided to the server whereas the default user doesn't have a password set. Does removing the password part from the URL or the config fix the issue?
The default user has a password in the redis config file. The log appeared with an user and the default user. Removing the password from URL doesn't enable connection. Removing it from config does the thing but a password is wanted for the redis server config.
Hey @lukats 👋 ,
Thanks for the follow-up! However, I still don't get it. The warning [WARN] This Redis server's
default user does...
is printed whenever ioredis receives replies from the server like ...without any password configured for the default user
.
Do you have reproducible steps for it so I can test it on my side?
redis.conf.template
:
requirepass {PASSWORD}
dockerfile
:
FROM redis:6.0-alpine
ARG password
ENV PASSWORD=$password
COPY redis.conf.template /
CMD sed -e "s/{PASSWORD}/$PASSWORD/g" < redis.conf.template 1> /usr/local/etc/redis/redis.conf && redis-server /usr/local/etc/redis/redis.conf
index.js
:
const Redis = require("ioredis");
new Redis(`redis://:${process.env.PASSWORD}@127.0.0.1:6379/0`);
docker build --build-arg password=foobared -f dockerfile -t redis-bar
docker run -p 127.0.0.1:6379:6379 redis-bar
PASSWORD=foobared node index.js
ioredis 5.0.6
Still getting this, [WARN] This Redis server's 'default' user does not require a password, but a password was supplied
I am using sentinel, is this the reason? requirepass and masterauth these two parameters set in redis.conf same sentinel.conf.
While making connection, providing only sentinelPassword won't help, you have to add password parameter in options.
Got same issue.
any idea how to fix this?
any fix for it ?
se logro solucionar? [WARN] This Redis server's 'default' user does not require a password, but a password was supplied