Project

General

Profile

Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>

Added by Sergey Kolodyazhnyy over 13 years ago

Hi, everyone

Today I have tried to setup Redmine to work with SVN server trough HTTPS protocol but it's not working. In production.log I have found this exception:

No close tag for /lists/list
Line:.
Position:.
Last 80 unconsumed characters:
Output was:
 <?xml version="1.0"?>
<lists>
<list
   path="https://mysvnrepository/svn/project1">

It look like invalid XML format in SVN output and Redmine can't parse it. Also I have found issue #3929 which discribe same problem and it's closed (but I didn't saw working solution).

Server configuration:
- VirtualSVN server (on the separate server, I have no access to it configuration)
- SVN client 1.6
- Redmine (1.2 stable, up-to-date from svn repository)
- Apache 2.2 + mod_passanger


Replies (26)

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Gilbert Flamino over 13 years ago

Is the SVN repo and Redmine instance on the same or separate servers?

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Overmind Eternal Will over 13 years ago

Hi.
I took me lots of time to understand (i'm not a coder) but I think it's a bug due to the recent introduction of "salt" passwords in Redmine 1.2
I suppose that the Redmine.pm perl script doesn't support it.
Basically every new installation of redmine can't use the SVN integration!
I will open e bug soon because it's a big issue.

p.s.
To verifiy you can chande the hashed_passord for your user with a pure sha-1 hash of the password and it will work.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

I don't think so... I got this error in redmine 1.1, so I have updated it to 1.2 because I thought that it fixed in newest version.
I think (i'm a PHP developer) it's related to Ruby XML parser, which very demanding to XML format (for example PHP xml parser works OK with \n in tags).

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

But, of course, "No close tag for /lists/list" may means that ">" symbol is not exists, or that tag <list> is not closed (by </list> tag), so may be it's related to some output buffering mistake...

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Overmind Eternal Will over 13 years ago

This error can be a symptoms of various problems (also related to files permissions). It's very generic (google for it) but I don't think is related to the parser.
Can be also related to the certificate for https svn repo (google for it).
I proposed a solution to verify my theory, have you tried if it fix for you?

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

Yep, I have tried to get certificate (by adding --trust-certificate option to svn auth string) and fix file permissions. Both of this solutions was discribed in issue #3929, but it's not help ( And now, I seeking for solution here.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

About your solution,
I can't understand exactly what I should todo. I found few entries in code, but my Ruby knowledge is not well

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Overmind Eternal Will over 13 years ago

Hi Sergey.
I resolved my issue. I was using and old version :( of Redmine.pm without the support of salt password as I said before.
If you upgraded in the right way (copy the new script in the usr/lib/perl5/apache2/ dir, and you restarting apache) you are not in my situation.

So, I was wrong, the current Redmine.pm for SVN supports salt password:
http://www.redmine.org/projects/redmine/repository/diff/trunk/extra/svn/Redmine.pm?rev=4936&rev_to=4309

If you checked file permissions and the cert stuff, I finished my suggestion for your problem.

If you login from command line it works?

svn ls https://mysvnrepository/svn/project1

Good luck!

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

First of all, thank you very much for answers

I'm using Redmine through mod_passanger, so it do not using Redmine.pm at all (it's Perl Module for Apache as I understand). But, anyway, I have checked my version of this file, it's with salt.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

svn ls https://mysvnrepository/svn/project1

Works correctly. So, I still, think that it's strict standards of REXML.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

Also, i have tried to get xml

redmine# svn ls https://mysvnrepository/svn/project1 --xml
<?xml version="1.0"?>
<lists>
<list
   path="https://mysvnrepository/svn/project1">
<entry
   kind="dir">
<name>branches</name>
<commit
   revision="1">
<author>VisualSVN Server</author>
<date>2011-06-27T07:34:50.003895Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>tags</name>
<commit
   revision="1">
<author>VisualSVN Server</author>
<date>2011-06-27T07:34:50.003895Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>trunk</name>
<commit
   revision="84">
<author>j.doe</author>
<date>2011-07-13T15:10:41.638185Z</date>
</commit>
</entry>
</list>
</lists>

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

Hi,
The SVN server located at the separate server (Windows by the way) and I have no access to it configuration. All that I have it's a URL, login and password :) and it should be enough.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

I have couple of projects in Redmine and most of them use SVN via file protocol (it's my SVN server) but one of them use external SVN via HTТPS protocol. And everything works except this one :(

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

Offtop: Why when i trying to post large message (with two paragraphs) I got message "Your submission was rejected because it appeared to be spam."?! It's coz I'm trying to post string with a two slashes or it's coz i'm post httр?

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Sergey Kolodyazhnyy over 13 years ago

I sloved my problem. It was certificate problems. I have added it to redmine user.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Mario Di Vece almost 12 years ago

Why not just change the line

str << " --no-auth-cache --non-interactive" 

to:
str << " --no-auth-cache --non-interactive --trust-server-cert" 

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Anonymous about 11 years ago

I had the same problem on windows with redmine 2.3 , subversion 1.8.3 (VisualSVN) and self signed certificate.

1. run from windows command line

svn list --xml "https://<url>"@HEAD --non-interactive --username "some" --password "some_pass" --no-auth-cache --non-interactive --trust-server-cert

Accept certificate permanently if you asked for.

2. Use some and some_pass when you connect from redmine

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Anonymous about 11 years ago

I forgot to mention that you have also to add --trust-server-cert in subversion_adapter.rb along as with
--no-auth-cache --non-interactive

Also restart web server after this change on subversion_adapter.rb

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Warlick Jones over 6 years ago

Obviously if your copy of redmine runs as a user other than www-data you should sudo using that user instead. Make sure the user you sudo to has the necessary permissions to create an /svn directory inside the redmine directory - otherwise you may not be given the option to (p)ermanently accept the certificate when you run the svn client.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Warlick Jones over 6 years ago

Obviously if your copy of redmine runs as a user other than www-data you should sudo using that user instead. Make sure the user you sudo to has the necessary permissions to create an /svn directory inside the redmine directory - otherwise you may not be given the option to (p)ermanently accept the certificate when you run the svn client.

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by iransamin.ir sabasa over 3 years ago

Solved! I had same problem for Redmine 3.1.1 and solved it by adding "--trust-server-cert" into the subversion_adapter.rb file:

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by iransamin.ir sabasa over 2 years ago

Today i found another remedy for the problem:
I removed the hidden ".subversion" directory at my user path i.e. "/home/user/.subversion"
Then clicked on "Repository" button of the project page in my redmine to re-read the repository data from svn. It worked without any problem!!!

RE: Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list> - Added by Aleksandar Pavic over 2 years ago

Eventually it worked for me for expired certificate once I did svn co in temp folder, as user under which Redmine runs...

(1-25/26)