3
votes

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:

  • Jenkins ver. 2.60.1
  • GitLab version 9.4.0-rc2-ee
  • Git lab plugin 1.4.6
3
Did you complete all the required configuration forms both in Jenkins as in GitLab?Bram

3 Answers

1
votes

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

0
votes

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.

0
votes

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.