Upgrading error "TCP connection reset by peer"

Having problem to initiate the stepwise gitlab-ce upgrade, from 14.9.2 to 15.11.
The gitlab installation is running on CentOS 7.9 and earlier upgrade to 14.9.2 worked like a charm.
Now, after running “yum makecache” and “yum --showduplicates list gitlab-ce” I get the error:

https://packages.gitlab.com/gitlab/gitlab-ce/el/7/x86_64/repodata/repomd.xml: [Errno 14] curl#35 - “TCP connection reset by peer”.

Here is the gitlab_gitlab-ce.repo file used on the CentOS server:

[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ce-source]
name=gitlab_gitlab-ce-source
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

What could be the cause ?

The error message points to a network problem. Either the packages server became unresponsive for a moment, and dropped the connection request, or something on the way blocked it (firewall, broken routes, etc.). I’d verify that packages.gitlab.com can be reached from your network, i.e. with calling curl -L https://packages.gitlab.com from different servers, and checking whether your observability tools alerted on network problems too. If the problem persists, try restarting the network interfaces or the server.

Hi,
Have run curl -v https://packages.gitlab.com from the affected GitLab server plus some other servers with the same negative result:

curl -v https://packages.gitlab.com
Connected to packages.gitlab.com (104.18.20.224) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
NSS error -5961 (PR_CONNECT_RESET_ERROR)
TCP connection reset by peer
curl: (35) TCP connection reset by peer

The same curl-test on a similar CentOS server outside the datacenter works as it should.
So, I have created a ticket for the network staff to look at

1 Like