Help with svn repository

Added by Eric klopfer over 9 years ago

I'm relatively new to Rails, but Redmine was interesting enough that I wanted to get it up and running. I was having some problems with the repository under an old version and saw that some things had been fixed in v.7. I've now got the latest SVN version (0.7.devel.1382) running under Centos 5 with Mysql and Rails 2.0.2. I'm running under lighttpd with fastcgi. The checks in the admin console are there (except for the optional rmagick). I'm connecting to a remote svn server via http. It works partially, but there are a number of problems that I'm having.

1) The autofetch commits doesn't work. I have to run this command to actually get anything to appear in the repository
rake RAILS_ENV=production redmine:fetch_changesets
(note if I don't include the RAILS_ENV variable I get an error indicating that it has defaulted to a different version)

Once I run the command in 1, I get partial access to the repository, but
2) The revisions appear, but there is no browse function as I see on the remdmine demo
3) I can click on the revision number and it will tell me the files that have been changed, and the comments, but if I click "view differences" I get the error message
The entry or revision was not found in the repository.

The only thing error that I get is a "500 Internal Server Error" associated with 3.

Does anyone have suggestions as to what I might have misconfigured?

Thanks

Replies (7)

RE: Help with svn repository - Added by Carl Nygard over 9 years ago

It seems that you have a login issue for the user you are running redmine as. You may need to become that user and run a svn command just to get the login to register. Once you've done it once it shouldn't bother you (much) anymore.

RE: Help with svn repository - Added by Eric klopfer over 9 years ago

Thanks for the suggestion. I enabled login for that user (the user had nologin before), and then logged in as that user. I used an svn command and it created a .subversion directory for that user in its home directory. I even did an https which it seemed to accept the certificate for (I can now use that repository and the rake fetch_changesets works on the https url which it didn't before).

However the redmine behavior is the same as before (even after restarting the app) for all three of the above.

RE: RE: Help with svn repository - Added by Carl Nygard over 9 years ago

do the logs show anything interesting?

RE: Help with svn repository - Added by Eric klopfer over 9 years ago

I couldn't find anything interesting there. Here is the error in the redmine log
Processing RepositoriesController#show (for XX.XX.XX.XX at 2008-04-30 17:14:39) [GET]
Session ID: a98e6c428a910c6f9edd70477854990c
Parameters: {"action"=>"show", "id"=>"sltng", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 5.63794 (0 reqs/sec) | Rendering: 0.14400 (2%) | DB: 0.00000 (0%) | 500 Internal Server Error [http://redmine.xx.com/repositories/show/sltng]

And there are some warnings in the lighttpd logs, but no errors per se:
2008-04-30 17:14:44: (mod_fastcgi.c.2592) FastCGI-stderr: /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:645: warning: instance variable @template not initialized
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:426: warning: instance variable @view_paths not initialized
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:426: warning: instance variable @view_paths not initialized

Are there any other logs that I should be looking at?

RE: Help with svn repository - Added by Eric klopfer over 9 years ago

Just for kicks I did a clean install to make sure the database wasn't damaged. I did a fresh checkout from the svn trunk, recreated the database and initialized everything. Still the same result unfortunately.

For what its worth, I turned on debugging output and this is the more detailed output I get in the redmine log (I scrubbed username/pass/url but they all seem right)
Processing RepositoriesController#show (for 71.162.124.18 at 2008-04-30 21:49:02) [GET]
Session ID: fee2f4325e2e9c565c5df48b0e485437
Parameters: {"action"=>"show", "id"=>"sltng", "controller"=>"repositories"}
[[4;36;1mSQL (0.000921)[[0m [[0;1mSELECT max(updated_on) AS max_updated_on FROM `settings` ^[[0m
^[[4;35;1mUser Load (0.000892)
[[0m [[0mSELECT * FROM `users` WHERE (status = 1) AND (`users`.`id` = 1) ^[[0m
^[[4;36;1mProject Load (0.000800)
[[0m [[0;1mSELECT * FROM `projects` WHERE (`projects`.`identifier` = 'sltng') LIMIT 1[[0m
[[4;35;1mRepository Load (0.001104)[[0m [[0mSELECT * FROM `repositories` WHERE (repositories.project_id = 1) LIMIT 1[[0m
[[4;36;1mEnabledModule Load (0.039835)[[0m [[0;1mSELECT * FROM `enabled_modules` WHERE (enabled_modules.project_id = 1) ^[[0m
^[[4;35;1mEnabledModule Columns (0.002059)
[[0m [[0mSHOW FIELDS FROM `enabled_modules`[[0m
[[4;36;1mSetting Load (0.000811)[[0m [[0;1mSELECT * FROM `settings` WHERE (`settings`.`name` = 'autofetch_changesets') LIMIT 1[[0m
[[4;35;1mRepository::Subversion Columns (0.001925)[[0m [[0mSHOW FIELDS FROM `repositories`[[0m
Shelling out: svn info --xml 'https://correcturl/' --username 'correctuser' --password 'correctpass'
[[4;36;1mSQL (0.000099)[[0m [[0;1mBEGIN[[0m
[[4;35;1mRepository::Subversion Update (0.460091)[[0m [[0mUPDATE `repositories` SET `login` = 'correctuser', `type` = 'Subversion', `root_url` = NULL, `password` = 'correctpass', `project_id` = 1, `url` = 'https://correcturl'WHERE `id` = 1[[0m
[[4;36;1mSQL (0.001034)[[0m [[0;1mCOMMIT[[0m
Shelling out: svn info --xml 'https://url/' --username 'correctusername' --password 'correctpass'
[[4;35;1mSQL (0.000604)[[0m [[0mBEGIN[[0m
[[4;36;1mRepository::Subversion Update (0.000234)[[0m [[0;1mUPDATE `repositories` SET `login` = 'correctuser', `type` = 'Subversion', `root_url` = NULL, `password` = 'correcturl', `project_id` = 1, `url` = 'https://url' WHERE `id` = 1[[0m
[[4;35;1mSQL (0.000066)[[0m [[0mCOMMIT[[0m
Shelling out: svn list --xml 'https://url/'@HEAD --username 'username' --password 'password'
[[4;36;1mChangeset Load (0.000826)[[0m [[0;1mSELECT * FROM `changesets` WHERE (changesets.repository_id = 1) ORDER BY committed_on DESC, changesets.committed_on DESC, changesets.id DESC LIMIT 10[[0m
Rendering template within layouts/base
[[4;35;1mSQL (0.000914)[[0m [[0mSELECT count(DISTINCT `members`.id) AS count_all FROM `members` LEFT OUTER JOIN `projects` ON `projects`.id = `members`.project_id LEFT OUTER JOIN `roles` ON `roles`.id = `members`.role_id WHERE (members.user_id = 1 AND (projects.status=1)) ^[[0m
^[[4;36;1mVersion Columns (0.001998)
[[0m [[0;1mSHOW FIELDS FROM `versions`[[0m
[[4;35;1mSQL (0.000268)[[0m [[0mSELECT count() AS count_all FROM `versions` WHERE (versions.project_id = 1) ^[[0m
^[[4;36;1mWiki Load (0.000794)
[[0m [[0;1mSELECT * FROM `wikis` WHERE (wikis.project_id = 1) LIMIT 1[[0m
[[4;35;1mBoard Columns (0.001997)[[0m [[0mSHOW FIELDS FROM `boards`[[0m
[[4;36;1mSQL (0.000781)[[0m ^[[0;1mSELECT count(
) AS count_all FROM `boards` WHERE (boards.project_id = 1) ^[[0m
Completed in 4.82982 (0 reqs/sec) | Rendering: 0.26800 (5%) | DB: 0.51805 (10%) | 500 Internal Server Error [http://redmine.xx.com/repositories/show/sltng]

I also ran the command as the user running redmine
svn list --xml 'https://url/'@HEAD --username 'correctuser' --password 'correctpass'

and got this output


<lists>
<list
path="https://url">
<entry
kind="dir">
<name>branches</name>
<commit
revision="4806">
<author>auth1</author>
<date>2008-02-13T22:48:40.493069Z</date>
</commit>
</entry>
<entry
kind="dir">
<name>tags</name>
<commit
revision="3303">
<date>2006-08-07T19:45:57.000000Z</date>
</commit>
</entry>
<entry
kind="dir">
<name>trunk</name>
<commit
revision="4849">
<author>auth2</author>
<date>2008-04-30T15:21:32.471083Z</date>
</commit>
</entry>
</list>
</lists>

RE: Help with svn repository - Added by Eric klopfer over 9 years ago

I'm trying to follow the order of events that happens in browsing the repository to figure out where it is failing. From what I can gather the fetch changesets only pulls the svn logs and puts them in the database. Does anyone know if that is correct? When I browse (if I could) or view differences does it attempt to make a live svn connection rather than going to the database? That would mean all live svn connections are failing, though I am able to manually fetch changesets. That could in turn mean that the user running my redmine process has some permission problems. But I've confirmed that this user (lighttpd) can manually fetch the changesets from the command line.

Can anyone provide some tips for debugging the presumably failed connection?

Thanks

RE: Help with svn repository - Added by Eric klopfer over 9 years ago

Solved! See this thread
http://www.redmine.org/boards/2/topics/show/723

(1-7/7)