Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication error with SVN in Jenkins

Tags:

svn

jenkins

I started a project where I have to use an external svn (I'm under a proxy). When I put the url in the configuration project, Jenkins can't access to the repository, so I filled credential (repository url, username and password) but here is the error :

FAILED: svn: E175002: OPTIONS /.../trunk/www failed

org.tmatesoft.svn.core.SVNException: svn: E175002: OPTIONS /.../trunk/www failed
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:304)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:289)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:277)
        at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:696)
        at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:619)
        at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:103)
        at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1018)
        at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.testConnection(DAVRepository.java:99)
        at hudson.scm.SubversionSCM$DescriptorImpl.postCredential(SubversionSCM.java:1968)
        at hudson.scm.SubversionSCM$DescriptorImpl.doPostCredential(SubversionSCM.java:1913)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:162)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:63)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138)
        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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
        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: svn: E175002: OPTIONS /.../trunk/www failed
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:154)
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:97)
        ... 80 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: E175002: OPTIONS request failed on '/.../trunk/www'
svn: E175002: connection refused by the 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:681)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
        ... 79 more
Caused by: svn: E175002: OPTIONS request failed on '/.../trunk/www'
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:679)
        ... 80 more
Caused by: svn: E175002: connection refused by the server
        at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:424)
        ... 80 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 com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
        at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:112)
        at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:85)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:195)
        at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:360)
        ... 80 more

In C:\Windows\System32\config\systemprofile\AppData\Roaming\Subversion\server, the proxy is configured and in Jenkins, I can install/update plugins.

The svn url is in https and I can access it with credential in a browser.

By default, the svn version used in Jenkins is 1.4, even with the 1.7, impossible to acces to this svn server.

The server is a Windows 7 64-bits and this is the last version of Jenkins.

Where is the problem ?

Thank you

like image 683
skurty Avatar asked Sep 21 '12 09:09

skurty


People also ask

How do I add SVN credentials to Jenkins?

Next to the Repository URL text box click the question mark. In that box will be the following text: "click this link and specify different credential". Click on that link to open the Subversion Authentication page. On that page enter the root of the repository URL, enter the login and password to use and click OK.

Can we integrate SVN with Jenkins?

Now create a Jenkins build job. Select New Item, give the build project a name such as svn-tomcat-demo, select Maven project, and click OK. Under source code management, select Subversion and enter your SVN repository URL and credential. Please download the sample code and check the code into your SVN server.

What is SVN authentication?

Windows Authentication is a key feature of VisualSVN Server. This feature is designed for Active Directory domain environments and allows users to access VisualSVN Server with their Windows credentials.

Can Jenkins pull code from SVN?

Essentially, what you can do is setup a svn commit hook that sends a signal to Jenkins to kick off a build. Jenkins will then (given the right build setup) pull the freshly-committed code and run the build.


2 Answers

Really late in the game here, but I just had the same problem. If you run SVN manually on a Jenkins machine, it will create an svn authentication file for your svn server (authentication caching). The existence of that file breaks Jenkins svn.

On my server (windows), the file is located in:

%APPDATA%\Subversion\auth\svn.simple

I believe on linux, it would be in ~/.subversion

I renamed the directory svn.simple to svn.simple1 and things instantly started working (and broke again when I changed it back).

To prevent this when running the svn bin on the Jenkins server, you can

  • update your %APPDATA%\Subversion\config file by uncommenting "store-passwords = no"
  • or use this flag: --no-auth-cache
like image 174
Seth Avatar answered Sep 18 '22 12:09

Seth


Delete your ${user.home}/.subversion.

like image 22
user2408678 Avatar answered Sep 19 '22 12:09

user2408678