"Invalid protocol" when trying to connect to Elasticache Redis in Node.js
See original GitHub issueHello
I’m trying to connect an ElastiCache Redis to an Express server deployed on ECS.
I get the Primary Endpoint from ElastiCache as blablabla.mccjet.ng.0001.euc1.cache.amazonaws.com:6379
In my server I try to connect like this
const { createClient } = require("redis");
const pubClient = createClient({ url: 'blablabla.mccjet.ng.0001.euc1.cache.amazonaws.com:6379' });
But when I check the ECS logs I see
/usr/src/app/node_modules/@redis/client/dist/lib/client/index.js:124
throw new TypeError('Invalid protocol');
^
TypeError: Invalid protocol
at Function.parseURL (/usr/src/app/node_modules/@redis/client/dist/lib/c...
Any help on what I might be missing Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
"Invalid protocol" when trying to connect to Elasticache Redis ...
I'm trying to connect an ElastiCache Redis to an Express server deployed on ECS. I'm using the Official Redis package for Node.js.
Read more >Connecting to elastiCache cluster with node.js - AWS re:Post
I am struggling to find node examples in connecting to my Elasticache cluster via node.js lambda using ... I get an invalid protocol...
Read more >Troubleshooting - Amazon ElastiCache for Redis
An ElastiCache node with thousands of NewConnections per minute indicates that a connection is created and used by just a few commands, which...
Read more >The Proper Way To Connect Redis and Node.js
I use Redis & MongoDb combination in NodeJs all the time but this article is not aiming to navigate you to find perfect...
Read more >Redis with Node.js (node_redis) | Redis Documentation Center
js Redis client. The following sections explain how to use node_redis, a community-recommended Redis client for Node.js. Another community-recommended client ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this should fix it
I guess this is how it behaves and I cannot access elasticache from a local machine without SSH. Anyway it works fine inside the cloud. closing this Thanks for helping me out!