Git Tagging/Labeling Issue with TeamCity 7.1.3 and Team Foundation Server Express 2015

Answered

Hi

I'm having the same trouble with both automatic and manual labeling. On the TeamCity website the following error is displayed: 

Failed: Failed to set label 'xxxx': Labelling failed: java.net.SocketException: Connection reset

In the TeamCity logs the underlying error causing the above seems to be this:

https://username@hostname/tfs/DefaultCollection/_git/RepoName: cannot open git-receive-pack

 

Interestingly when I log onto the TeamCity server and check the local Git repository, the labels are being created and of course a different error message is obtained when trying to create the same again. The issue is that the labels never get pushed up to the remote repository in TFS.

 

Any suggestions would be appreciated. I recall seeing an issue about Git labeling in release notes for a particular TeamCity version but I can't track it down again. 

 Note: I get the same issue if I try it over HTTP as well. I believe the issue was related to labeling over HTTPS.

6 comments

Hello,

Please upgrade to the latest TeamCity version (9.1.7) and let me know if the issue is still present.

0

Hi Alina

 

We've upgraded to the current version of TeamCity (9.1.7) but unfortunately the problem persists. I've included more of the surrounding lines from the error log:

 

Front end:

Failed: Failed to set label 'build.0.1.2334.0': Labeling failed: java.net.SocketException: Connection reset

 

teamcity-vcs.log: 

[2016-06-15 16:03:51,942] INFO [mal executor 10] - jetbrains.buildServer.VCS - Labeling VCS root "MyVcsRootName" {instance id=20, parent internal id=1, parent id=xxxx, description: "http://hostName/tfs/DefaultCollection/_git/RepoName#master"}@0a9c3b584e632130908e01e70ca4551ae6c09104 for build Running build bt2 on SERVERNAME, build id: 8570
[2016-06-15 16:03:53,222] INFO [p-nio-80-exec-2] - jetbrains.buildServer.VCS - Setting build revisions on agent="SERVERNAME" {id=1}, buildPromotion=Build promotion {promotion id=8571, configuration=ConfigurationName :: CI Build and Unit Test {id=bt2, internal id=bt2}, branch=develop, running, modificationId=3255, revisions=["MyVcsRootName" {instance id=20, parent internal id=1, parent id=project_id, description: "http://hostName/tfs/DefaultCollection/_git/RepoName#master"}: 6912698679f7b50c2d29eccb813f8256a618ef3f]}, revisions={"MyVcsRootName" {instance id=20, parent internal id=1, parent id=vcsRootId, description: "http://hostName/tfs/DefaultCollection/_git/RepoName#master"}=null}

[2016-06-15 16:03:53,347] WARN [mal executor 10] - jetbrains.buildServer.VCS - Failed to set label 'build.0.1.2334.0'
jetbrains.buildServer.vcs.VcsException: Labeling failed: java.net.SocketException: Connection reset
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:177)
at jetbrains.buildServer.buildTriggers.vcs.git.GitLabelingSupport.label(GitLabelingSupport.java:104)
at jetbrains.vcs.api.services.impl.LabelingServiceProvider$1.label(LabelingServiceProvider.java:1)
at jetbrains.buildServer.vcs.impl.VcsLabeler.doSetLabel(VcsLabeler.java:101)
at jetbrains.buildServer.vcs.impl.VcsLabeler.access$400(VcsLabeler.java:18)
at jetbrains.buildServer.vcs.impl.VcsLabeler$2$1.run(VcsLabeler.java:4)
at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:41)
at jetbrains.buildServer.vcs.impl.VcsLabeler$2$2.run(VcsLabeler.java:3)
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: http://hostNameHere/tfs/DefaultCollection/_git/RepoName: cannot open git-receive-pack
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:530)
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:405)
at jetbrains.buildServer.buildTriggers.vcs.git.GitLabelingSupport.push(GitLabelingSupport.java:122)
at jetbrains.buildServer.buildTriggers.vcs.git.GitLabelingSupport.label(GitLabelingSupport.java:102)
... 11 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:197)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at jetbrains.buildServer.buildTriggers.vcs.git.SNIHttpClientConnection.execute(SNIHttpClientConnection.java:200)
at jetbrains.buildServer.buildTriggers.vcs.git.SNIHttpClientConnection.getResponseCode(SNIHttpClientConnection.java:172)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:481)
... 14 more

0

It states the following on this page https://confluence.jetbrains.com/display/TCD9/Git#Git-Limitations:

"

Known Issues
Tagging is not supported over the HTTP protocol

"

 

Is this why it's not working?

0

Hi Brendon,

It seems that the issue noted in documentation is outdated. We double checked that git labeling over HTTP works and I've fixed the doc.

We also tested that labeling works with Team Foundation Server 2015. It looks like there are some network connection issues in your case. Could you please try to set label via command line on TeamCity server machine? Does it work?

0

Hi

 

I must have missed the notification for the last post. It was related to different permissions for tag creation between Git and TFVC repositories: https://msdn.microsoft.com/en-us/library/ms252587.aspx.

0

Please sign in to leave a comment.