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 4.5.0 support #23

Closed
lemsx1 opened this issue Oct 14, 2021 · 2 comments
Closed

Redis 4.5.0 support #23

lemsx1 opened this issue Oct 14, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lemsx1
Copy link

lemsx1 commented Oct 14, 2021

Describe the bug

redi_search 4.x and 5.x seem to not work properly with Redis 4.5 which was released recently upstream. It looks like the connection is being lost after creating the client

To Reproduce

Setup redis-server (6.2.4) with requirepass 'SomeSecret' and no other (newer) ACL.

Steps to reproduce the behavior:

  1. create a client
        RediSearch.configure do |config|
          config.redis_config = {
            host: server['fqdn'],
            port: server['port'],
            username: server['username'],
            password: server['password']
          }
        end
        begin
          @index = RediSearch::Index.new(@options[:prefix], @options[:schema])
          @client = RediSearch.client
          @index.create
          ...
  1. log shows FT.CREATE went through
  2. now try to use client to do other operations
          @client.ping # nothing
          @index.search 'foo' # WRONGPASS

Expected behavior

I should be able to create a client and send many commands with that client. Returning back to Redis 4.4.x fixes the problems.

Screenshots

RediSearch WRONGPASS invalid username-password pair or user is disabled.. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:153:in `call'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:121:in `block in connect'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:334:in `with_reconnect'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:116:in `connect'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:407:in `ensure_connected'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:259:in `block in process'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:346:in `logging'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:258:in `process'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis/client.rb:152:in `call'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis.rb:108:in `block in call'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis.rb:72:in `block in synchronize'. /opt/ruby/3.0/lib/ruby/3.0.0/monitor.rb:202:in `synchronize'. /opt/ruby/3.0/lib/ruby/3.0.0/monitor.rb:202:in `mon_synchronize'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis.rb:72:in `synchronize'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redis-4.5.0/lib/redis.rb:107:in `call'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redi_search-5.0.0/lib/redi_search/client.rb:42:in `send_command'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/redi_search-5.0.0/lib/redi_search/client.rb:18:in `block in call!'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'. /opt/ruby/3.0/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'. /opt/ruby/3.0/lib
@lemsx1 lemsx1 added the bug Something isn't working label Oct 14, 2021
@npezza93
Copy link
Owner

Are you getting this same error if you do regular redis commands (outside redi_search) with:

Redis.new({
            host: server['fqdn'],
            port: server['port'],
            username: server['username'],
            password: server['password']
          }).do_a_redis_thing

?

@npezza93
Copy link
Owner

Seems like this was a bug in redis-rb. redis/redis-rb#1041

Try 4.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants