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:in
new' from /usr/local/lib/ruby/2.0.0/uri/common.rb:218:inparse' from /usr/local/lib/ruby/2.0.0/uri/common.rb:747:in
parse' 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:in
create' from /usr/local/bundle/gems/sidekiq-4.2.9/lib/sidekiq.rb:131:inredis=' from (irb):4:in
block 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:in
start' 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:inrequire' 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