Jenkins + Github: we could not deliver this payload: failed to connect to the server

I am trying to configure a web hook on GitHub so that it can send POST to the address http://127.0.0.1:8080/github-webhook/

My Jenkins runs on http://127.0.0.1:8080

And here is my GitHub web hook configuration: enter image description here

And I get the following error:
enter image description here

My Jenkins works for sure on http://127.0.0.1:8080/ . So this is not a problem.

+11
github jenkins
source share
3 answers

GitHub did not know how to contact "localhost" or 127.0.0.1 : what GitHub considers "local" is not your local machine.

You need to specify the IP address that GitHub can communicate over the Internet. Not only "localhost".

This means that your computer must set port 8080 to the Internet.
This may include opening a port on your router, for example.
Or at work, ask your IT department for a firewall rule to allow traffic on that port.

+8
source share

If you want to try running Jenkins on localhost, on the contrary, install ngrok: https://ngrok.com/download, which expose localhost URLs over the Internet. After installing ngrok, run it, for example,

 ./ngrok http 8080 

It will give you the url: http://3b2db437.ngrok.io

Now under payloadUrl: enter url as:

 http://3b2db437.ngrok.io:8080/github-webhook/ 

The localhost Jenkins installation will now start and the payload error will disappear.

+1
source share

When I use the below url using ngrok and see that jenkin is working fine

https://d722e6a5.ngrok.io:8080/github-webhook/

Bu, when Webhook tries to connect to jenkins due to url in github, then we get a message like

We were unable to deliver this payload: service timeout

0
source share

All Articles