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

NOAUTH Authentication required when forked #909

Open
alxx opened this issue May 26, 2020 · 0 comments
Open

NOAUTH Authentication required when forked #909

alxx opened this issue May 26, 2020 · 0 comments

Comments

@alxx
Copy link

alxx commented May 26, 2020

I know that there have been some similar (fixed) issues about forked clients reconnecting and so on, but that was before Redis introduced ACL. Now the problem isn't necessarily the connection, but the authentication.

> r=Redis.new
 => #<Redis client v4.1.3 for redis://127.0.0.1:6379/0> 
> r.auth 'not_my_actual_password'
 => "OK" 
> r.client(:list)
 => [{"id"=>"244"...] 
> fork { puts r.client(:list) }
 => 21693 
Traceback (most recent call last):
	...
	 1: from /Users/alxx/.rvm/gems/ruby-2.5.5/gems/redis-4.1.3/lib/redis.rb:222:in `block in client'
/Users/alxx/.rvm/gems/ruby-2.5.5/gems/redis-4.1.3/lib/redis/client.rb:126:in `call': NOAUTH Authentication required. (Redis::CommandError)

If I rescue this exception, then authenticate and retry, it works well. But isn't there some built-in mechanism to fix this problem?

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