0
我有一個奇怪的Redis行爲:節點的Redis:準備檢查失敗 - NOAUTH需要驗證
const redis = require('redis');
const { REDIS_URL: redisUrl, REDIS_PASSWORD: redisPassword } = process.env;
const client = redis.createClient(redisUrl, {
no_ready_check: true,
auth_pass: redisPassword
});
client.on('connect',() => {
redisPassword && client.auth(redisPassword);
});
client.on('error', err => {
global.console.log(err.message)
});
但一切的時候,我收到以下錯誤:
throw er; // Unhandled 'error' event
ReplyError: Ready check failed: NOAUTH Authentication required.
爲什麼未處理?我集錯誤處理程序
爲什麼準備檢查失敗?我已禁用它在選項
感謝您使用auth_pass選項的建議。這很有用。至於這個問題 - 我用redis重新創建了一個實例(我們在它的引擎蓋下使用了flynn和heroku)現在它起作用了 –