I have Redis running from a Rails app but when I try to start Sidekiq (bundle exec sidekiq), I am getting
INFO: Booting Sidekiq 6.0.4 with redis options {:url=>"redis://redis:6379/0", :id=>"Sidekiq-server-PID-49487"}
Error connecting to Redis on redis:6379 (SocketError)
I looked at my redis.conf file and I’m sure I haven’t changed any of the defaults. What else could I check for?
sidekiq (6.0.4)
rails (6.0.2.1)
redis (4.1.3)
2
Answers
Turns out I was using the wrong Redis address in my Rails .env file as it was configured for Docker. Sidekiq was unable to find the right Redis port.
Changed from
redis://redis:6379/0
toredis:6379/0
.The
redis
hostname doesn’t exist (uselocalhost
?) or you haven’t started Redis.