ioredis
ioredis copied to clipboard
redis connect failed: ReplyError: Ready check failed: NOAUTH Authentication required
Here is the config:
{ host: '172.20.14.223', port: '6379', password: 'xX1991@1' }
Here is the error and debug log:
ioredis:redis status[172.20.14.223:6379]: connecting -> connect +4s
ioredis:redis write command[172.20.14.223:6379]: 0 -> auth([ 'xX1991@1' ]) +1ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> info([]) +1ms
ioredis:redis status[172.20.14.223:6379]: connecting -> connect +1ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> auth([ 'xX1991@1' ]) +0ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> info([]) +0ms
ioredis:redis status[172.20.14.223:6379]: connecting -> connect +0ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> auth([ 'xX1991@1' ]) +0ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> info([]) +1ms
ioredis:redis status[172.20.14.223:6379]: connecting -> connect +0ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> auth([ 'xX1991@1' ]) +0ms
ioredis:redis write command[172.20.14.223:6379]: 0 -> info([]) +0ms
events.js:292
throw er; // Unhandled 'error' event
^
ReplyError: Ready check failed: NOAUTH Authentication required.
at parseError (/root/work/ui-server/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/root/work/ui-server/node_modules/redis-parser/lib/parser.js:302:14)
Emitted 'error' event on RedisClient instance at:
at RedisClient.on_info_cmd (/root/work/ui-server/node_modules/redis/index.js:432:14)
at /root/work/ui-server/node_modules/redis/index.js:471:14
at Object.callbackOrEmit [as callback_or_emit] (/root/work/ui-server/node_modules/redis/lib/utils.js:89:9)
at /root/work/ui-server/node_modules/redis/lib/individualCommands.js:157:15
at Object.callbackOrEmit [as callback_or_emit] (/root/work/ui-server/node_modules/redis/lib/utils.js:89:9)
at RedisClient.return_error (/root/work/ui-server/node_modules/redis/index.js:642:11)
at JavascriptRedisParser.returnError (/root/work/-ui-server/node_modules/redis/index.js:142:18)
at JavascriptRedisParser.execute (/root/work/ui-server/node_modules/redis-parser/lib/parser.js:542:14)
at Socket.<anonymous> (/root/work/ui-server/node_modules/redis/index.js:219:27)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:284:9)
at Socket.Readable.push (_stream_readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
command: 'INFO',
code: 'NOAUTH'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[root@10-0-94-231 ]# redis-cli -h 172.20.14.223 -p 6379
172.20.14.223:6379> auth xX1991@1
OK
The error stack suggests that info
command is rejected even auth command is passed. Does it work if you run info
command after auth
?
[root@10-0-94-231 ]# redis-cli -h 172.20.14.223 -p 6379
172.20.14.223:6379> auth xX1991@1
OK
172.20.14.223:6379> info
?
@luin yeah. It is working fine
Same issue after update. Even info
command outputs
NOAUTH Authentication required.
我知道原因,KEY不存在时会报这个...不知道是库还是redis造成的这样的错报。
I know why. This is when KEY doesn't exist... It is not known whether it is the library or redis that causes such misstatements.