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

Session and Socket cannot use adapter 'ioredis' #3840

Closed
chenweiyj opened this issue Sep 18, 2016 · 7 comments
Closed

Session and Socket cannot use adapter 'ioredis' #3840

chenweiyj opened this issue Sep 18, 2016 · 7 comments

Comments

@chenweiyj
Copy link

I have a redis replica cluster using sentinel. I must use ioredis to connect my service. However, sails default redis adapter cannot used. I tried ioredis, but it failed.

How to connect setinels in Sails.js?

@sailsbot
Copy link

Hi @chenweiyj! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected].

@mikermcneil
Copy link
Member

mikermcneil commented Oct 5, 2016

Hi @chenweiyj, I haven't tried doing this myself. but if you'd post more information about the error message / stack trace you're seeing, other folks might be able to help, or something might jump out. You might also check out https://www.google.com/search?q=connect-redis+ioredis and https://www.google.com/search?q=socket.io-redis+ioredis

@luislobo any chance you've tried doing this before?

@luislobo
Copy link
Contributor

luislobo commented Oct 5, 2016

No, I never used it like that. How did you configure it?

@mikermcneil
Copy link
Member

@chenweiyj @luislobo update: @sgress454 is working on this for Sails v1 (at least on the sockets front)

@mikermcneil
Copy link
Member

For posterity: to use a custom Redis client with sails-hook-sockets, you'll want to use the pubClient and subClient settings (see http://sailsjs.com/documentation/reference/configuration/sails-config-sockets). See balderdashy/sails-hook-sockets#25

@sailsbot
Copy link

sailsbot commented Jan 7, 2017

@chenweiyj,@sailsbot,@mikermcneil,@luislobo: Hello, I'm a repo bot-- nice to meet you!

It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible. On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).

If no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.

Thanks so much for your help!

@sailsbot sailsbot added waiting to close This label is deprecated. Please don't use it anymore. and removed waiting to close This label is deprecated. Please don't use it anymore. labels Jan 7, 2017
@utsavkansara
Copy link

@mikermcneil Can you please provide any example on how to use pubClient, subClient settings. Not sure but i am not following how i should use redis with sentinel support. I tried to search a lot. Any explanation or example would be great.

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

No branches or pull requests

5 participants