Issue #362 open

SVN - E140000: Can't read length line

Anonymous created an issue

Hi

I have a problem with SVN repositories. I can do a checkout without problem but for some reason I cannot commit changes. I can reproduce it doing the following:

1.  Create new SVN repository named Testing
2.  Check it out on a client
3.  Add a single file
4.  Check in

The repository is checked out fine but step 4 just hangs on the client. I have enabled all logging and attached the log file with some small changes, removed hostname etc.

Hope you can help. Best regards Mads

Comments (37)

  1. Mads Lützhøft

    Hi Sebastian

    Yes, I assume you mean on the client. I use TortoiseSVN 1.7.11.23600 which come with SVN 1.7.8.

    Print from svnadmin is as following:

    C:\Program Files\TortoiseSVN\bin>svnadmin.exe --version svnadmin, version 1.7.8 (r1419691) compiled Dec 12 2012, 21:11:09

    Copyright (C) 2012 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE file for more information. Subversion is open source software, see http://subversion.apache.org/

    The following repository back-end (FS) modules are available:

    • fs_fs : Module for working with a plain file (FSFS) repository.

    Best regards Mads

  2. Sebastian Sdorra repo owner

    Could you please post the output of "svn --version"? I'm not sure but this could be related to issue #222. Could you please append the following line to the servers configuration file on your client.

    http-library = neon
    

    The servers configuration file should be located at %USERPROFILE%\AppData\Roaming\Subversion.

  3. Mads Lützhøft

    Hi Sebastian

    Didn't change anything. Here is SVN output from svn --version:

    svn, version 1.7.8 (r1419691) compiled Dec 24 2012, 17:12:24

    Copyright (C) 2012 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE file for more information. Subversion is open source software, see http://subversion.apache.org/

    The following repository access (RA) modules are available:

    • ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
    • handles 'http' scheme
    • handles 'https' scheme
    • ra_svn : Module for accessing a repository using the svn network protocol.
    • handles 'svn' scheme
    • ra_local : Module for accessing a repository on local disk.
    • handles 'file' scheme
    • ra_serf : Module for accessing a repository via WebDAV protocol using serf.
    • handles 'http' scheme
    • handles 'https' scheme
  4. Sebastian Sdorra repo owner

    I tried to reproduce this issue, but without success. I've done the following steps on windows 7:

    • installed TortoiseSVN 1.7.11
    • installed scm-manager 1.28 standalone
    • created a new subversion repository
    • checkout with TortoiseSVN
    • added a single file
    • checkin with TortoiseSVN

    TortoiseSVN commit

    Do you use the standalone version of scm-manager?

  5. Mads Lützhøft

    Hi Sebastian

    I did some testing based on your question. I have my standalone SCM-Manager runing on a windows server 2012. I tried downloading a clean copy, unpacked it and started it up without any configuration. Still the same error.

    Then i tried on my Windows 7 laptop, and it works. I should mention the log file is still full of the same debug message:

    21:27:34.950 [qtp1276873-20] DEBUG svnkit - uri type - activity, uri kind - act
    21:27:34.950 [qtp1276873-20] DEBUG svnkit - svn: E140000: Can't read length line from file C:\Users\mal\.scm\repositories\svn\Test\db\format
    21:27:34.950 [qtp1276873-20] DEBUG svnkit - resource type is activity
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - uri: / label: null context: /scm/svn/Test 21:27:34.960 [qtp1276873-20] DEBUG svnkit -  DAVResourceURI.getRequestURI(): /scm/svn/Test DAVResourceURI.getURI(): / DAVResourceURI.getPath(): / DAVResourceURI.getContext(): /scm/svn/Test
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - uri type - regular, uri kind - 
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - svn: E140000: Can't read length line from file C:\Users\mal\.scm\repositories\svn\Test\db\format
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - resource type is regular
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - svn: E140000: Can't read length line from file C:\Users\mal\.scm\repositories\svn\Test\db\format
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - resource path is /
    21:27:34.960 [qtp1276873-20] DEBUG svnkit - resource kind is dir
    

    But at least it works, which is the important thing. But i need it to work on my server, any ideas?

    Best regards Mads

  6. Mads Lützhøft

    Hi Sebastian

    No, there are no differences as far as i know.

    OS: Windows Server 2012 Essentiels. Java: Tested with both 32 and 64 bit of newest version. File System: NTFS. Repositories: Stored on local drive.

    If I can do anything let me know, it is also possible to add you to scm-manager so you can commit to the repository.

  7. Sebastian Sdorra repo owner

    Hi, I've installed now a windows server 2012, with a oracle jdk 7u17 and scm-manager 1.28. But i could not reproduce your error.

    svn commit windows server 2012

    Yes, i think it could help if i had a account for your scm-manager instance. Please send me the details with a bitbucket notification.

  8. Marc Janssen

    My log is full of these messages, too. Every time I do something on a repository there are a lot of "svn: E140000: Can't read length line from file /var/scm/repositories/svn/Eigene_Daten/Marc/db/format".

    I use Ubuntu Server 14.04 x64 and tomcat7 with scm-manager.war (version 1.38). No SSL in use and repository is on local disc. The whole system is a virtual machine (kvm with virtio).

    Are there any news about this error? What did the message mean? There are only two lines in the db/format file:

    6
    layout sharded 1000
    

    Could this be related to "packing revision properties" or "caching revision properties"?

    Best regards Marc

  9. Pim Dorrestijn

    I have a similar problem (also see issue 715), where I can commit a regular text file, I can not commit a file having .xml extension (PROPFIND method response has no xml elements and crashes). In both cases I see the exceptions in the logging stating E140000 and that about the only clue being given by the logging.

    SCM 1.45 / Red Hat Enterprise Linux Server release 6.6 (Santiago)

  10. Pim Dorrestijn

    The error when commiting an empty file with xml extension:

    Error: Commit failed (details follow):
    Error: The PROPFIND request returned invalid XML in the response: XML parse error at
    Error: line 1: no element found
    Error: (/scm/svn/test-repository/!svn/wrk/cfd13bb4-7a1f-9246-80d4-e359dd3c2adb/project/New%20Text%20Document.xml)
    Error: The PROPFIND request returned invalid XML in the response: XML parse error at
    Error: line 1: no element found
    Error: (https://lrv142lw.europe.intranet/scm/svn/test-repository/project/New%20Text%20Document.xml)

    A file with .txt or .zip goes fine. Please help, getting really cranky over this after spending days already.

  11. Pim Dorrestijn

    Hi Sebastian Sdorra, I managed to come a little bit further by setting up subversion 1.7.4 with httpd instead of using SCM. I was under the impression SCM Manager (with SVNKit) would be able to support subversion 1.7, but I guess this is not the case. During import our subversion 1.7 repository dump was converted back to version 1.6 and as a result the error sent previously occurs when you want to add a new xml file. We even played around with the compatibility mode to see if we could get to a 1.7 subversion repository setup, but this seemed to have no effect.

  12. Sebastian Sdorra repo owner

    Pim Dorrestijn SCM-Manager support subversion 1.7 and 1.8. In the past there was some trouble with subversion 1.6 clients. So please, which subversion version do you use on the client side? Could you describe how do you figured out that your dump was converted to 1.6?

  13. Pim Dorrestijn

    Hi Sebastian Sdorra, I've had 2 setups on the server: 1) subversion+client 1.6.0.11 combined with SCM 1.40 on a Red Hat Ent 6 2) subversion+client 1.7.4 combined with SCM 1.45 on a Red Hat Ent 6

    The dump was an export created with subversion+client 1.7.9 on a SuSe Ent. Locally I use TortoiseSVN on Win7.

    Several tests have been performed: (a) creating an initial repository with svnadmin on the target server (thus 1 or 2), let svnadmin load the dump in the created repository and at the end let SCM import that created repository. Afterwards start changing/adding folders and files to the repository using TortoiseSVN. (b) creating an initial repository with svnadmin on the target server (thus 1 or 2), let svnadmin load the dump in the created repository and at the end let SCM import that created repository. Afterwards start changing/adding folders and files to the repository using svn (as provided by the target server). (c) creating an initial repository with svnadmin on the target server (thus 1 or 2), and let SCM import that created repository. Afterwards start adding folders and files to the repository using TortoiseSVN. (d) create a new empty repository with SCM. Afterwards start adding folders and files to the repository using svn (as provided by the target server). (e) create a new empty repository with svnadmin, expose it via HTTPD instead of SCM. Afterwards start adding folders and files to the repository using TortoiseSVN. (f) as (d) and (e) and stop SCM, replace the repository from (d) with a symbolic link towards (e) (g) as (d) and (e) and stop SCM, replace the repository from (d) with the contents of the repository from (e)

    The error listed earlier occurs when (a) was performed on (1) (b) was performed on (1) (c) was performed on (1),(2) (d) was performed on (1),(2) (g) was performed on (2)

    No errors occured when (e) on (2)

    A special case was (f) where I suspect SCM can not handle (linux) symbolic links.

    As you can see I spend a lot of time trying to get a working setup :( At this point I blame SCM for either not being able to handle 1.7.4/9 repositories or store it in 1.7+ format (a must!). So I stopped using SCM as it took me 40x more effort to figure out what was wrong, then it was for me to setup HTTPD manually.

  14. Pim Dorrestijn

    Sebastian Sdorra also note that I repeated (c) and (d) on (1) with alternate subversion compatibility setting in SCM. Yet there was no difference in the outcome.

    The scm manager logging did repeatedly log Exceptions for (a) till (d) on (1) stating it could not read length of repository format file. Which can very well be the root cause.

    SCM and HTTPD both run as the same user on our linux server which is also owner of the file system structure for the applications and the subversion repositories.

  15. Sebastian Sdorra repo owner

    Pim Dorrestijn i'm sorry but i can't reproduce your issues. I've tested with subversion 1.7 and 1.8 and SCM-Manager 1.45. I've tested with symbolic links on mac and linux without problems. You have to set "With 1.7 Compatible", before you create or import repositories in order to get 1.7 subversion repositories.

  16. Sebastian Sdorra repo owner

    Worked without problems:

    $ svn --version | head -1
    svn, version 1.8.8 (r1568071)
    
    $ wget -q http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.45/scm-cli-client-1.45-jar-with-dependencies.jar -O scm-cli.jar
    
    $ alias scm-cli="java -jar scm-cli.jar"
    
    $ scm-cli version
    scm-cli-client version: 1.45
    
    $ scm-cli --user scmadmin --password scmadmin --server http://localhost:8080/scm store-config
    store config
    
    $ scm-cli create-repository --name issues/362 --type svn --template '${repository.url}'
    http://localhost:8080/scm/svn/issues/362
    
    $ svn co --username scmadmin --password scmadmin http://localhost:8080/scm/svn/issues/362 issue-362
    Checked out revision 0.
    
    $ cd issue-362
    
    $ wget -q https://bitbucket.org/sdorra/scm-manager/raw/8b3a859dfdb20129528b54bffdc10c7a219857a0/pom.xml
    
    $ svn add pom.xml
    A         pom.xml
    
    $ svn commit --username scmadmin --password scmadmin -m 'added pom.xml'
    Adding         pom.xml
    Transmitting file data .
    Committed revision 1.
    
  17. Pim Dorrestijn

    Sebastian Sdorra, nice.

    Unfortunately, the latest subversion for Red Hat enterprise 6 is 1.7.4. I will again try to create a new repository from the web interface using the suggested 1.7 compatibility mode, to verify whether it is working.

  18. Pim Dorrestijn

    Sebastian Sdorra unfortunately with 1.7 compatibility mode (even restarted scm before creating new repo) I encountered the same issue again. This time I also tried the embedded Eclipse subclipse plugin 1.8.22 (using JavaHL 1.7.10), but no different behavior from TortoiseSVN.

  19. Sebastian Sdorra repo owner

    Tested with the following Dockerfile without problems:

    $ alias svn='docker run -ti --rm -v $(pwd):/usr/src/app sdorra/subversion-1.7 svn $*'
    
    $ svn --version | head -1
    svn, version 1.7.20 (r1667490)
    
    $ wget -q http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.45/scm-cli-client-1.45-jar-with-dependencies.jar -O scm-cli.jar
    
    $ alias scm-cli="java -jar scm-cli.jar"
    
    $ scm-cli version
    scm-cli-client version: 1.45
    
    $ scm-cli --user scmadmin --password scmadmin --server http://localhost:8080/scm store-config
    store config
    
    $ scm-cli create-repository --name issues/362 --type svn --template '${repository.url}'
    http://localhost:8080/scm/svn/issues/362
    
    $ svn --non-interactive co --username scmadmin --password scmadmin http://192.168.115.64:8080/scm/svn/issues/362 issue-362
    Checked out revision 0.
    
    $ cd issue-362
    
    $ wget -q https://bitbucket.org/sdorra/scm-manager/raw/8b3a859dfdb20129528b54bffdc10c7a219857a0/pom.xml
    
    $ svn add pom.xml
    A         pom.xml
    
    $ svn --non-interactive commit --username scmadmin --password scmadmin -m 'added pom.xml'
    Adding         pom.xml
    Transmitting file data .
    Committed revision 1.
    
  20. Pim Dorrestijn

    Hi Sebastian Sdorra, I've tried different xml's (even empty one's). The only differences I see from your tests are: - I use the SCM web interface to create a repository - I use a subversion which is a little bit older (1.7.4) Unfortunately, at this point I must conclude that getting SCM Manager working has taken me way too much time (more then a weeks work) and has become a very labor intense solution over just configuring HTTPD (approx 1 hours of work) in a smart way (keeping administration tasks simple and quick).

    My advice: Let SCM Manager log more information such that troubleshooting doesn't have to become an frustrating trail-error scenario consuming an awful lot of time.

  21. Pim Dorrestijn

    Sebastian Sdorra, btw this was the message returned by SCM upon commit of a new xml file:

    Adding  C:\rad\test17\test.xml
    Error     Commit failed (Details follow):
    Error     The PROPFIND request returned invalid XML in the response: XML parse error at 
    Error     line 1: no element found
    Error     (/scm/svn/test17/!svn/wrk/...(some base64 encoded stuff)..../test.xml
    Error     The PROPFIND request returned invalid XML in the response: XML parse error at 
    Error     line 1: no element found
    Error     (https://...(my host).../scn/svn/test17/test.xml)
    

    This only happens with new xml files, regular text and binary new files go well, allthough the SVN E140000 is logged in all cases.

  22. Pim Dorrestijn

    Sebastian Sdorra svn --version

    svn, version 1.7.4 (r1295709)
       compiled Apr  5 2012, 16:46:24
    
    Copyright (C) 2012 The Apache Software Foundation.
    This software consists of contributions made by many people; see the NOTICE
    file for more information.
    Subversion is open source software, see http://subversion.apache.org/
    
    The following repository access (RA) modules are available:
    
    * ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
      - handles 'http' scheme
      - handles 'https' scheme
    * ra_svn : Module for accessing a repository using the svn network protocol.
      - with Cyrus SASL authentication
      - handles 'svn' scheme
    * ra_local : Module for accessing a repository on local disk.
      - handles 'file' scheme
    
  23. Sebastian Sdorra repo owner

    Pim Dorrestijn i've tested again with svn 1.7 and forced ra_neon for the scm-manager connection, because it looks like your svn client is compiled without support for ra_serf. But this test works also. Perhaps the problem is a combination of reverse proxy + ra_neon. Could you try to bypass the reverse proxy and commit directly to scm-manager?

  24. Pim Dorrestijn

    Sebastian Sdorra I'm not sure whether I can do that easily without messing up or being blocked by security on that server. I have tried connecting directly on port 8580 without SSL, no success. Also, as much as I appreciate the support you are providing, I on the other hand have already lost more than a weeks work too a not working SCM and running behind on my work big time. So I'm already in trouble as it is and forced to work with my current HTTPD+subversion setup and not using SCM.

  25. Log in to comment