having SocketException: connection reset issues the moment we migrated from AWS CodeCommit to GitHub Enterprise

Teamcity is having intermittent issues the moment we migrated from AWS codecommit to GitHub enterprise with SSH keys. We are seeing unable to collect changes or session reset all the time. It works if we rerun a few times.

Please advise.

 

VCS problem: git@github.com:Holocene-Advisors-LP/haqr.docker

Failed for the root '"" {instance id=193, parent internal id=78, parent id=DockerBuilds_DockerPyimgProdPy310build_SshGitCodecommitUsEast1amazonawsComV1reposHaqrDocker, description: "git@github.com:Holocene-Advisors-LP/haqr.docker#refs/heads/master"}: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/haqr.docker: Session.connect: java.net.SocketException: Connection reset
0
2 comments

[2023-03-29 10:34:13,353]   WARN [l executor 1733] -      jetbrains.buildServer.VCS - Failed to run operation within 1 attempt: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.git: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,353]   WARN [l executor 1733] -      jetbrains.buildServer.VCS - Unable to collect changes for [Portal & RMS Builds / portal / DR Portal {id=Portal_DrPortal/bt25}]: jetbrains.buildServer.vcs.VcsRootVcsException: Error collecting changes for VCS repository '"https://git-codecommit.us-east-1.amazonaws.com/v1/repos/hadev.portal" {instance id=159, parent internal id=23, parent id=Portal_HttpsGitCodecommitUsEast1amazonawsComV1reposHadevPortal, description: "git@github.com:Holocene-Advisors-LP/hadev.portal.git#refs/heads/master"}'
org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.git: Session.connect: java.net.SocketException: Connection reset: jetbrains.buildServer.vcs.VcsRootVcsException: Error collecting changes for VCS repository '"https://git-codecommit.us-east-1.amazonaws.com/v1/repos/hadev.portal" {instance id=159, parent internal id=23, parent id=Portal_HttpsGitCodecommitUsEast1amazonawsComV1reposHadevPortal, description: "git@github.com:Holocene-Advisors-LP/hadev.portal.git#refs/heads/master"}'
org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.git: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,369]   WARN [l executor 1737] -      jetbrains.buildServer.VCS - Failed to run operation within 1 attempt: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.api.git: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,369]   WARN [l executor 1737] -      jetbrains.buildServer.VCS - Unable to collect changes for [Portal & RMS Builds / portal.api / DR Build {id=PortalApi_DrBuild/bt26}]: jetbrains.buildServer.vcs.VcsRootVcsException: Error collecting changes for VCS repository '"https://git-codecommit.us-east-1.amazonaws.com/v1/repos/hadev.portal.api" {instance id=162, parent internal id=22, parent id=PortalApi_HttpsGitCodecommitUsEast1amazonawsComV1reposHadevPortalApi, description: "git@github.com:Holocene-Advisors-LP/hadev.portal.api.git#refs/heads/master"}'
org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.api.git: Session.connect: java.net.SocketException: Connection reset: jetbrains.buildServer.vcs.VcsRootVcsException: Error collecting changes for VCS repository '"https://git-codecommit.us-east-1.amazonaws.com/v1/repos/hadev.portal.api" {instance id=162, parent internal id=22, parent id=PortalApi_HttpsGitCodecommitUsEast1amazonawsComV1reposHadevPortalApi, description: "git@github.com:Holocene-Advisors-LP/hadev.portal.api.git#refs/heads/master"}'
org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.api.git: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,369]   WARN [l executor 1735] -      jetbrains.buildServer.VCS - Failed to run operation within 1 attempt: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/haqr.pylibs.RMS: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,369]   WARN [l executor 1722] -      jetbrains.buildServer.VCS - Failed to run operation within 1 attempt: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/hadev.portal.libs.git: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)
[2023-03-29 10:34:13,369]   WARN [l executor 1723] -      jetbrains.buildServer.VCS - Failed to run operation within 1 attempt: org.eclipse.jgit.errors.TransportException: git@github.com:Holocene-Advisors-LP/haqr.pylibs.HoloDB: Session.connect: java.net.SocketException: Connection reset (enable debug to see stacktrace)

0

Hi! The error "java.net.SocketException: Connection reset" indicates a networking issue. I'd recommend making sure that running this command locally on the TeamCity server works consistently:

git ls-remote <fetch_URL_of _the_problematic_VCS_root>


Another thing you can try is to switch TeamCity server-side Git operations from JGit to Native git:
https://www.jetbrains.com/help/teamcity/git.html#Native+Git+for+VCS-related+operations+on+the+server
That option is only available for TeamCity versions 2022.04 and above.

0

Please sign in to leave a comment.