我已经广泛搜索了这个并看到了上述错误的许多实例。
这可能是由任何/很多事情造成的,我所看到的是最有可能在追踪中找到原因。
但是,我不知道是什么原因导致了我自己的错误,即使是从跟踪中也是如此。
然而,我注意到的是这条线:
SocketError: getaddrinfo: Name or service not known
我的理解与在线连接资源失败有关。在这种情况下,这个资源是什么,我不知道。
PS:这一直在推动以前的推动。 (之前推动这个回购一直没有出现故障)
以下是我的日志跟踪显示错误的部分。
remote: Bundle completed (61.86s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: SocketError: getaddrinfo: Name or service not known
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:152:in `getaddrinfo'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:152:in `connect'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:211:in `connect'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:322:in `establish_connection'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:94:in `block in connect'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:279:in `with_reconnect'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:93:in `connect'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:350:in `ensure_connected'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:207:in `block in process'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:292:in `logging'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:206:in `process'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:112:in `call'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:1320:in `block in smembers'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `block in synchronize'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `synchronize'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:1319:in `smembers'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-redis-0.7.0/lib/flipper/adapters/redis.rb:26:in `features'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-0.7.0/lib/flipper/adapters/instrumented.rb:36:in `block in features'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-0.7.0/lib/flipper/instrumenters/noop.rb:5:in `instrument'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-0.7.0/lib/flipper/adapters/instrumented.rb:35:in `features'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-0.7.0/lib/flipper/adapters/memoizable.rb:28:in `features'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/flipper-0.7.0/lib/flipper/dsl.rb:230:in `features
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/config/initializers/flipper.rb:10:in `<top (required)>'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `block in load'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:652:in `block in load_config_initializer'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/notifications.rb:166:in `instrument'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:651:in `load_config_initializer'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `each'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `block in <class:Engine>'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `each'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `tsort_each_child'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:457:in `block in run_tasks_blocks'
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to oge-resilience-staging.
remote:
To git@heroku.com:*****'
! [remote rejected] dev -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:*****'
require 'flipper/adapters/redis'
flipper_redis_options = {}
flipper_redis_options[:url] = ENV['BOXEN_REDIS_URL'] || ENV['REDISCLOUD_URL']
flipper_redis_client = Redis.new(flipper_redis_options)
flipper_adapter = Flipper::Adapters::Redis.new(flipper_redis_client)
FLIPPER = Flipper.new(flipper_adapter)
unless FLIPPER.features.to_a.detect{|feature| feature.name == "resilience_enabled" }
FLIPPER[:resilience_enabled].disable
end
我想了解问题所在,以及如何解决。感谢。
答案 0 :(得分:2)
remote: SocketError: getaddrinfo: Name or service not known
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:152:in `getaddrinfo'
您的应用似乎正在尝试在以下初始化程序中连接到Redis
remote: /tmp/build_96c4b997594af6741a41839fe335a90a/config/initializers/flipper.rb:10:in `<top (required)>'
但Redis服务器不可用(或无效)。