2014-04-15 15 views
14

Ich habe sidekiq/redis seit einiger Zeit ohne Probleme verwendet.Redis versucht, eine Verbindung zu einem lokalen Host in Heroku herzustellen - WARUM?

Aus irgendeinem Grund, heute erhalte ich diese Fehlermeldung:

Redis::CannotConnectError - Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED):

Also, Redis versucht zu meinem localhost-Verbindung zu verbinden, anstatt meine redis_to_go url in Heroku.

Meine redis.rb Datei sieht so aus:

uri = URI.parse(ENV["REDISTOGO_URL"] || "redis://localhost:6379/") 
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password) 

Und wenn ich heroku config Typ ich dies gegeben:

REDISTOGO_URL: redis://redistogo:[email protected]:10280/ 

die genau abbildet meine URL, die ich in meinem Redis sehe Addon in Heroku zu gehen.

Nichts änderte sich mit Redis, die ich kenne zwischen gestern, als es funktionierte und heute, wenn dies nicht der Fall, aber ich habe ein Mongo DB mit Mongo HQ spin up. Vielleicht gibt es irgendwo einen Konflikt?

Jede Hilfe wird geschätzt.

EDIT

Ich habe keine Mongo init-Datei, und die einzige Mongo bestimmte Datei Ich war Datei meine config/mongoid.yml erstellt. Es sieht so aus:

development: 
    sessions: 
    default: 
     database: mongoid_dev 
     hosts: 
     - localhost:27017 
    options: #strictly 2 spaces before 
    raise_not_found_error: false #strictly 4 spaces before not 6 

production: 
    sessions: 
    default: 
     uri: <%= ENV['MONGOHQ_URL'] %> 
    options: #strictly 2 spaces before 
    raise_not_found_error: false #strictly 4 spaces before not 6 

Ich installierte Mongo vom Master und bin Schienen 4.1.0.

EDIT2

Voll Spur Fehler ist unten:

2014-04-15T20:33:05.068810+00:00 app[web.1]: Redis::CannotConnectError - Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED): 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:290:in `rescue in establish_connection' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:285:in `establish_connection' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:79:in `block in connect' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:257:in `with_reconnect' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:78:in `connect' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:304:in `ensure_connected' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:191:in `block in process' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:270:in `logging' 
2014-04-15T20:33:05.068810+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:190:in `process' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:96:in `call' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:186:in `block in info' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in `block in synchronize' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in `synchronize' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:185:in `info' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq/web.rb:218:in `block (2 levels) in <class:Web>' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/connection_pool-2.0.0/lib/connection_pool.rb:58:in `with' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq.rb:69:in `redis' 
2014-04-15T20:33:05.069016+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq/web.rb:218:in `block in <class:Web>' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:133:in `route_eval_with_newrelic' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch' 
2014-04-15T20:33:05.069244+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:116:in `process_route_with_newrelic' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!' 
2014-04-15T20:33:05.069903+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:151:in `dispatch_and_notice_errors_with_newrelic' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:146:in `block in dispatch_with_newrelic' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:335:in `perform_action_with_newrelic_trace' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:143:in `dispatch_with_newrelic' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call' 
2014-04-15T20:33:05.070192+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/error_collector.rb:55:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/browser_monitoring.rb:27:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call' 
2014-04-15T20:33:05.070654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:71:in `block in call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `each' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:676:in `call' 
2014-04-15T20:33:05.070976+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/error_collector.rb:55:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/browser_monitoring.rb:27:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call' 
2014-04-15T20:33:05.071462+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/flash.rb:254:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/cookies.rb:560:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:36:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:82:in `run_callbacks' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call' 
2014-04-15T20:33:05.071665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:38:in `call_app' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `block in call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `block in tagged' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:26:in `tagged' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `tagged' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/request_id.rb:21:in `call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call' 
2014-04-15T20:33:05.072148+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/static.rb:64:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:514:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:144:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:572:in `process_client' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:666:in `worker_loop' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22:in `call' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22:in `block (4 levels) in <top (required)>' 
2014-04-15T20:33:05.072577+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521:in `spawn_missing_workers' 
2014-04-15T20:33:05.073631+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:140:in `start' 
2014-04-15T20:33:05.073631+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>' 
2014-04-15T20:33:05.073631+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load' 
2014-04-15T20:33:05.073631+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>' 
+0

können Sie versuchen, Ihre initializer mit nur 'Redis.new (url vereinfacht: (ENV [‘ REDISTOGO_URL '] ||' redis: //127.0.0.1: 6379 ')) '; Das ist alles was ich in meiner Datei habe. – blotto

+0

@blotto Kein Würfel. Ich habe sogar das 'or localhost'-Stück herausgenommen und es funktioniert immer noch nicht. Es muss die lokale Host-URL von woanders her aufnehmen. – Luigi

+0

meine Vermutung ist Code elcehwere in Ihrem Projekt ist nicht greifen die inits Redis Objekt. gehe zur heroku-Konsole und mache ein paar schnelle Tests. 1) 'p ENV ['REDISTOGO_URL']' 2) 'Redis.new (URL: (ENV ['REDISTOGO_URL']))' '; Wenn dies tatsächlich auf Albacore und nicht auf localhost zeigt, greift Ihr Projektcode einfach nicht auf Ihr initialisiertes Objekt zu. Ich werde einige Konfigurationen in einer vorgeschlagenen Antwort weiter empfehlen – blotto

Antwort

0

Das Problem ist mit der ENV-Variable:

Per Dokumentation sidekiq suchen:

RedisToGo can be used with the default REDISTOGO_URL env var in Sidekiq 2.x and earlier (REDISTOGO_URL is supported for legacy reasons, the REDIS_PROVIDER and REDIS_URL vars are recommended).

Sie müssen die REDIS_PROVIDER oder REDIS_URL ENV verwenden Zugriffe auf Variablen anstelle des für sidekiq 3 und höher. Sie brauchen kein sidekiq initializer, und dieser Code wird es tun:

Führen Sie die folgenden von Ihrem Terminal

heroku config:set REDIS_PROVIDER=redis://...........

+8

REDIS_PROVIDER ist nicht dazu gedacht, die tatsächliche URL zu speichern - es soll den Namen der ENV var enthalten, die die URL enthält. Also sollte es buchstäblich 'REDIS_PROVIDER = REDISTOGO_URL' sein. –

0

Ihre redis.rb Datei als solche eingerichtet:

module MyApp 
    class << self 
    def redis 
     @redis ||= Redis.new(url: (ENV['REDISTOGO_URL'] || 'redis://127.0.0.1:6379')) 
    end 
    end 
end 

in Ihrem sidekiq.rb tun:

Sidekiq.configure_server do |config| 

    Rails.logger = Sidekiq::Logging.logger 

    config.redis = { :url => MyApp.redis[:url], :namespace => 'sidekiq', :size => 5 } 
end 

Sidekiq.configure_client do |config| 
    config.redis = { :url => MyApp.redis[:url], :namespace => 'sidekiq', :size => 1 } 
end 

Dies wird sicherstellen Si Dekiq nimmt die Redis-Verbindung von Ihrer redis.rb-Init-Datei auf.

+0

bahh kopiert genau das ohne glück. Ich habe meine App zurückgerollt, bevor ich MongoHQ eingerichtet habe und es funktioniert einwandfrei. Es muss etwas im Setup von Mongo sein, um Dinge durcheinander zu bringen. – Luigi

+0

yea... Ich frage mich, ob Mongo einige Ihrer Redis-Konfigurationen außer Kraft setzt. poste vielleicht auch deine Inits für Mongo. – blotto

46

ich hatte das gleiche Problem.Sidekiq 3+ erkennt die Umgebungsvariable REDISTOGO_URL nicht automatisch, stattdessen wird REDIS_PROVIDER verwendet. Ich habe eine Config-Referenz von:

heroku config:set REDIS_PROVIDER=REDISTOGO_URL 

dann Problem

gelöst

ich detaillierte Erklärung geben in meinem blog post

+1

Das ist die beste Antwort –

+0

Arbeitete für mich! = D –

+0

@xiaopang Danke –

Verwandte Themen