Webhook error: "We couldn’t deliver this payload: Couldn't connect to server"

I have webhooks setup to automatically trigger Jenkins builds on Github commits. They eventually stopped triggering the builds so I checked Github to find the following error: "We couldn’t deliver this payload:  Couldn’t connect to server".

I understand what it is saying but DNS records and queries (through ping, dig, traceroute and curl) show that the Payload URL is valid outside of Github webhooks. Is there a way to get more information about the request other than “Couldn’t connect to server”?

At the moment, I have to manually go into Jenkins and trigger a build for git commits made to Github repos. I have Jenkins configured with Github correctly using the instructions at https://support.cloudbees.com/hc/en-us/articles/224543927-GitHub-webhook-configuration. We’re also using https://go.cloudbees.com/docs/plugins/github-branch-source/ to manage our Github organization, repos, and branches.

Jenkins can successfully scan and clone my repos but it seems Github cannot make requests to our Jenkins master.

Looks like our AWS Security Group was white-listing Github Hook IP addresses (https://api.github.com/meta) and Github recently added or changed an IP address that was not in the Security Group. So our AWS Security Group was rejecting requests. We added refreshed the IP addresses and it now works.

3 Likes

Is there a protocol for replying to messages?

Example in the following answer :

“Looks like our AWS Security Group was white-listing Github Hook IP addresses (https://api.github.com/meta) and Github recently added or changed an IP address that was not in the Security Group. So our AWS Security Group was rejecting requests. We added refreshed the IP addresses and it now works.”

I appreciate the above response, however a more helpful (powerful) answer would have provided a description of adding the refreshed IP addresses.  

Currently I have the issue of running a Jenkins pipeline in an EC2 instance from a web-hook generated in GitHub.

How do you set up the Security Group to allow this? There appears no help for this in AWS.

I propose a protocol for each response to consider that the reader knows only basic info about the subject and to provide such details that the reader can easily resolve the stated problem.  This would reduce much time in resolving problems, etc.