Sails: "redis" protocol not supported by @sailshq/connect-redis

Created on 26 Sep 2019  路  4Comments  路  Source: balderdashy/sails

Brand new sails new myapp.

Node version: v12.10.0
Sails version _(sails)_: 1.2.2
ORM hook version _(sails-hook-orm)_: 2.1.1
Sockets hook version _(sails-hook-sockets)_: 2.0.0
Organics hook version _(sails-hook-organics)_: 0.16.0
Grunt hook version _(sails-hook-grunt)_: UNINSTALLED
Uploads hook version _(sails-hook-uploads)_: NOT INSTALLED
DB adapter & version _(e.g. [email protected])_: [email protected]
Skipper adapter & version _(e.g. [email protected])_: NOT INSTALLED


My related dependencies:

"@sailshq/connect-redis": "^3.2.1",
"@sailshq/socket.io-redis": "^5.2.0",
"connect-redis": "3.3.2",
"machinepack-redis": "^2.0.2",

I have setup a managed redis cache on digitalocean. Digitalocean gave me a url to use to connect:

url: 'rediss://default:REMOVED_THIS_PASSWORD@my-new-app-sfo2-do-user-5053627-0.db.ondigitalocean.com:25061/0',

I think the solution is we need to implement this into sails - https://github.com/NodeRedis/node_redis/issues/1331#issuecomment-531601022

Somewhere around here - https://github.com/balderdashy/sails/blob/master/lib%2Fhooks%2Fsession%2Findex.js#L300

I created a stackoverflow on the topic, no help yet - https://stackoverflow.com/q/58109419/1828637

helpful info or workaround needs documentation proposal

Most helpful comment

Thank you I will for sure do that! :)

I plan to also write a medium article detailing exactly how to do a deployment of sails onto digital ocean droplet with managed database and managed redis cache. :)

All 4 comments

@Noitidart Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

  • look for a workaround. _(Even if it's just temporary, sharing your solution can save someone else a lot of time and effort.)_
  • tell us why this issue is important to you and your team. What are you trying to accomplish? _(Submissions with a little bit of human context tend to be easier to understand and faster to resolve.)_
  • make sure you've provided clear instructions on how to reproduce the bug from a clean install.
  • double-check that you've provided all of the requested version and dependency information. _(Some of this info might seem irrelevant at first, like which database adapter you're using, but we ask that you include it anyway. Oftentimes an issue is caused by a confluence of unexpected factors, and it can save everybody a ton of time to know all the details up front.)_
  • read the code of conduct.
  • if appropriate, ask your business to sponsor your issue. _(Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)_
  • let us know if you are using a 3rd party plugin; whether that's a database adapter, a non-standard view engine, or any other dependency maintained by someone other than our core team. _(Besides the name of the 3rd party package, it helps to include the exact version you're using. If you're unsure, check out this list of all the core packages we maintain.)_

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

Oh to fix, I had to add to config/session.js this: tls: {} and it passes it through!

We should document this in the docs. I will try to get to it.

@Noitidart Thanks for taking the time to explore this and provide a workaround - much appreciated! Yes, updating documentation about this could help. If you'd like, feel free to provide us a PR with the updated information and we'll have it reviewed for updating the docs. All the best!

Thank you I will for sure do that! :)

I plan to also write a medium article detailing exactly how to do a deployment of sails onto digital ocean droplet with managed database and managed redis cache. :)

Was this page helpful?
0 / 5 - 0 ratings