redis 用socket连接报错,求助
发布于 6 天前 作者 napster99 225 次浏览 来自 问答
 node_redis: Warning: Redis server does not require a password, but a password was supplied.
0|node_pro | AbortError: Ready check failed: Redis connection lost and command aborted. It might have been processed.
0|node_pro |     at RedisClient.flush_and_error (/app/data/releases/node_monkey_proxy/20161228-000151/node_modules/redis/index.js:350:23)
0|node_pro |     at RedisClient.connection_gone (/app/data/releases/node_monkey_proxy/20161228-000151/node_modules/redis/index.js:652:14)
0|node_pro |     at Socket.<anonymous> (/app/data/releases/node_monkey_proxy/20161228-000151/node_modules/redis/index.js:286:14)
0|node_pro |     at Socket.g (events.js:291:16)
0|node_pro |     at emitNone (events.js:91:20)
0|node_pro |     at Socket.emit (events.js:185:7)
0|node_pro |     at endReadableNT (_stream_readable.js:974:12)
0|node_pro |     at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|node_pro |     at process._tickDomainCallback (internal/process/next_tick.js:122:9)

https://github.com/NodeRedis/node_redis/blob/v.2.6.2/examples/unix_socket.js redis 用socket连接报错,求助

7 回复

没密码你都提供了密码,我觉得不会是技术问题,再仔细排查一下

node_redis:警告:Redis服务器不需要密码,但提供了密码。

@i5ting 密码的问题,找到原因了,是传入参数不对。但现在还报这个错

events.js:160
      throw er; // Unhandled 'error' event
      ^
AbortError: Ready check failed: Redis connection lost and command aborted. It might have been processed.
    at RedisClient.flush_and_error (/app/data/releases/node_monkey_proxy/20161228-004323/node_modules/redis/index.js:350:23)
    at RedisClient.connection_gone (/app/data/releases/node_monkey_proxy/20161228-004323/node_modules/redis/index.js:652:14)
    at Socket.<anonymous> (/app/data/releases/node_monkey_proxy/20161228-004323/node_modules/redis/index.js:286:14)
    at Socket.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
	```
	
	代码如下
	```
	 redisObj = redis.createClient('/dev/shm/redis_session.sock');
	 ```

@napster99 使用 redis-cli 连 /dev/shm/redis_session.sock 有没有问题?

@zbinlin Ready check failed: Redis connection lost and command aborted. It might have been processed. 用的还是redis模块会报上面的错误

@napster99 嗯,我是让你用命令行的 redis-cli,而不是 npm 里的 redis-cli 包。

redis-cli -s /dev/shm/redis_session.sock

@i5ting 狼叔,表示在处理报错的时候,能读懂英文log很重要。O(∩_∩)O~

回到顶部