-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
Jenkins version: 1.573
Gitlab hook plugin: 1.3.1
GIT plugin: 2.3.5
GIT client plugin: 1.9.0
Previous, I added a web hooks http://jenkins.my.domain/gitlab/build_now in my project on gitlab site, then I access to Settings > Web hooks > and press Test hook button. My Jenkins server run build my app.
However, a week ago ( on monday, Oct 19, 2015), my Jenkins could not auto build when having a new commit to gitlab. And, I tried to test it by pressing Test hook button on gitlab site, It spent a very long time and returned a error 500
Then I checked log in production.log and got:
Completed 500 Internal Server Error in 10158ms
_{{Timeout::Error (execution expired):
app/models/web_hook.rb:31:in `execute'
app/services/test_hook_service.rb:4:in `execute'
app/controllers/projects/hooks_controller.rb:27:in `test'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'}}_
I have been google and find that https://gitlab.com/gitlab-org/gitlab-ce/issues/520
and he said that edit app/models/web_hook.rb file and change
{{# HTTParty timeout
default_timeout 10}}
to
{{# HTTParty timeout
default_timeout 100}}
Unfortunate, It bypass this error and display an other error: (502 Proxy error.)
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /myproject/hooks/207/test.Reason: Error reading from remote server
I continuos google with error and find out the link https://groups.google.com/forum/#!topic/gitlabhq/Ji0ub1iQw-o
Then i tried to edit by add this line to app/models/web_hook.rb
{{
WebHook.http_proxy('127.0.0.1', 8080)}}
Then, I got the error:
ActionController::RoutingError (No route matches [POST] "/gitlab/build_now"):
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:38:in `call_app'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:25:in `tagged'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `tagged'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552:in `process_client'
vendor/bundle/ruby/1.9.1/gems/unicorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:51:in `process_client'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'
vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'
vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'
What should I do?
Thank in advance.