TeamCity VCS GIT connectivity issue

 

Hi 

We are using TeamCity Professional 9.1.7 (build 37573) which is installed on Windows Server 2013 with 3 build agents ( these have been configured on different servers).

We are using GIT as source control and configured as part of CI and CD.

All of a sudden TeamCity is complaining VCS time out issue and we haven't changes the bulid configurations from the day it was created.

Following are the error

VCS problem: URL of GIT
Failed for the root '"URL" {instance id=144, parent internal id=31, parent id=VCS Root ID, description: "ssh://GIT URL/edm#refs/heads/main"}: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://GIT/repo name: Connection timed out: connect

Following is the stack trace

jetbrains.buildServer.vcs.VcsRootVcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.createRootException(VcsChangesStatesCollector.java:22)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:10)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$100(VcsChangesStatesCollector.java:23)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$2.run(VcsChangesStatesCollector.java:5)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.doCollectStates(VcsChangesStatesCollector.java:56)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$000(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$1.run(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java:2)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:45)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:31)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.createLoadChangesTask(VcsChangesFetcher.java:45)
at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:33)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:11)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:6)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:11)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:177)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:360)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:139)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:131)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:112)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:97)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:61)
... 22 more
Caused by: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:158)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:378)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:355)
... 31 more
jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:177)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:360)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:139)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:131)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:112)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:97)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:61)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$100(VcsChangesStatesCollector.java:23)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$2.run(VcsChangesStatesCollector.java:5)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.doCollectStates(VcsChangesStatesCollector.java:56)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$000(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$1.run(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java:2)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:45)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:31)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.createLoadChangesTask(VcsChangesFetcher.java:45)
at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:33)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:11)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:6)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:11)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:158)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:378)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:355)
... 31 more
org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:158)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:378)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:355)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:139)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:131)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:112)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:97)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:61)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$100(VcsChangesStatesCollector.java:23)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$2.run(VcsChangesStatesCollector.java:5)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.doCollectStates(VcsChangesStatesCollector.java:56)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.access$000(VcsChangesStatesCollector.java:3)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$1.run(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java:2)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:45)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:31)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.createLoadChangesTask(VcsChangesFetcher.java:45)
at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:33)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:11)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:6)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:11)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) 

In addition when i try to test the connection with existing settings i am getting the following message

Test connection failed

List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://GIT-URL: Connection timed out: connect

All our builds and its configurations ( around 10 +) are pointing to GIT repository and due to the connectivity issue our build process is getting affected due to this.

Please help

 

Thanks

 

 

1
5 comments

Hi,

I'm assuming that "GIT-URL" was you replacing the actual url with it to not disclose it (it's ok, but would be good to confirm it wasn't accidentaly change it in the configuration)

Did anything else change in the configuration or in the network? Proxy? Firewall? Can other clients connect to the same server properly? Can you try running the git commands from a console in the teamcity server and see whether that works?

1
Avatar
Permanently deleted user

Hi,

 

I am also seeing the same issue "Invalid Packet Line header [1]". Nothing seems to have been changed and I was able to connect last week. Any clues? How do I test git commands from teamcity console? Thanks. 

0
Avatar
Permanently deleted user

Our team is also having this exact same issue, intermittently.  No leads on how to fix.

0
Avatar
Permanently deleted user

In my case, I had added a command to my .alias file. Thus each time, I would do the ssh a command was running in the background. This was not processed cleanly with the ssh url and removing the alias helped solve the issue. Thanks. 

0

@Redpoptarts: If it happens intermittently, I'd check on network connectivity and server load on both ends. Configuration should be fine if it works some times, although it might be worth it reviewing the server's and client's configurations in case there is something out of the ordinary.

0

Please sign in to leave a comment.