Redis server is running
Error
sidekiq is not running in our project on my windows machine. Please help to solve these error!
$ bundle exec sidekiq
2020-04-14T12:44:56.654Z pid=12528 tid=59f1k INFO: Booting Sidekiq 6.0.6 with redis options {:url=>"redis://localhost:6379/0", :id=>"Sidekiq-server-PID-12528"}
2020-04-14T12:45:03.044Z pid=12528 tid=59f1k INFO: Booted Rails 6.0.2.2 application in development environment
Signal TTIN not supported
Signal TSTP not supported
Signal USR2 not supported
2020-04-14T12:45:03.044Z pid=12528 tid=59f1k INFO: Running in ruby 2.6.1p33 (2019-01-30 revision 66950) [i386-mingw32]
2020-04-14T12:45:03.045Z pid=12528 tid=59f1k INFO: See LICENSE and the LGPL-3.0 for licensing details.
2020-04-14T12:45:03.045Z pid=12528 tid=59f1k INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
You are connecting to Redis v3.0.504, Sidekiq requires Redis v4.0.0 or greater
C:/Ruby26/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.6/lib/sidekiq/cli.rb:62:in `run'
C:/Ruby26/lib/ruby/gems/2.6.0/gems/sidekiq-6.0.6/bin/sidekiq:12:in `<top (required)>'
C:/Ruby26/bin/sidekiq:23:in `load'
C:/Ruby26/bin/sidekiq:23:in `<main>'
2
Answers
As the error message tells you: You are connecting to a redis v3.x instance but your version of sidekiq requires a redis v4 instance, so you need to line them up somehow. This leaves you with two options:
If you go with the first option, sidekiq 5.2.8 should work according to the readme (https://github.com/mperham/sidekiq/tree/v5.2.8). Just update the sidekiq version in your
Gemfile
and then runbundle update
.If you go with the second option, well… that’s OS dependent, but you need to install redis v3.
This is an old issue that was already resolved, but just in case anybody else runs into this and still hasn’t figured it out: you might be using the wrong Redis version inside Docker so you should re-build the containers with the correct version 🙂