{"action":"opened","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2696","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2696/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2696/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2696/events","html_url":"https://github.com/mperham/sidekiq/issues/2696","id":120788976,"number":2696,"title":"error with ActiveJob","user":{"login":"pacuna","id":1724136,"avatar_url":"https://avatars.githubusercontent.com/u/1724136?v=3","gravatar_id":"","url":"https://api.github.com/users/pacuna","html_url":"https://github.com/pacuna","followers_url":"https://api.github.com/users/pacuna/followers","following_url":"https://api.github.com/users/pacuna/following{/other_user}","gists_url":"https://api.github.com/users/pacuna/gists{/gist_id}","starred_url":"https://api.github.com/users/pacuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacuna/subscriptions","organizations_url":"https://api.github.com/users/pacuna/orgs","repos_url":"https://api.github.com/users/pacuna/repos","events_url":"https://api.github.com/users/pacuna/events{/privacy}","received_events_url":"https://api.github.com/users/pacuna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-07T14:46:40Z","updated_at":"2015-12-07T14:46:40Z","closed_at":null,"body":"This is pretty weird.\r\nMy initializer:\r\n\r\n```\r\nif Rails.env.production?\r\n  redis_url = ENV['REDIS_PORT_6379_TCP_ADDR']\r\nelse\r\n  redis_url = 'ket_redis_1'\r\nend\r\n\r\nSidekiq.configure_server do |config|\r\n  config.redis = { url: \"redis://#{redis_url}:6379/12\" }\r\nend\r\n\r\nSidekiq.configure_client do |config|\r\n  config.redis = { url: \"redis://#{redis_url}:6379/12\" }\r\nend\r\n\r\n```\r\nI have redis and the app running inside of containers.\r\n\r\nNow, when I start sidekiq everything's ok:\r\n\r\n```\r\n$ bundle exec sidekiq -e production\r\n2015-12-07T14:40:18.289Z 312 TID-bt84s INFO: Booting Sidekiq 4.0.1 with redis options {:url=>\"redis://172.17.0.123:6379/12\"}\r\n2015-12-07T14:40:18.643Z 312 TID-bt84s INFO: Running in ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]\r\n2015-12-07T14:40:18.643Z 312 TID-bt84s INFO: See LICENSE and the LGPL-3.0 for licensing details.\r\n2015-12-07T14:40:18.643Z 312 TID-bt84s INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org\r\n2015-12-07T14:40:18.645Z 312 TID-bt84s INFO: Starting processing, hit Ctrl-C to stop\r\n```\r\n\r\nBut then when I try to run some Job (or visit the webUI url) I'm getting this error:\r\n\r\n```\r\nApp 263 stderr: Started GET \"/sidekiq\" for 186.103.140.234 at 2015-12-07 14:39:32 +0000\r\nApp 263 stderr: 2015-12-07 14:39:32 - Redis::CannotConnectError - Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED):\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:332:in `rescue in establish_connection'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:318:in `establish_connection'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:94:in `block in connect'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:280:in `with_reconnect'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:93:in `connect'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:351:in `ensure_connected'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:208:in `block in process'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:293:in `logging'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:207:in `process'\r\nApp 263 stderr: \t/var/lib/gems/2.2.0/gems/redis-3.2.2/lib/redis/client.rb:113:in `call'\r\n```\r\n\r\nIn my config/application.rb I have this line:\r\n\r\n```\r\nconfig.active_job.queue_adapter = :sidekiq\r\n```\r\n\r\nWhat could it be?\r\nThanks."}}