1

I am sorry to open up such a topic again, but I haven't found any solved occurences.

Problem: I am running latest SCM-Manager 2.20.0 in docker on a vServer (no smb shares etc). I got a multiple Gigabytes sized svn dump and created a subversion repository and imported it as described in the documentation. When I check out from windows commandline (version 1.14.1 (r1886195)) I get the following errors after a while:

svn: E175009: The XML response contains invalid XML

svn: E130003: Malformed XML: no element found at line 14073566

Things I've tried:

  • I created a subversion repository in SCM with a readme using the UI and the checkout worked.
  • I created a local svn repo with the dump and the checkout worked (locally over svn://).
  • I went ahead and ran svnadmin upgrade with that local repo, created a new dump and imported it to SCM, issue was still present.
  • since I am running nginx as a reverse proxy I tried without and usinh http instead of https, problem was still there
  • I read that someone tried to provide the repo using an additional svnserver to allow access over svn:// instead of https://, I believe that this will work, but that is not what I want.
  • I collected some server logs with svnkit log level "Debug" but at least to me it doesn't ring a bell. (find log here)

So any idea or help would be appreciated, I can run a server without scmmanager but that's currently not my preferred solution.

Regards,

Marco

Marco
  • 21
  • 2
  • I just finished a directory diff of a working checkout and a non working checkout, and it seems that everything is identical except .svn folder and tags folder. So maybe its one of the tags that makes the difference, but no idea why... – Marco Jun 17 '21 at 08:36
  • First, running a parallel `svnserve` indeed is no good idea, this would break SCM-Managers caching, for example. It may be interesting to see, whether this would work (tough I don't know which conclusions I would take from this). Is it possible for you to run an `svn checkout http://localhost/scm/repo/....` on the vserver directly to see, whether the problem lies inside SCM-Manager or is net related? – Rene Pfeuffer Jun 18 '21 at 06:41
  • After taking a look at the sources, it looks like the causing error is masked by an error thrown while printing the original error. I've created a [patched svnkit lib](https://drive.google.com/file/d/1NVRUjtivieghZNOCn0Ff2_YxKGH2T8eH/view?usp=sharing) with some printlns. Can you start your docker container with this library? You would have to add `-v $(pwd)/svnkit-dav-1.10.1-scm2.jar:/var/lib/scm/plugins/scm-svn-plugin/lib/svnkit-dav-1.10.1-scm2.jar` to the docker call. – Rene Pfeuffer Jun 18 '21 at 09:13
  • To answer your first question, I locally installed subversion and tried to checkout without the proxy over http and it failed as well. – Marco Jun 18 '21 at 11:49
  • Thanks a lot for your efforts, I will give it a try and let you know. – Marco Jun 18 '21 at 11:50
  • Rene, thanks for your help. Here is the new [log](https://drive.google.com/file/d/1n7_Lf8zqZNk21LBfYSAxNccsrBwc2BII/view?usp=sharing). The exception I see on client side is the same on server side there seems to be some additional output, but hard for me to tell what it means. In the meantime I can say that the first 5000 revisions of the dump work well when imported. I have tracked it down to 75 revisions and hopefully next week I can find at least one that causes the issue. – Marco Jun 18 '21 at 12:28
  • ok, this is an idle timeout from jetty. Can you try and add a `` to the `ServerConnector` block in `etc/scm/server-config.xml` (maybe copy it from the docker container and then mount it back in). The default timeout is 30 seconds, maybe this is not enough. – Rene Pfeuffer Jun 19 '21 at 17:30

1 Answers1

1

That was really it!!! Thank you so much Rene. Increasing the jetty.timeout solved the problem for me. Here's the server-config.xml for reference:

<?xml version="1.0" encoding="UTF-8"?>
<!--

    MIT License

    Copyright (c) 2020-present Cloudogu GmbH and Contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

-->
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="ScmServer" class="org.eclipse.jetty.server.Server">

  <!--
    This default configuration should match 90% of the use cases,
    if you have to change something ensure you know what you are doing.

    For further information on configuration scm-server have a look at:
    https://www.scm-manager.org/docs/2.20.x/en/administration/scm-server/
  -->

  <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
    <!-- increase header size for mercurial -->
    <Set name="requestHeaderSize">16384</Set>
    <Set name="responseHeaderSize">16384</Set>

    <Call name="addCustomizer">
      <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
    </Call>
  </New>

  <!--
  Connectors
  -->
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ServerConnector">
        <Arg name="server">
          <Ref refid="ScmServer" />
        </Arg>
        <Arg name="factories">
          <Array type="org.eclipse.jetty.server.ConnectionFactory">
            <Item>
              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
                <Arg name="config">
                  <Ref refid="httpConfig" />
                </Arg>
              </New>
            </Item>
          </Array>
        </Arg>
        <Set name="host">
          <SystemProperty name="jetty.host" default="0.0.0.0" />
        </Set>
        <Set name="port">
          <SystemProperty name="jetty.port" default="8080" />
        </Set>
        <Set name="idleTimeout">
          <SystemProperty name="jetty.timeout" default="300000" />
        </Set>
      </New>
    </Arg>
  </Call>

  <New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="contextPath">/scm</Set>
    <Set name="war">
      <SystemProperty name="basedir" default="."/>/var/webapp/scm-webapp.war
    </Set>
    <!-- disable directory listings -->
    <Call name="setInitParameter">
      <Arg>org.eclipse.jetty.servlet.Default.dirAllowed</Arg>
      <Arg>false</Arg>
    </Call>
    <Set name="tempDirectory">/var/cache/scm/work/webapp</Set>
  </New>

  <New id="docroot" class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="contextPath">/</Set>
    <Set name="baseResource">
      <New class="org.eclipse.jetty.util.resource.ResourceCollection">
        <Arg>
          <Array type="java.lang.String">
            <Item>
              <SystemProperty name="basedir" default="."/>/var/webapp/docroot</Item>
          </Array>
        </Arg>
      </New>
    </Set>
    <Set name="tempDirectory">/var/cache/scm/work/work/docroot</Set>
  </New>

  <Set name="handler">
    <New class="org.eclipse.jetty.server.handler.HandlerCollection">
      <Set name="handlers">
        <Array type="org.eclipse.jetty.server.Handler">
          <Item>
            <Ref id="scm-webapp" />
          </Item>
          <Item>
            <Ref id="docroot" />
          </Item>
        </Array>
      </Set>
    </New>
  </Set>

</Configure>
Marco
  • 21
  • 2