Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Ruby & Redis / Skidekiq URI::InvalidURIError: the scheme redis does not accept registry part: bsc_redis:6379 (or bad hostname?)

$
0
0

on my docker server I've got error on sidekiq/redis URL URL sepcification:

Sidekiq.configure_client do |config| config.redis =  { url: "redis://bsc_redis:6379", size: 1 } end

I get

URI::InvalidURIError: the scheme redis does not accept registry part: bsc_redis:6379 (or bad hostname?) from /usr/local/lib/ruby/2.0.0/uri/generic.rb:214:in initialize' from /usr/local/lib/ruby/2.0.0/uri/common.rb:218:innew' from /usr/local/lib/ruby/2.0.0/uri/common.rb:218:in parse' from /usr/local/lib/ruby/2.0.0/uri/common.rb:747:inparse' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:86:inlog_info' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:20:increate' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq.rb:131:in redis=' from (irb):4:inblock in irb_binding' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq.rb:83:inconfigure_client' from (irb):4 from /usr/local/bundle/gems/railties-3.2.13/lib/rails/commands/console.rb:47:instart' from /usr/local/bundle/gems/railties-3.2.13/lib/rails/commands/console.rb:8:instart' from /usr/local/bundle/gems/railties-3.2.13/lib/rails/commands.rb:41:in' from script/rails:6:in require' from script/rails:6:in'

But it works, when I specifiy the IP address, of the bsc_redis container:

Sidekiq.configure_client do |config| config.redis =  { url: "redis://172.18.0.5:6379", size: 1 } end=> {:url=>"redis://172.18.0.5:6379", :size=>1}

When I ping bsc_redis from the rails container, it responses from 172.18.0.5. I cannot find any problem, why this occures.

Any idea?

Thank you


Viewing all articles
Browse latest Browse all 873

Trending Articles