redis - ERR unknown command 'HELLO'(RedisClient::CommandError)

vpfxa7rd  于 2023-03-22  发布在  Redis
关注(0)|答案(1)|浏览(499)

“我已经在本地启用了Redis,但是运行脚本时出现错误,该怎么解决?”

/home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client/connection_mixin.rb:48:in `call_pipelined': ERR unknown command 'HELLO' (RedisClient::CommandError)
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client.rb:678:in `block in connect'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client/middlewares.rb:16:in `call'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client.rb:677:in `connect'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client.rb:647:in `raw_connection'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client.rb:614:in `ensure_connected'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client.rb:349:in `pipelined'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/redis-client-0.11.1/lib/redis_client/decorator.rb:51:in `pipelined'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/client.rb:214:in `block in raw_push'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/connection_pool-2.3.0/lib/connection_pool.rb:65:in `block (2 levels) in with'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/connection_pool-2.3.0/lib/connection_pool.rb:64:in `handle_interrupt'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/connection_pool-2.3.0/lib/connection_pool.rb:64:in `block in with'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/connection_pool-2.3.0/lib/connection_pool.rb:61:in `handle_interrupt'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/connection_pool-2.3.0/lib/connection_pool.rb:61:in `with'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/client.rb:211:in `raw_push'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/client.rb:92:in `push'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/job.rb:365:in `client_push'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/job.rb:198:in `perform_async'
    from /home/linlin/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-7.0.1/lib/sidekiq/job.rb:290:in `perform_async'
mwngjboj

mwngjboj1#

“HELLO”命令是在Redis 6.0版本中引入的,用于在初始握手期间在客户端和服务器之间交换信息。如果您使用的是较旧版本的Redis,则需要升级到6.0或更高版本才能使用“HELLO”命令。
要检查版本,请使用以下命令:
redis-cli信息服务器|grep redis_version.

相关问题