annie
annie

Reputation: 91

Webhook execution failed: execution expired

I am trying to trigger jenkins build whenever there is a push to GitLab.
I am referring to https://github.com/jenkinsci/gitlab-plugin.

When I test the connection for webhook it shows execution expired.

I am using:

Upvotes: 4

Views: 17181

Answers (3)

Harsh Wardhan Gupta
Harsh Wardhan Gupta

Reputation: 393

I have faced the same issue. In my case Jenkins is running in an AWS EC2 instance. I have resolved the issue by whitelisting the Public IP addresses of Gitlab on port 443 into the instance security group.

Upvotes: 0

gmaam
gmaam

Reputation: 31

It means issues in between jenkins server and gitlab or github server.

Like what I did:

I have set my local-IP:port/project/jenkins_project_name

http://192.168.1.21:8080/project/jenkins_project_name

and set the above URL in the gitlab webhook, it shouldn't work - right?

Because it's an IP that's private and not routable.

SO later I realized and set the public-IP and then hook worked.

http://public_IP:8080/project/jenkins_project_name

Note: To routable public-IP, you should expose port in your router [e.g. 8080 was for me or anything want ]

Hope this works.

Upvotes: 0

VonC
VonC

Reputation: 1323313

The exact error message, clicking "Test setting" from GitLab:

We tried to send a request to the provided URL but an error occurred: execution expired

As mentioned in issue 128:

This looks and sounds like a configuration or network error.
Maybe your machine is not publicly available on the webhook address (firewall etc).

For instance, on Digital Ocean server, you would need to open up the port (mentioned in git-auto-deploy.conf.json) in the firewall:

sudo ufw allow 8866/tcp

Double-check though what you put in Manage Jenkins > Configure in term of Gitlab information (connection name, host url, credentials), as mentioned in jenkinsci/gitlab-plugin issue 391.
See GitLab Integration Jenkins: Configure the Jenkins server

Upvotes: 1

Related Questions