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

Redis.new(host, port, 0) gets Redis::ConnectionError #101

Open
chumaltd opened this issue Jan 4, 2020 · 0 comments
Open

Redis.new(host, port, 0) gets Redis::ConnectionError #101

chumaltd opened this issue Jan 4, 2020 · 0 comments

Comments

@chumaltd
Copy link

chumaltd commented Jan 4, 2020

Hi, I've got Redis::ConnectionError on Redis.new() connecting to redis DB #0.

issue

I have 2 kubernetes clusters with mostly same configuration.
One cluster fails to connect redis DB #0, while the other has no problem.

  • Cluster 1: Rails.new("rds", 6379, 0) gets Redis::ConnectionError
  • Cluster 2: Rails.new("rds-dev", 6379, 0) and following commands work well.

I've watched requests with monitor on redis-cli, and got no log line on failure.
I've tested containers restart, and no luck.

workaround

Redis DB no.1 (or others) can be connected, and then switching to #0 works well.
So, I implemented a workaround to my mruby script as bellows:

redis = Rails.new("rds", 6379, 1)
redis.select 0

This works well.

configuration

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

No branches or pull requests

1 participant