0

我正在使用 JENKINS 来配置项目的构建过程。

从 JENKINS GUI 配置项目时,我尝试输入存储库的 URL。

https://abc.xyz.def.rst.com/jkl/bnm/branches/myApp/

我得到如下异常。

注意事项:

  1. Jenkins 已部署在 UNIX 机器上。
  2. 正在从 WINDOWS 访问 JENKINS GUI:
  3. 可以使用 UNIX 机器上的 SVN 命令访问存储库。

    FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /jkl/bnm/branches/myApp/ failed
    
    
    org.tmatesoft.svn.core.SVNException: svn: OPTIONS /jkl/bnm/branches/myApp/ 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.testConnection(DAVRepository.java:97)
        at hudson.scm.SubversionSCM$DescriptorImpl.postCredential(SubversionSCM.java:1790)
        at hudson.scm.SubversionSCM$DescriptorImpl.doPostCredential(SubversionSCM.java:1735)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:104)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:234)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.lang.Thread.run(Thread.java:595)
    Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /jkl/bnm/branches/myApp/ 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)
        ... 49 more
    Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/jkl/bnm/branches/myApp/'
    svn: timed out waiting for server
        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)
        ... 48 more
    Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS request failed on '/jkl/bnm/branches/myApp/'
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:642)
        ... 49 more
    Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: timed out waiting for server
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:394)
        ... 49 more
    Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:520)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545)
        at org.tmatesoft.svn.core.internal.util.SVNSocketConnection.run(SVNSocketConnection.java:57)
        ... 1 more
    

    如您所见,URL 已被截断,这就是 Jenkins 无法连接到 repo 的原因。

    请帮忙。

4

1 回答 1

0

确实SVN OPTIONS是阅读,但您的问题可能是其他问题。

检查 svn 服务器上的网络服务器日志 - 因为您使用的是 https,所以我确信 svn 被配置为可以在网络服务器(apache 或 nginx)上工作,我想那是 Apache。:)

您将在这些日志中找到更多信息。

然后检查 svn 上 jenkins 用户的权限 - 到 SVN 服务器 Jenkins 看起来像任何其他用户,如果没有读取权限,您将无法连接。

由于 JAVA 包以org.tmatesoft.svn.这开头意味着您在服务器上使用 svnKit 来连接到 SVN 服务器。检查 Jenkins 如何处理此连接接口 - 支持可能不完整。JavaHL 是另一种选择。

于 2013-06-05T09:55:16.887 回答