How to use subversion 1.7 with TeamCity - ANSWER

Hi, we are currently using TeamCity 6.5.5 and saw that it doesn't support subversion 1.7.1. I've tried out the TeamCity 7.0 EAP (build 20334) and found that it gave me the same issues as 6.5.5 when I'm testing the svn connections:

svn: connection refused by the server
svn: OPTIONS request failed on '/svn/turnkey/legacy/trunk'

I saw that TeamCity is using SVNKit as client. SVNKit have released a snapshot release that's compatible with Subbversion 1.7.x. Is there any way of making that version to work with TeamCity or are there any other ways of  making TeamCity work with subversion 1.7.1?

Best regards,

Christoffer


//Stacktrace from the error above on TeamCIty 7.0 EAP:

jetbrains.buildServer.vcs.VcsException: org.tmatesoft.svn.core.SVNException: svn: connection refused by the server
svn: OPTIONS request failed on '/svn/turnkey/legacy/trunk'
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:145)
at  jetbrains.buildServer.vcs.impl.VcsRootInstancesManagerImpl$SVcsRootInstance.getCurrentRevision(VcsRootInstancesManagerImpl.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getCurrentVersion(VcsChangesLoaderImpl.java:73)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getRevisionsForAllRoots(VcsChangesLoaderImpl.java:52)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getLoadChangesIntervals(VcsChangesLoaderImpl.java:105)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:16)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:87)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:49)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:18)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.tmatesoft.svn.core.SVNException: svn: connection refused by the server
svn: OPTIONS request failed on '/svn/turnkey/legacy/trunk'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:642)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:280)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:268)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1007)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:179)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:155)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:143)
... 14 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:102)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:62)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:186)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:334)
... 22 more
org.tmatesoft.svn.core.SVNException: svn: connection refused by the server
svn: OPTIONS request failed on '/svn/turnkey/legacy/trunk'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:642)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:280)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:268)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1007)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:179)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:155)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:143)
at  jetbrains.buildServer.vcs.impl.VcsRootInstancesManagerImpl$SVcsRootInstance.getCurrentRevision(VcsRootInstancesManagerImpl.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getCurrentVersion(VcsChangesLoaderImpl.java:73)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getRevisionsForAllRoots(VcsChangesLoaderImpl.java:52)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getLoadChangesIntervals(VcsChangesLoaderImpl.java:105)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:16)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:87)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:49)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:18)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:102)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:62)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:186)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:334)
... 22 more
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:102)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:62)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:186)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:334)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:280)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:268)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1007)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:179)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:155)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.getCurrentVersion(SvnSupport.java:143)
at  jetbrains.buildServer.vcs.impl.VcsRootInstancesManagerImpl$SVcsRootInstance.getCurrentRevision(VcsRootInstancesManagerImpl.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getCurrentVersion(VcsChangesLoaderImpl.java:73)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getRevisionsForAllRoots(VcsChangesLoaderImpl.java:52)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.getLoadChangesIntervals(VcsChangesLoaderImpl.java:105)
at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:16)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:87)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:49)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:18)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)  
16 comments
Comment actions Permalink

Hello,

  TeamCity doesn't support Subversion 1.7 yet.
  Please watch/vote for http://youtrack.jetbrains.net/issue/TW-18746

  Thanks!
  KIR

0
Comment actions Permalink

"Remote Run" in Eclipse also fails with

An internal error occurred during: "Preparing for TeamCity Remote Run".
Call http://<server>:8111//RPC2 VersionControlServer.getSuitableConfigurations: org.apache.xmlrpc.XmlRpcClientException: Failure writing request

Is this tracked in TW-18746 aswell or in a separate issue?

Still on TeamCity 6.0.2

0
Comment actions Permalink

But what about TeamCity 7.0 EAP or the upcomming 7.0?

And shouldn't it be possible to replace the SVNKit jar-files with new ones (snapshoot 1.7.0) that support svn 1.7?

http://svnkit.com/download.php

Regards,

Christoffer

0
Comment actions Permalink

Hello,

We didn't test snapshot version of SVNKit 1.7 yet.

If you brave enough to try it yourself, you should replace svnkit files under
TeamCity/webapps/ROOT/WEB-INF/plugins/svn/server
AND

replace them inside TeamCity/webapps/ROOT/WEB-INF/plugins/svn/agent/svnAgent.zip file


And, don't forget to backup whole TeamCity/webapps/ROOT/WEB-INF/plugins/svn directory first.

All the best,
KIR
0
Comment actions Permalink

I was just about to do it when you wrote your answer. :) Just decompiled svn-common.jar the see if getCurrentVersion is doing any check regarding versions.

I will report back the results.

BR,

Christoffer

0
Comment actions Permalink

I did as you said bu using the svn files from TeamCity 7.0 EAP. And it works! :) I'm now using SVN 1.7.1 and a modded TeamCity 6.5.5.

I haven't found any bugs so far.

Best regards,

Christoffer

0
Comment actions Permalink

Christoffer - Could you elaborate on your solution?  Are you saying that you simply copied the contents of TeamCity\webapps\ROOT\WEB-INF\plugins\svn from 7.0 to 6.5?  Or did you download a new svnkit?  If the latter, could you paste a link to which files you specifically copied.  I'm not familiar with the Java environment/suite of tools and as such I was unsuccessful in finding the files to pull from Maven.  I'm on the Windows platform

0
Comment actions Permalink

A separate issue has been created for the Eclipse "Remote Run" problem:  http://youtrack.jetbrains.net/issue/TW-19008

0
Comment actions Permalink

Or even better, just take the lib content from the 1.7.0-snapshot zip from svntkit: http://teamcity.tmatesoft.com/ and remove the old files on the agent in i.e. C:\BuildAgent\plugins\svnAgent\lib and put the new files there. (for agent side checkout)

0
Comment actions Permalink

Please note this solution was not tested by JetBrains, so it's not supported officially.

TeamCity 7.0 will provide support for Subversion 1.7.

0
Comment actions Permalink

Christoffer - how do I get 1.7.0-snapshot zip?  I followed the link.  I don't have a login, so I entered as guest.  I browsed the 1.7.X for some time and didn't see where I could grab the zip file.

0
Comment actions Permalink

Hi Christoffer

Could you please give further details how it worked on your machine?
- Which files
- Where do we get these
- Do we have to rename any files
- ...

I was not able to change the files, that TeamCity is still running.

Thanks, Stephan

0
Comment actions Permalink

Hi,

  TeamCity 6.5.6 should work with 1.7 SVN servers out of the box.
  But, 1.7 working copy format (agent-side checkout) doesn't work yet.

  Regards,
  KIR

0
Comment actions Permalink

But there is a possibility to use the alpha version of svn kit, isn't it? I know it's not finally implemented and tested, but it could work not that bad. Which files do I have to replace in version 6.5.6 to get SVN 1.7 work on client side?

0
Comment actions Permalink

I've attached an unofficial plugin with support of 1.7 working copies for TeamCity 6.5.6 to the issue http://youtrack.jetbrains.net/issue/TW-18583
Please try it.

0
Comment actions Permalink

Per the above post, it seems that TC7 should work fine with SVN1.7 out of the box.

0

Please sign in to leave a comment.