我的Jenkins安装(1.442,不能选择升级,因为它是公司管理的中央安装),需要(通过https)访问代理后面的SVN存储库。我相应地配置了.subversion/servers文件,还设置了http_proxy和https_proxy环境变量。
.subversion/servers
http_proxy
https_proxy
SVN连接从根本上起作用:
但是,每当由于仓库中的更改而触发构建时(或者如果我在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
我终于能够解决此问题。
事实证明,SVN轮询和结帐发生在分配了作业的Jenkins从属服务器上,而更改日志构建步骤发生在Jenkins主服务器上。
果然我们仅在从属服务器上拥有SVN代理配置…