Jenkins SVN "SSL peer shut down incorrectly" during checkout

10,032

If I understand the error message correctly this is not an issue at the SVN client side but at the server.

Are you in control of the server that hosts your SVN repository? In that case you should probably increase the http timeout (I'm assuming you do svn over https) of the server and see if that fixes your problem.

If you are using Apache you should look for TimeOut in your httpd.conf file.

UPDATE:

If the situation is really that the native svn client never has any problems I'd suggest using that one instead of the javasvn version. If I understand it correctly the default svn implementation in maven is using the command-line client, so remove the maven-scm-provider-svnjava dependency and the <svn>javasvn</svn> config and the default should be used. (I'm no maven wizard, you might have to make other changes, and of course you probably need svn somewhere where maven can find it)

Share:
10,032
cowls
Author by

cowls

Java Developer working at a financial startup in London.

Updated on July 02, 2022

Comments

  • cowls
    cowls almost 2 years

    I have an issue running maven release plugin through Jenkins using SVN as the SCM.

    When checking out large projects I get the following error, Ive searched high and low for a resolution but not come up with anything yet, it seems to be an issue with the Java SVN client that is using SVN Kit.

    svn: E175002: SSL peer shut down incorrectly
    
    12:37:17    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    
    12:37:17    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:777)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)
    
    12:37:17    ... 34 more
    
    12:37:17 Caused by: svn: E175002: REPORT request failed on '/svn/mx/!svn/vcc/default'
    
    12:37:17    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:775)
    
    12:37:17    ... 35 more
    
    12:37:17 Caused by: svn: E175002: SSL peer shut down incorrectly
    
    12:37:17    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:109)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:526)
    
    12:37:17    ... 35 more
    
    12:37:17 Caused by: javax.net.ssl.SSLException: SSL peer shut down incorrectly
    
    12:37:17    at com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:408)
    
    12:37:17    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
    
    12:37:17    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:830)
    
    12:37:17    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:787)
    
    12:37:17    at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
    
    12:37:17    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    
    12:37:17    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    
    12:37:17    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    
    12:37:17    at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.read(ChunkedInputStream.java:75)
    
    12:37:17    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221)
    
    12:37:17    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
    
    12:37:17    at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:90)
    
    12:37:17    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    
    12:37:17    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    
    12:37:17    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    
    12:37:17    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.XMLReader.read(XMLReader.java:39)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(XMLEntityScanner.java:487)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2688)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    
    12:37:17    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    
    12:37:17    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    
    12:37:17    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    
    12:37:17    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    
    12:37:17    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    
    12:37:17    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:911)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:876)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
    
    12:37:17    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:480)
    

    Jenkins allows me to retry the checkout a number of times for standard jobs so its not a problem as I just set the number of retries to 5 and it gets there in the end.

    However, when using the Maven Release Plugin to perform a release, at the stage where the tag is checked out, the SVN checkout fails and the whole release fails.

    My Maven release plugin config looks like this:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
            <providerImplementations>
                <svn>javasvn</svn>
            </providerImplementations>
        </configuration>
        <dependencies>
        <dependency>
            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
            <artifactId>maven-scm-provider-svnjava</artifactId>
            <version>2.0.6</version>
            <scope>compile</scope>
        </dependency>
        </dependencies>
    </plugin>
    

    That SVN version has been selected to match the version used by Jenkins.

    So my question is either:

    • How to fix that error, can I set a request timeout anywhere as it seems that it is just a case of the request timing out too soon. I couldn't find anything in the docs for this.
    • Can I tell Maven release plugin to retry the checkout a number of times when checking out the tag?