gitlab-plugin icon indicating copy to clipboard operation
gitlab-plugin copied to clipboard

Gitlab Webhook 404's

Open Aarex1 opened this issue 4 years ago • 2 comments

Issue

gitlab webhook 404's when called from gitlab or if you test the URL directly off of the jenkins server.

Context

Gitlab plugin version: 1.5.13 Gitlab version: 13.4.3 Jenkins version: 2.249.3 Job Type: Pipeline

Logs & Traces

Jenkins logs do not provide much information

Nov 19, 2020 9:32:51 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic WebHook called with url: /jenkins/project/(removed)

Problem description

If I try to look at the generated webhook right on the jenkins url, it 404's

URI: /jenkins/project/(REMOVED)
404
Not Found
Stapler

If I test a push event webhook from a gitlab project, I receive a message saying webhook executed successfully but returned 404

These are webhooks and gitlab projects that have previously worked and recently started to fail. I am not entirely sure when they started to fail.

Our Jenkins implementation is behind a F5 load balancer, I tested by bypassing the load balancer and the issue still persisted.

Aarex1 avatar Nov 19 '20 15:11 Aarex1

@Aarex1 and others that may be experiencing this problem:

I had run into this exact issue and was having troubles diagnosing, if you enable a log recorder in Jenkins following the instructions in the readme, I.E:

To enable debug logging in the plugin: Go to Jenkins -> Manage Jenkins -> System Log Add new log recorder Enter 'Gitlab plugin' or whatever you want for the name On the next page, enter 'com.dabsquared.gitlabjenkins' for Logger, set log level to FINEST, and save Then click on your Gitlab plugin log, click 'Clear this log' if necessary, and then use GitLab to trigger some actions Refresh the log page and you should see output

You will probably find some additional debug information in the logger and in my case it turns out I hadn't properly sent ALL the headers to the Jenkins project endpoint as I was forwarding the Gitlab request through a proxy of sorts. My implementation may be different than yours but you may find some additional details and info that will point you in the right direction.

CammoKing avatar Feb 10 '21 22:02 CammoKing

i got this error too

erlangparasu avatar Oct 05 '22 07:10 erlangparasu