After my latest update to Gitlab (to version 10.7.3 ee), I found my webhooks on several of my repositories stopped working. When I’d manually test them from the Gitlab Interface, I got a generic 500 error:
I figured this had something to do with the recent update, so I dug into the logs. I found the issue in /var/log/gitlab/gitlab-rails/production.log:
Gitlab::HTTP::BlockedUrlError (URL ‘https://myserver.domain.com:8170/code-manager/v1/webhook?type=github&token=blahblahblahblah’ is blocked: Requests to the local network
are not allowed):
lib/gitlab/proxy_http_connection_adapter.rb:17:in `rescue in connection’
app/services/test_hooks/base_service.rb:22:in `block in execute’
The whole “requests to the local network are not allowed” thing was new to me, so I found this:
The comments at the bottom showed me the way. THere is a new setting you have to enable:
- Log into Gitlab
- Go to the admin area
- Go to Settings
- Go to Outbound Requests
- Click the “Allow requests to the local network from hooks and services” button.
- Save the changes
Viola! It works now.