Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I debug Gitlab Web hooks?

I am currently using gitlab_6.9.1-omnibus-1_amd64 on a fresh install Ubuntu 12.04 in a KVM instance with dedicated WAN IP.
Everything works except web hooks. I have added every possible way of web hook adding options.

  • Gitlab shows hooks with a test button which does nothing.
  • I have also added global hooks via gitlab-rake but that does nothing too.
  • Sidekiq runs.
  • Also nothing in sidekiq log, just like gitlab-ctl - tail shows nothing wrong.

# gitlab-rake gitlab:web_hook:list

Could you please show me how I can debug web hooks on GitLab?

PS: I would like to ask this on Server Fault but I thought it must be here since it would be debugging help.

like image 401
risyasin Avatar asked May 29 '14 12:05

risyasin


1 Answers

First make sure your server can reach the internet or the WebHook address, e.g. use curl to make a request to your WebHook Url.

If the curl request succeeded, then try to trigger your GitLab to send a WebHook request by Test button. If there's nothing wrong, a notification 'Hook executed successfully: HTTP 200' will appear. If there is any error, a notification with the error details will show up.

After you triggered the hook by push event, you can lookup into GitLab's log (in production.log if your environment is production), like WebHook Error => Failed to open TCP connection to 192.168.1.1:80 (No route to host - connect(2) for "192.168.1.1" port 80).

If the curl request failed, try to figure out what's wrong with your network. Once the error is resolved, the GitLab WebHook requests should be successfully sent out.

like image 79
Senorsen Avatar answered Sep 28 '22 04:09

Senorsen