Closed fulvi0 closed 3 years ago
It's not easy to tell the reason from the code you posted. The error may be returned from a different client. I'd create a minimal reproducible example to see what is the root cause.
Hi @luin thx for the quick response.
I tried a different approach, by removing the requirepass
from the Redis configuration, and this time its connection to the instance.
[WARN] This Redis server's `default` user does not require a password, but a password was supplied
Still facing the issue with AUTH on.
Still, it's hard to say whether the error came from a different client or not. So it's hard to debug without a reproducible example. You may want to specify connectionName
in new Redis
and run client list
on redis-cli to see if the instance has connected to the server or not because if the password is wrong, it won't appear in the list. Another possibility is the host/port doesn't match.
Hi @luin ,
redisClient = new Redis({
port: redis.redisPort,
host: redis.redisHost,
family: 4,
// password: redis.redisPass,
password: "superpassword",
connectionName: "hi",
});
127.0.0.1:6379> client list
id=1568 addr=127.0.0.1:44042 laddr=127.0.0.1:6379 fd=7 name= age=3245 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=26 qbuf-free=40928 argv-mem=10 obl=0 oll=0 omem=0 tot-mem=61466 events=r cmd=client user=default redir=-1
id=1578 addr=172.18.0.1:58860 laddr=172.18.0.2:6379 fd=8 name=hi age=19 idle=19 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20512 events=r cmd=client user=default redir=-1
id=1579 addr=172.18.0.1:58868 laddr=172.18.0.2:6379 fd=9 name=hi age=19 idle=19 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=subscribe user=default redir=-1
id=1581 addr=172.18.0.1:58870 laddr=172.18.0.2:6379 fd=11 name=hi age=19 idle=19 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20512 events=r cmd=client user=default redir=-1
Application log
[ioredis] Unhandled error event: ReplyError: NOAUTH Authentication required.
at parseError (/Users/fulvio/Developer/Work/app-mfa-backend/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/Users/fulvio/Developer/Work/app-mfa-backend/node_modules/redis-parser/lib/parser.js:302:14)
It's clear that the error logs came from other instances (aka you're creating redis instances in other places), and the code you posted works correctly (as the clients with the name of hi
appear in the client list).
Thank you for the orientation, found the issue in the code, as u said an orphan instance.
const Redis = require('ioredis');
const redisClient = new Redis({host: config.redis.redisHost, port: 6379});
Hi, I'm facing an issue that has been reported multiples times, sorry for opening another ticket, but I tried multiples ways, but still getting the same error of
NOAUTH Authentication required
.versions
"ioredis": "^4.27.6",
6.2
I creating a
redisClient
like:And getting the following error.
Note: I double-check the password and tested using a GUI Client, and the password is the correct one.
Thank u!