Node-redis: node_redis: WARNING: You passed "rediss" as protocol instead of the "redis" protocol!

Created on 23 Apr 2018  ·  22Comments  ·  Source: NodeRedis/node-redis

node_redis: WARNING: You passed "rediss" as protocol instead of the "redis" protocol!

this warning is displayed because rediss: is checked but rediss would be correct - Line 35

pending-author-input

Most helpful comment

Hey everyone, I've taken over as lead maintainer and have all the required access now 🎉

I've spent the last few days getting master ready for a release, and as of a few minutes ago I've just published v3.0.0 to NPM; https://github.com/NodeRedis/node-redis/releases/tag/v3.0.0 - which includes this change.

Expect regular releases - my first priority at the moment is making this project more contributor friendly to ensure that the project lives and continues to grow and is not blocked by any singular person's time. To do this I'd like to grow a larger set of shallow contributors. With this I hope to mitigate the previous problem of the project needing updates but there being no-one who has the power to do so. I'm working through the following on this;

  • [x] Contributing docs & Code of Conduct
  • [x] Setup an Open Collective and a contributors expenses policy

    • You'll notice the shiny new Sponsor button at the top of GitHub, I've also gone ahead and sponsored it myself and through my company to help kick start it for any future contributors

  • WIP: Release automation & semantic versioning (publishing to NPM, generating changelogs, etc)
  • [x] Improve CI, e.g. Windows CI is super slow & flakey right now

After that I'll be switching my attention to modernising (e.g. promises) & clearing technical debt in the Node Redis codebase. @BridgeAR has already done a boat load of stuff for this, if you're curious check out the WIP v4 branch and its changelog.

All 22 comments

rediss is just wrong way because the commond do

The message should indeed be updated but it seems like you somehow passed through a wrong protocol.

Can you please show what you passed to Redis.createClient() as args (replace username / password / concrete urls) and keep everything exactly as it was passed to node_redis?

I encountered the same issue. Then I realized the commit enabling rediss as a protocol is not released yet. The latest version, 2.8.0, does not have this commit yet: https://github.com/NodeRedis/node_redis/commit/5d6e471d0c14df39974000427719c5d85fa4f21f

When is the new release? I need this feature.

@BridgeAR @stockholmux @Salakar friendly ping. Maybe a new release is needed for this warning.

@Teamop unfortunately I don't have access to publish anything to npm - only @BridgeAR can.

I ran into this issue. If look at the online repo, I see the statement block for rediss.
https://github.com/NodeRedis/node_redis/blob/23ef1e7afadd6022526860d22ac0a7f78495106d/lib/createClient.js#L34

However, when I examine my actual node_modules folder, the version says it's 2.8, however the createClient file does not have that rediss statement block. I fixed locally by pasting the rediss if statement into my local node modules and that worked. I'm not sure how the distributed version is different than what's shown online in the repo.
image

Sorry, I just realized that 2.8.0 was released in 2017, not 2018, before the TLS support was added to master

@BridgeAR What we're pulling down for 2.8.0 doesn't actually support TLS (i.e. a url starting with "rediss:"). That's the real problem; the warning is just a symptom. Here's where the node module came from: https://registry.npmjs.org/redis/-/redis-2.8.0.tgz Download it and look at createClient.js. The TLS code is missing

Is there any major value to using the TLS support?

I've love to have it today, it would let us talk to encrypted auth AWS ElasticCache

@jasonamyers I had more success with https://github.com/luin/ioredis on this issue - but you need a cachecluster setup, with at rest encryption, transport encryption and a password. API's are similar.

Hello can someone please advice when this is going into master and getting released? Having this issue and had to manually overwrite createClient.js in node_module. This issue has been opened for over a year. Can we push this out and allow TLS ?

Currently, this section

if (parsed.protocol && parsed.protocol !== 'redis:') {
    console.warn('node_redis: WARNING: You passed "' + parsed.protocol.substring(0, parsed.protocol.length - 1) + '" as protocol instead of the "redis" protocol!');
}

need to be replaced by

if (parsed.protocol === 'rediss:') {
    options.tls = options.tls || {};
} else if (parsed.protocol !== 'redis:') {
    console.warn('node_redis: WARNING: You passed "' + parsed.protocol.substring(0, parsed.protocol.length - 1) + '" as protocol instead of the "redis" protocol!');
}

in createClient.js inorder to get rediss:// support or you could try another way like shown below.

var redis = require("redis");
var client = redis.createClient("redis://:password@host:port", {tls:{}});

By passing tls as empty object got my redis client got connected without any issue.

@scriptonian this should also solve your issue by avoiding manual overwrite in createClient.js

Please Note :
Bare me if my commenting style is odd. I am new in github. :)

thank you venkatesh, yes i had already made this change as coguy450 had suggested it in the comments. but i am surprised the team hasnt updated this. Its been over a year !

+1

is there a new version coming with this fix?

Somebody wants to make a pull request to support the rediss:// url?
How about you @venkatesh-nadar 🙂 ?

@peterpoliwoda it seems to be already added in the master branch... 👍

Hm... yeah I see it’s in the repo but npm doesn’t install with the fix. The version number hasn’t changed so ‘npm install’ keeps the old build, like it had an old tarball in the archive.
I got it working by installing directly from Github with
‘’’
npm install https://github.com/NodeRedis/node_redis
‘’’

Thanks a ton @venkatesh-nadar!

@BridgeAR Can we get a new release in npm please?

Have reached out several times to @BridgeAR requesting npm publish access over the past years and not heard back about it, I know he's busy with Node.js things which is probably why this repo is being neglected.

Let's discuss repo future over at https://github.com/NodeRedis/node_redis/issues/1040#issuecomment-581418899?

Hey everyone, I've taken over as lead maintainer and have all the required access now 🎉

I've spent the last few days getting master ready for a release, and as of a few minutes ago I've just published v3.0.0 to NPM; https://github.com/NodeRedis/node-redis/releases/tag/v3.0.0 - which includes this change.

Expect regular releases - my first priority at the moment is making this project more contributor friendly to ensure that the project lives and continues to grow and is not blocked by any singular person's time. To do this I'd like to grow a larger set of shallow contributors. With this I hope to mitigate the previous problem of the project needing updates but there being no-one who has the power to do so. I'm working through the following on this;

  • [x] Contributing docs & Code of Conduct
  • [x] Setup an Open Collective and a contributors expenses policy

    • You'll notice the shiny new Sponsor button at the top of GitHub, I've also gone ahead and sponsored it myself and through my company to help kick start it for any future contributors

  • WIP: Release automation & semantic versioning (publishing to NPM, generating changelogs, etc)
  • [x] Improve CI, e.g. Windows CI is super slow & flakey right now

After that I'll be switching my attention to modernising (e.g. promises) & clearing technical debt in the Node Redis codebase. @BridgeAR has already done a boat load of stuff for this, if you're curious check out the WIP v4 branch and its changelog.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuany picture yuany  ·  4Comments

Mickael-van-der-Beek picture Mickael-van-der-Beek  ·  6Comments

michaelwittig picture michaelwittig  ·  3Comments

abhaygarg picture abhaygarg  ·  5Comments

juriansluiman picture juriansluiman  ·  3Comments