Score:0

My Node.js droplet can't connect to DigitalOcean Managed redis

cn flag

I have a Parse Server (which is a Node.js server basically) and I'm trying to connect to a redis database, which is hosted on DigitalOcean Managed Databases. Both servers are on the same VPC network and the droplet is added to redis's accepted incoming connections.

Here's the code on my parse server:

const redis = require("redis")
const redisClient = redis.createClient({
    url: "rediss://username:[email protected]:25061"
})

The connection string is generated by DigitalOcean. The droplet's outbound traffic rules are open

Here are my error logs:

2|index  | AbortError: Ready check failed: Redis connection lost and command aborted. It might have been processed.
2|index  |     at RedisClient.flush_and_error (/root/parse-server-example/node_modules/redis/index.js:362:23)
2|index  |     at RedisClient.connection_gone (/root/parse-server-example/node_modules/redis/index.js:664:14)
2|index  |     at Socket.<anonymous> (/root/parse-server-example/node_modules/redis/index.js:293:14)
2|index  |     at Object.onceWrapper (events.js:313:30)
2|index  |     at emitNone (events.js:111:20)
2|index  |     at Socket.emit (events.js:208:7)
2|index  |     at endReadableNT (_stream_readable.js:1064:12)
2|index  |     at args.(anonymous function) (/usr/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)
2|index  |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
2|index  |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)

Any idea what I'm doing wrong?

Score:0
cn flag

It seems that the latest version of redis was incompatible with node's version. I downgraded redis to 3.0.4 and it works great!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.