Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
siluri opened this issue Apr 23, 2018 · 22 comments

Comments

@siluri
Copy link

siluri commented Apr 23, 2018

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

@coderlongren

This comment has been minimized.

@BridgeAR
Copy link
Contributor

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?

@istvanp
Copy link

istvanp commented Jun 27, 2018

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: 5d6e471

@ashishth09
Copy link

When is the new release? I need this feature.

@Teamop
Copy link

Teamop commented Aug 30, 2018

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

@Salakar
Copy link
Contributor

Salakar commented Aug 30, 2018

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

@coguy450
Copy link

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

@bluesxman
Copy link

bluesxman commented Sep 19, 2018

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

@roschler
Copy link

roschler commented Feb 6, 2019

Is there any major value to using the TLS support?

@jasonamyers
Copy link

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

@willks
Copy link

willks commented Jul 17, 2019

@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.

@scriptonian
Copy link

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 ?

@venkatesh-nadar
Copy link

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. :)

@scriptonian
Copy link

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 !

@bmudda
Copy link

bmudda commented Oct 11, 2019

+1

@nfedyk
Copy link

nfedyk commented Oct 11, 2019

is there a new version coming with this fix?

@peterpoliwoda
Copy link

peterpoliwoda commented Oct 18, 2019

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

@venkatesh-nadar
Copy link

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

@peterpoliwoda
Copy link

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!

@IdanAdar
Copy link

IdanAdar commented Jan 1, 2020

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

@Salakar

This comment has been minimized.

@Salakar Salakar mentioned this issue Feb 3, 2020
14 tasks
@Salakar
Copy link
Contributor

Salakar commented Feb 9, 2020

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;

  • Contributing docs & Code of Conduct
  • 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)
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests