error 500 on 5.0 project's show - sidekiq
Closed
error 500 on 5.0 project's show - sidekiq
Created by: brodock
Hi,
I run all the check scripts and everything seems fine, but when I try to open a project's page i get a 500 error.
Looking at the logs, i have this:
ActionView::Template::Error (Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)):
3: %span.cgray.pull-right
4: #{time_ago_in_words(event.created_at)} ago.
5:
6: = cache event do
7: = image_tag gravatar_icon(event.author_email), class: "avatar s24"
8:
9: - if event.push?
app/views/events/_event.html.haml:6:in `_app_views_events__event_html_haml___1064360536_85484780'
app/views/projects/show.html.haml:6:in `_app_views_projects_show_html_haml__230065663_85122240'
app/controllers/projects_controller.rb:62:in `block (2 levels) in show'
app/controllers/projects_controller.rb:58:in `show'
It may look like my redis server is offline, in fact it's on another machine. I've already updated the configuration on resque.yml to:
production: redis://myserver...:6379
Created by: Homlean
@brodock check this issue #3348 (closed)
By Administrator on 2013-03-26T06:09:28 (imported from GitLab project)
Created by: frdmn
Kind of the same problem. As soon as i access any web page:
cache error: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED) /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:268:in `rescue in establish_connection' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:263:in `establish_connection' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:69:in `connect' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:282:in `ensure_connected' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:173:in `block in process' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:248:in `logging' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:172:in `process' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:84:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:715:in `block in get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `block in synchronize' /home/whatyeah/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `synchronize' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:714:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/interface.rb:5:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/marshalling.rb:17:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-activesupport-3.2.3/lib/active_support/cache/redis_store.rb:151:in `read_entry' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:316:in `block in read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:520:in `instrument' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:315:in `read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/http/rack_cache.rb:17:in `read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:30:in `lookup' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:169:in `lookup' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:552:in `process_client' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:632:in `worker_loop' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:500:in `spawn_missing_workers' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:142:in `start' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn_rails:209:in `<top (required)>' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'
(I can create a repo but the repo wont be created in
~/repositories
)my
resque.yml
:development: localhost:6379 test: localhost:6379 production: 'unix:/home/whatyeah/.redis/sock'
/home/whatyeah/.toast/armed/bin/redis-cli -s /home/whatyeah/.redis/sock
:redis /home/whatyeah/.redis/sock>
By Administrator on 2013-03-28T05:25:55 (imported from GitLab project)
Created by: zoide
I encountered the same problem, after upgrading from 4.2 to 5.0
It seems that somewhere in the code, the settings from config/resque.yaml are not used.
I have solved this problem by hacking:
- ruby/1.9.3/gems/redis-3.0.2/lib/redis/client.rb
- vendor/bundle/ruby/1.9.3/gems/redis-3.0.2/lib/redis/client.rb
and changing the " :host => " parameter to my redis-server ip.
By Administrator on 2013-03-31T10:03:31 (imported from GitLab project)
Created by: frdmn
@zoide Thank you for your reply. The problem is that i use a unix socket and im not sure how to specify that here:
DEFAULTS = { :url => lambda { ENV["REDIS_URL"] }, :scheme => "redis", :host => "127.0.0.1", :port => 6379, :path => nil, :timeout => 5.0, :password => nil, :db => 0, :driver => nil, :id => nil, :tcp_keepalive => 0 }
By Administrator on 2013-03-31T13:19:19 (imported from GitLab project)
Created by: frdmn
If i change that to:
DEFAULTS = { :url => lambda { ENV["REDIS_URL"] }, :scheme => "redis", :host => "unix:/home/whatyeah/.redis/sock", :port => nil, :path => nil, :timeout => 5.0, :password => nil, :db => 0, :driver => nil, :id => nil, :tcp_keepalive => 0 }
I get the following errors:
cache error: getaddrinfo: No address associated with hostname /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:112:in `getaddrinfo' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:112:in `connect' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:174:in `connect' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:263:in `establish_connection' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:69:in `connect' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:282:in `ensure_connected' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:173:in `block in process' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:248:in `logging' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:172:in `process' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:84:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:715:in `block in get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `block in synchronize' /home/whatyeah/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `synchronize' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:714:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/interface.rb:5:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/marshalling.rb:17:in `get' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-activesupport-3.2.3/lib/active_support/cache/redis_store.rb:151:in `read_entry' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:316:in `block in read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:520:in `instrument' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:315:in `read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/http/rack_cache.rb:17:in `read' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:30:in `lookup' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:169:in `lookup' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:552:in `process_client' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:632:in `worker_loop' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:500:in `spawn_missing_workers' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:142:in `start' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn_rails:209:in `<top (required)>' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load' /home/whatyeah/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'
By Administrator on 2013-03-31T16:51:42 (imported from GitLab project)
Created by: brodock
I found what's probably causing this error:
https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting
I haven't tested yet, will do soon, but I believe it's related to the "forking" thing...
I'm running it on Phusion Passenger instead of Unicorn, both have different approaches to solve the problem. I will try to create a patch to make both of them work, but it will take sometime as currently my vagrant gitlab machine is not fully operational
By Administrator on 2013-04-02T14:49:59 (imported from GitLab project)
Created by: brodock
The troubleshooting didn't worked. I also tried running it with "rails s" command on production and got a more detailed output:
[2013-04-02 15:04:56] INFO WEBrick 1.3.1 [2013-04-02 15:04:56] INFO ruby 1.9.3 (2012-11-10) [i686-linux] [2013-04-02 15:04:56] INFO WEBrick::HTTPServer#start: pid=2806 port=3000 cache error: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED) /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:268:in `rescue in establish_connection' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:263:in `establish_connection' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:69:in `connect' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:282:in `ensure_connected' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:173:in `block in process' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:248:in `logging' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:172:in `process' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:84:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:715:in `block in get' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `block in synchronize' /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:36:in `synchronize' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis.rb:714:in `get' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/interface.rb:5:in `get' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-store-1.1.3/lib/redis/store/marshalling.rb:17:in `get' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/redis-activesupport-3.2.3/lib/active_support/cache/redis_store.rb:151:in `read_entry' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:316:in `block in read' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:520:in `instrument' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache.rb:315:in `read' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/http/rack_cache.rb:17:in `read' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:30:in `lookup' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:169:in `lookup' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call' /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' /usr/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
By Administrator on 2013-04-02T15:08:40 (imported from GitLab project)
Created by: brodock
I really found what is wrong here... it's the Redis CACHE STORE, it's nothing to do with sidekiq that I initially tought...
"fixing" it is simple: at config/environment/production.rb change:
config.cache_store = :redis_store
to
config.cache_store = :redis_store, { :url => 'redis://example.com:6379' }
@randx could you please change it to start using the values from config/resque.yml?
By Administrator on 2013-04-02T15:48:00 (imported from GitLab project)
Created by: zoide
@bbodenmiller it depends on how you define your 'problem'. @brodock 's answer https://github.com/gitlabhq/gitlabhq/issues/3345#issuecomment-15783526 fixes the issue (also in 5.2). This file is overwritten though on "git checkout 5-x-stable". Careful
Anyway, @randx it would be really great if the setup of resque.yaml would be used thoughout the whole application.
By Administrator on 2013-05-24T08:41:16 (imported from GitLab project)
Created by: menthol
Same problem with Gitlab 5.4. https://github.com/gitlabhq/gitlabhq/issues/3345#issuecomment-15783526 fix that for me.
By Administrator on 2013-08-19T16:40:34 (imported from GitLab project)
Created by: jvanbaarsen
It's been at least 2 weeks (and a new release) since we heard from you. I'm closing this issue but if you still experience this problem, please open a new issue (but also reference the old issue(s)). Make sure to also include the necessary debugging information conforming to the issue tracker guidelines found in our contributing guidelines. /cc @Razer6
By Administrator on 2014-01-09T11:59:25 (imported from GitLab project)