Jenkins和SVN代理的问题

时间:2013-05-25 07:57:27

标签: svn proxy jenkins

我的Jenkins安装(1.442,升级不是一个选项,因为它是公司管理的中央安装)需要访问代理后面的SVN存储库(通过https)。我相应地配置了.subversion/servers文件,并设置了http_proxyhttps_proxy个环境变量。

SVN连接从根本上起作用:

  • 我可以结帐项目
  • 我打电话调查SVN存储库以进行更改

但是,每当由于repo的更改而触发构建时(或者如果我在Jenkins工作区中尚未存在SVN更新时手动触发构建),则会发生以下错误。当Jenkins在SVN中检测不到任何更改时,构建工作,因此不会尝试构建更改日志。

预计Jenkins机器无法解析主机名,但绝不应该尝试使用代理。

对我来说,这看起来好像Jenkins SVN插件正确地使用代理配置从SVN进行轮询和更新,但是SVN更改日志构建器忽略了该配置?!

任何提示如何解决这个问题?

At revision 1324
hudson.util.IOException2: revision check failed on https://xxxxx/....
at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:170)
at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:112)
at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:555)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:702)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:568)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:457)
at hudson.model.Run.run(Run.java:1404)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS /..... failed
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:291)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:276)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:264)
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:1001)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:178)
at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:482)
at org.tmatesoft.svn.core.wc.SVNBasicClient.getLocations(SVNBasicClient.java:873)
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:534)
at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:1019)
at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:894)
at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:826)
at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:158)
... 10 more
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /....... failed
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:146)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:89)
... 24 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/.....'
svn: unknown host
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:644)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:285)
... 23 more
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS request failed on '/....'
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:642)
... 24 more
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: unknown host
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:397)
... 24 more
Caused by: java.net.UnknownHostException: XXXXXX
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
at java.net.InetAddress.getAllByName(InetAddress.java:1084)
at java.net.InetAddress.getAllByName(InetAddress.java:1020)
at java.net.InetAddress.getByName(InetAddress.java:970)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createAddres(SVNSocketFactory.java:141)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:72)
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:342)
... 24 more

1 个答案:

答案 0 :(得分:0)

我终于能够解决这个问题了。

事实证明,SVN轮询和签出发生在分配作业的Jenkins从站上,而更改日志构建步骤发生在Jenkins主站上。

果然我们只在奴隶上安装了SVN代理服务器......