GithubHelp home page GithubHelp logo

Comments (4)

byroot avatar byroot commented on June 30, 2024 1

Ok, it fails as part of the connection prelude and based on the error message I would hasard the guess that you are passing a db: parameter that isn't an Integer.

It's actually visible in what you posted initially: redis://run_redis_dev:6379/robotix_max_bot here robotix_max_bot is treaded as the DB index, and can't be converted to integer. Just remove that part of the URL, or explictly pass a db: 0 parameter to overwrite it.

That said, redis-client should fail sooner with a cleaner error when this mistake is made, so I'll keep the issue open until I improve that.

from redis-rb.

byroot avatar byroot commented on June 30, 2024
[2] pry(main)> r.ping
Redis::CommandError: ERR value is not an integer or out of range
from /usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client/connection_mixin.rb:61:in `call_pipelined'
Caused by RedisClient::CommandError: ERR value is not an integer or out of range
from /usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client/connection_mixin.rb:61:in `call_pipelined'

Could you provide the full backtrace here?

>> error = (r.ping rescue $!)
>> puts error.backtrace

For some reason r.ping end up calling a pipeline which makes little sense I suspect you have some monkey patch of some sort in your app or one of you dependencies.

from redis-rb.

yart avatar yart commented on June 30, 2024

@byroot, please loot at this:

[1] pry(main)> r = REDIS
=> #<Redis client v5.0.8 for redis://run_redis_dev:6379/robotix_max_bot>
[2] pry(main)> error = (r.ping rescue $!)
=> #<Redis::CommandError: ERR value is not an integer or out of range>
[3] pry(main)> puts error.backtrace
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client/connection_mixin.rb:61:in `call_pipelined'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client.rb:745:in `block in connect'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client/middlewares.rb:16:in `call'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client.rb:744:in `connect'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client.rb:706:in `raw_connection'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client.rb:673:in `ensure_connected'
/usr/local/bundle/gems/redis-client-0.18.0/lib/redis_client.rb:269:in `call_v'
/usr/local/bundle/gems/redis-5.0.8/lib/redis/client.rb:90:in `call_v'
/usr/local/bundle/gems/redis-5.0.8/lib/redis.rb:152:in `block in send_command'
/usr/local/bundle/gems/redis-5.0.8/lib/redis.rb:151:in `synchronize'
/usr/local/bundle/gems/redis-5.0.8/lib/redis.rb:151:in `send_command'
/usr/local/bundle/gems/redis-5.0.8/lib/redis/commands/connection.rb:21:in `ping'
(pry):2:in `__pry__'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:290:in `eval'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:290:in `evaluate_ruby'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:659:in `handle_line'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:261:in `block (2 levels) in eval'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:260:in `catch'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:260:in `block in eval'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:259:in `catch'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_instance.rb:259:in `eval'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:77:in `block in repl'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:67:in `loop'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:67:in `repl'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:38:in `block in start'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/input_lock.rb:61:in `__with_ownership'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/input_lock.rb:78:in `with_ownership'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:38:in `start'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/repl.rb:15:in `start'
/usr/local/bundle/gems/pry-byebug-3.10.1/lib/pry-byebug/pry_ext.rb:15:in `start_with_pry_byebug'
/usr/local/bundle/gems/pry-0.14.2/lib/pry/pry_class.rb:194:in `start'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/console/console_command.rb:74:in `start'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/console/console_command.rb:19:in `start'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands/console/console_command.rb:106:in `perform'
/usr/local/bundle/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
/usr/local/bundle/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/command/base.rb:87:in `perform'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/command.rb:48:in `invoke'
/usr/local/bundle/gems/railties-7.0.8/lib/rails/commands.rb:18:in `<top (required)>'
<internal:/usr/local/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
bin/rails:4:in `<main>'
=> nil

from redis-rb.

yart avatar yart commented on June 30, 2024

explictly pass a db: 0 parameter to overwrite it.

OMG! 🤦‍♂️ My mistake. Thanks for the explanation and fix.

from redis-rb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.