Content
No revisions visible from external Subversion Repository and Commenting Sourcecode is not possible
Added by Marco Blum about 8 years ago
Hi together,
I run a Ubuntu 16 based Openproject installation.
Our repository is a solitaire subversion at the same machine.
I cant see any revisions in the project archive nor can I add a comment to an source file. (ends in 404)
the log says:
ERROR — : SCM command failed: Non-zero exit code (pid 2102 exit 1) for `svn`
ERROR — : Failed to fetch changesets from repository: SCM command failed: Non-zero exit code (pid 2102 exit 1) for `svn`
I can’t find any real matching entry to this behavior in the forum.
Any suggests?
Thanks a lot
Marco
Ok Oliver. I did this, But there are tons of entries in the log …. I tried to filter out a few, which should be involved
D, [2016-10-14T10:28:16.182502 #15192] DEBUG — : Shelling out: `svn info —xml http://ukl-ib-dev/vc/esb/IBLogging/ —username xxxx —password xxxx —no-auth-cache —non-interactive`
D, [2016-10-14T10:28:16.206289 #15192] DEBUG — : Cache read: /openproject/settings/1476433970/autofetch_changesets
D, [2016-10-14T10:28:16.206604 #15192] DEBUG — : Cache fetch_hit: /openproject/settings/1476433970/autofetch_changesets
D, [2016-10-14T10:28:16.226304 #15192] DEBUG — : Changeset Load (0.3ms) SELECT `changesets`.* FROM `changesets` WHERE `changesets`.`repository_id` = 17 ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1
D, [2016-10-14T10:28:16.226772 #15192] DEBUG — : Fetching changesets for repository http://ukl-ib-dev/vc/esb/IBLogging
E, [2016-10-14T10:28:16.241167 #15192] ERROR — : SCM command failed: Non-zero exit code (pid 15201 exit 1) for `svn`
D, [2016-10-14T10:28:16.241254 #15192] DEBUG — : Error output is svn: E195012: Unable to find repository location for ‘http://ukl-ib-dev/vc/esb/IBLogging’ in revision 200
Another point is:
To type in a revision number into the “Go to revision #” works.
Replies (18)
Hi Marco,
can you raise the logging to
:debug
by changing the lineconfig.log_level = :debug
in/opt/openproject/config/environments/production.rb
and restart OpenProject withservice openproject restart
.Then, please try again and report the debug output after the above message.
Best,
Oliver
I don’t have any idea what happens here.
An interessing point ist maybe that openproject always tries to look for a revision 200
Another point is that in the revision column of the projectarchibve view shown no number
Very confusing…
Every hint is welcome
Hi !
Is there a solution in the meantime ?
We have the exact problem with our OpenProject based on Docker. We even have the same mystical revision 200 which cause it.
Regards
Hi everyone,
the SVN adapter uses capturing STDOUT to process the output of the repository. There might be some limits imposed in your docker environment, but I couldn’t find anything about it.
using the rails console (
RAILS_ENV bundle exec rails c
), can you execute the following commands and post what their output isBest,
Oliver
Hi Oliver,
after reading this, i remember that we already got the same error at #23816 and did some research on it.
But we are using a non docker installation. So this seems a general problem, with a commit count > 200.
Maybe we can now track this bug down.
Hi guys,
as far we analyzed the problem, we can say that there are circumstances where OpenProject begins to ask svn in revisions intervalls like
1 to 200
201 to 400
and so on. And when you do it on a path which was created after revision 200, the svn command fails.
Here is the requestes output. I anonymized some parts because of “Datenschutz” ;) One command seemed not to work:
Regards
Hi Johann,
its
puts
, notput
. Typo on my side, sorry.Best,
Oliver
Hi !
No problem, here is the missing output
Regards
Johann
Okay, so even the adapter returns only a fraction of the actual changesets it should return.
There are two different functions at play here. The SVN adapter simply shells out to SVN to read data from it through XML or plain stdout, and returns that.
OpenProject or rather redmine code caches revisions in the database, and only requests newer revisions it hasn’t yet seen. Since in subversion revision numbers are simply increasing integers, you’ll likely see an adapter call to anything > 200, where 200 is the last revision that was parsed the last time.
With our testing repository, I can’t reproduce the error with well over 200 revisions. There must be some part missing in my local setup that plays a role here.
Best,
Oliver
Hi !
Maybe its a specific constellation in SVN which caused this error.
We know you have problems to reproduce it. Yesterday Mr Wagner was here and we provided him additional information and log. Maybe this will help.
Regards
Hi Johann,
yes, we will get to the bottom of this. If nothing else helps, would there be an option to access your instance to debug this issue directly on your repositories?
I will be on vacation the next weeks, but could schedule a remote session afterwards to investigate this further.
Best,
Oliver
Hi !
I think a remote access wouldn’t be possible but I will foreward your request here internally.
Hava a nice vacation anyway :D
Regards
Hi !
Is there any progress in fixing the bug in the meantime ?
If not we will try to create a description to reproduce the bug.
But access to our data will not be possible.
Regards
Here’s a bugfix for a related issue that resulted in failing to access files and folders deleted in the past.
Turns out SVN has peg revisions to look up the path in the log output you’re looking for. By default this is HEAD. If the file/folder does not exist in this revision, an error is returned. I’m now adding the peg revision for the entries at all times and this seems to work fine.
Please check out the patch if it fixes your issue as well.
https://github.com/opf/openproject/pull/6034
Best,
Oliver
Hi !
Thanks for the patch.
I put the modified
subversion.rb
into our OP test system. But even after restart the behaviour didn’t changed.I will check it more itensely on Monday. Otherwiese I will try to provide a scenario to create a SVN repo which causes the problems.
Regards and have a nice weekend.
Hi !
I created a shell script which fills an empty SVN repo in a way that the bug in OP can be reproduced. Do following steps:
op_test.sh.gz
on a Linux system with installed SVN client with commandgunzip op_test.sh.gz
op_test.sh
and set the SVN URL at top to the empty SVN repogood_trunk
and check the archive in the project => All resivions are visiblebad_trunk
and check the project archive again => No revisionsI hope this helps you to fix the problem or maybe your patch already did it ?
Regards
@Johann Letzel @Oliver Günther
What SVN Server do you use? We use CollabNet Subversion Repository, maybe this could be a hint.
@slice masters Also wondered the question.