2

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.

James Z
  • 12,209
  • 10
  • 24
  • 44
Sapna
  • 29
  • 3

1 Answers1

0

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).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • As suggested by you i have added both parameters in test utiltiy for code checkout still getting intermittent issues . One of issue : * Initializing NSS with certpath: sql:/etc/pki/nssdb Build timed out (after 5 minutes). Marking the build as aborted. * Operation timed out after 300001 milliseconds with 0 out of 0 bytes received * Closing connection 0 fatal: unable to access 'https://ourgit.net/sec/controlm_code.git/': Operation timed out after 300001 milliseconds with 0 out of 0 bytes received Its getting stucked at * Initializing NSS with certpath: sql:/etc/pki/nssdb -- – Sapna Dec 28 '21 at 10:14
  • @Sapna OK. However, after adding those environment variables, do you see more detailed traces around Git commands? – VonC Dec 28 '21 at 11:25
  • Yes we are able to get clear view of gita nd network realted parameter we are getting some ssl issue because of which TCP connection reset error is coming intermittently . Connection also getting timeout to our gitlab url from jenkins . – Sapna Dec 30 '21 at 10:48
  • @Sapna It seems the network itself is unreliable. Would the issue persists when the Git operations are done from another network? – VonC Dec 30 '21 at 16:18