Intermittent git connectivity issue while checking out GIT code from jenkins

460 Views Asked by At

While checking out code from jenkins we are getting multiple intermittent issues in GIT connectivity.

Errors:

  1. fatal: unable to access 'https://outgit.net/projects.git/': Failed connect to outgit.net:443; Connection timed out

  2. fatal: unable to access 'https://outgit.net/projects.git/': TCP connection reset by peer

  3. error: RPC failed; result=28, HTTP code = 0 fatal: The remote end hung up unexpectedly

  4. fatal: unable to access 'https://outgit.net/projects.git/': Operation timed out after 300002 milliseconds with 0 out of 0 bytes received

  5. Error cloning remote repo :

From past 2 months issues are arising a lot. kindly suggest on possible solutions for this issue.

This is a intermittent issue 10 20 pipeline gets success but in between we get these issues multiple times.

1

There are 1 best solutions below

4
VonC On

The first thing to do is to activate logs.

In your Jenkins, try and launch the main controller (the one which will do the initial checkout, before sending the codebase to the Jenkins agent) with environment variables like:

GIT_CURL_VERBOSE=1
GIT_TRACE2_EVENT=1

From this Cloudbees page:

Depending on where the git error is happening, these environment variables can be:

  • job parameters,
  • or agent environment variables,
  • or for checkout issues on the controller, set them under Manage Jenkins -> Cofigure System -> Global properties -> Environment variables.

When these varables are set, Git will show more details of the ssh/http/https operations performed by git.

That way, you will see more on Git/HTTPS operations and will start to get elements for your RCA.

Note: GIT_TRACE2 means at least Git 2.22 (Q2 2019).