0

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?

1 Answer 1

0

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!

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.