15

I've recently starting seeing the above error with ever-increasing frequency on our build server. Nothing has changed in our TeamCity configuration during this period, so I'm guessing it might be changes at GitHub that are causing the error.

I've tried changing our VCS polling interval from 60s down to 600s in case GitHub was doing some kind of connection throttling, but there has been no affect.

Is it possible to make TeamCity less sensitive to connection timeouts?

Richard
  • 4,302
  • 3
  • 30
  • 35

7 Answers7

15

I've figured out the answer.

TeamCity has no issues - it's actually AZURE that has a problem.

For proof, try doing this in your server, where TC is installed.

(command line, of course)

C:\git\bin\git.exe clone https://github.com/libgit2/libgit2.git

and this should not work most of the time.

So AZURE has a networking bug and they know about it and are trying to resolve the issue.

This info was provided via GitHub after they worked with Azure to figure out what was going on.

Conclusion

You have to use SSH KEYS as a current workaround.

Community
  • 1
  • 1
Pure.Krome
  • 78,923
  • 102
  • 356
  • 586
3

We have made it less sensitive: now git-plugin will retry an operation in the case of ConnectException. To get this behaviour you need to install the latest build of git-plugin from teamcity.jetbrains.com. To do that put the zip from the build's artifacts into <TEAMCITY_DATA_DIR>/plugins and restart the server.

neverov
  • 1,253
  • 7
  • 11
  • Thanks for this response, I'm trying it out now and will let you know if it works out for me. – Richard Jan 31 '14 at 10:30
  • Can you check that link?? It's goes to a page where we need to login? Also, isn't GIT baked in to TC, since TC v5 so we don't need to download anything extra? (ref: http://confluence.jetbrains.com/display/TW/TeamCity+Plugins) – Pure.Krome Feb 21 '14 at 01:05
  • @Pure.Krome The link does go to a login page, but there is a "log in as guest" text link below the login button. – Richard Feb 22 '14 at 13:01
  • 1
    @neverov - do we need to do this with TC version 8.1a? If so, why wasn't it including in the latest release? – Pure.Krome Feb 22 '14 at 23:29
  • @Pure.Krome you don't need to do this in 8.1 – neverov Feb 24 '14 at 18:24
  • Turns out this worked for about a month, but now we're getting even more timeouts than before. – Richard Mar 22 '14 at 14:10
  • @Stony, please install [the latest build of plugin](http://teamcity.jetbrains.com/viewType.html?buildTypeId=TeamCityPluginsByJetBrains_Git_JetBrainsGitPluginTeamCity81x&tab=buildTypeStatusDiv) it has more improvements in this area. – neverov Mar 24 '14 at 15:08
  • Even with SSH keys and TeamCity 8.1.1 and using the latest git-plugin from http://teamcity.jetbrains.com/viewType.html?buildTypeId=TeamCityPluginsByJetBrains_Git_JetBrainsGitPluginTeamCity81x I have troubles. But I get an other exception this time: Failed for the root 'master' #135: List remote refs failed: java.io.InterruptedIOException: Read timed out Ideas? I'm on Azure and using github as well – philippdolder Mar 26 '14 at 13:39
  • @neverov Switching to SSH fixed it for me - maybe this Azure networking bug is causing my issues, as I am hosting TC on Azure. – Richard Apr 06 '14 at 08:07
  • Switching to SSH doesn't seem to have solved the problem for me, it is still intermittent, and if anything this is worse in my situation. Did you have to open any special ports or make any Azure configuration changes for the SSH to work? – The Senator Jul 21 '14 at 17:26
1

You've posted to few information for the question. It's better if you could email the team to teamcity-feedback@jetbrains.com with more details and debug logs from the TeamCity server

Some easy to check things: * you can open github.com from the server in browser * you can clone from github.com in the server from console

Eugene Petrenko
  • 4,189
  • 21
  • 30
1

We've got this error all of sudden today (Feb 23, 2018).

Turns out GitHub.com deprecated some of the security algorithms in their ssh implementation.

Solutions:

  • switch to "https://..." URL in the affected VCS roots and provide your credentials for authentication
  • upgrade to the latest TeamCity version

Here's an announcement from JetBrains: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360000115644-Builds-using-GitHub-com-fail-with-VCS-errors-since-February-22-FIX-AVAILABLE

Alexander Puchkov
  • 5,763
  • 4
  • 30
  • 46
0

Switching to ssh helped us to avoid timeouts.

Marat Faskhiev
  • 1,242
  • 5
  • 16
  • 36
0

As @Pure.Krome says, you can use SSH KEYS to allow you to access the Azure TFS GIT URL, or you can modify the settings in "Alternative Credentials" by checking "Enable alternate credentials" so you can access the repository by just using a username and password.

First in Azure DevOps go to your project:

enter image description here

Then choose Security in the RHS menu:

enter image description here

Finally choose "Alternate Credentials" in the LHS menu and click the "Enable authentication alternate credentials" where you will then put in your username and password:

enter image description here

Please beware that this is less secure than using the SSH KEYS.

user8128167
  • 5,380
  • 6
  • 53
  • 70
0

I got this issue even when using ssh. I realized that there was a firewall that was seeing all the ssh traffic as an ssh brute force attack. The firewall would then block the request.

A firewall rule was added to resolve the issue.