Project

General

Profile

Unable to browse/view contents in cvs repository

Added by Neil K almost 14 years ago

Hello,

Here is my environment.

Redmine 0.9.3
Ruby version 1.8.6 (i386-linux) (fedora 13)
RubyGems version 1.3.7
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /opt/redmine
Environment production
Database adapter mysql
Database schema version 20100221100219

I was successfully added a cvs repository (CVSROOT as :pserver:user:password@cvsserver:/var/cvs) and executed "ruby script/runner "Repository.fetch_changesets" -e production" without any errors. But when I click in "Repositories" under a project I could see the error "The entry or revision was not found in the repository".

From the production.log, I could see:

Processing RepositoriesController#show (for x.x.x.x at 2010-06-15 17:26:09) [GET]
Parameters: {"action"=>"show", "id"=>"gcw", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 140ms (View: 18, DB: 3) | 500 Internal Server Error [http://x.x.x.x/projects/gcw/repository]

Can any one help me in this issue?


Replies (28)

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

By the way, I am able to perform all cvs operations from the shell without any issues.

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

This seems like a permission issue, make sure the user running redmine has read access to this path.

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Sorry but to which path? Actually the user running redmine is root so I don't think it is a permission problem. I think the issue is connected with the way how redmine trying to access CVS. May be something is wrong in cvs_adapter.rb. This the log created in CVS server by redmine.

Jun 16 10:57:52 x.x.x.x xinetd1424: START: cvspserver pid=2188 from=::ffff:x.x.x.x
Jun 16 10:57:52 x.x.x.x xinetd1424: EXIT: cvspserver status=0 pid=2188 duration=0(sec)

I updated redmine to the latest stable 0.9.4 but the problem persists.

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

I don't know anything about CVS, so I'm trying what solves 95% of issues with the other SCMs :-)

I can't tell you how redmine accesses the repository either, sorry, but it should all be readable from thenCVS adapter. Sorry to insist, but are you sure it is run as root? What rails server do you use for redmine?

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Yes, redmine is running as root. I am testing this on a local machine before deploying to the server. My rails version is 2.3.5 and I have installed that by running "gem install rails -v=2.3.5".

RE: Unable to browse/view contents in cvs repository Error: The entry or revision was not found in the repository - Added by Neil K almost 14 years ago

I could see lots of people having similar issues with svn/cvs. Can this be a bug?

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

The error message is the same, but the cause is not. Most problems with svn are due to wrong file permissions or people needing to accept a non trusted SSL certificate permanently so that svn can run non-interactive, sometimes svn not being in the $PATH other such stuff.

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

So, what could be the reason of the issue that I am experiencing? The error from production.log seems to be generic.

Processing RepositoriesController#show (for x.x.x.x at 2010-06-15 17:26:09) [GET]
Parameters: {"action"=>"show", "id"=>"gcw", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 140ms (View: 18, DB: 3) | 500 Internal Server Error [http://x.x.x.x/projects/gcw/repository]

Looks like not many people are interested in CVS :-(

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Hey, one thing I noticed now is the url in the error message: http://x.x.x.x/projects/gcw/repository
How came this address there? I am sure that the url is not valid as there is no webpage available in /projects/gcw/repository. Any idea what this url is for?

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

Neil K wrote:

Hey, one thing I noticed now is the url in the error message: http://x.x.x.x/projects/gcw/repository
How came this address there? I am sure that the url is not valid as there is no webpage available in /projects/gcw/repository. Any idea what this url is for?

That is the address you're trying to visit and that should yield a page with the CVS content listed, but with the mention that it failed with an HTTP error 500.

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

I was also thinking like that that does not seems to be the problem. Here is one success log entry when I clicked on the "Activity" tab.

Processing ProjectsController#activity (for x.x.x.x at 2010-06-16 17:38:38) [GET]
Parameters: {"action"=>"activity", "id"=>"test", "controller"=>"projects"}
Completed in 29ms (View: 0, DB: 3) | 304 Not Modified [http://x.x.x.x/projects/test/activity]

In this case also, there is no web page at http://x.x.x.x/projects/test/activity

Infact, in a CVS server (or in the redmine server), there is no need of a web content like that. Also in the cvs configuration instructions, I couldn't see anything which points to such a configuration.

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Here is another success log entry when I clicked on a file under the "Activity" tab.

Processing RepositoriesController#revision (for x.x.x.x at 2010-06-16 17:40:46) [GET]
Parameters: {"rev"=>"3", "action"=>"revision", "id"=>"test", "controller"=>"repositories"}
Rendering template within layouts/base
Rendering repositories/revision
Completed in 34ms (View: 21, DB: 3) | 200 OK [http://x.x.x.x/projects/test/repository/revisions/3]

Here also the url http://x.x.x.x/projects/test/repository/revisions/3 is not valid but could see a success (200 OK).

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

Neil K wrote:

Here also the url http://x.x.x.x/projects/test/repository/revisions/3 is not valid but could see a success (200 OK).

What do you mean "is not valid"? Of course it is valid, because the rails router that takes requests recognizes that when /projects/test/repository/revisions/3 is called, it calls the method RepositoriesController#revisions with the parameters {:id => "test", :rev => "3"} and renders whatever view is associated with it.

RE: Unable to browse/view contents in cvs repository - Added by Toshi MARUYAMA almost 14 years ago

Redmine calls "cvs rls" at source:tags/0.9.4/lib/redmine/scm/adapters/cvs_adapter.rb#L66 ,
but my fedora 13 CVS does not have "rls" sub command.

$ cvs --version
Concurrent Versions System (CVS) 1.11.23 (client/server)

RE: Unable to browse/view contents in cvs repository - Added by Toshi MARUYAMA almost 14 years ago

Sorry, my fedora is 12.

$ rpm -q cvs
cvs-1.11.23-8.fc12.i686

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Not valid means if I try accessing the url http://x.x.x.x/projects/test/repository/revisions/3 in a browser, its gives a 404 Not Found error. It was not a surprise because I am sure that I haven't done anything to get such a page. As I mentioned, I didn't see any instruction to configure a web accessible location like this.

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

Where do you expect your redmine to live then?

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Felix, did you check the url again? My redmine is at http://x.x.x.x:3000 but the url in the log contains no ports i.e. the request will go to apache.

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Toshi, what you are trying to convey? Are you having the same issue? Line 66 of my cvs_adapter.rb is:

cmd = "#{CVS_BIN} -d #{root_url} rls -e"

RE: Unable to browse/view contents in cvs repository - Added by Toshi MARUYAMA almost 14 years ago

Neil K wrote:

Toshi, what you are trying to convey? Are you having the same issue? Line 66 of my cvs_adapter.rb is:

cmd = "#{CVS_BIN} -d #{root_url} rls -e"

$ cd /REDMINE_DIR/test/fixtures/repositories
$ mkdir test
$ cd test
$ gunzip < ../cvs_repository.tar.gz | tar xf -
$ cd cvs_repository
$ cvs -d `pwd` rlog test
.
.
.
$ cvs -d `pwd` rls test
Unknown command: `rls'

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

Neil K wrote:

Felix, did you check the url again?

Why should I have checked the URL again? It's the first mention whatsoever you make of having your redmine on port 3000.

My redmine is at http://x.x.x.x:3000 but the url in the log contains no ports i.e. the request will go to apache.

Rails doesn't log what port it is called on because in most cases it doesn't care. Have a look at your apache log if you have one running, I'd suppose there will be no mention of any such page whatsoever. Have a look at the address bar in your browser, if you are directed to http://x.x.x.x/something rather than http://x.x.x.x:3000/something by redmine, then something is fishy in your installation.

Anyway, please provide a clear description of your setup, what you are trying to achieve and what errors you get, even better if it's reproducible. I'd even enjoin you to try with a fresh install of redmine.

RE: Unable to browse/view contents in cvs repository - Added by Toshi MARUYAMA almost 14 years ago

FYI.
http://d.hatena.ne.jp/maru_cc/20100226/1267188482

# wget http://ftp.gnu.org/non-gnu/cvs/binary/feature/x86-linux/RPMS/i386/cvs-1.12.12-ximbiot.1.i386.rpm
# rpm -qa | grep cvs
cvs-1.11.2-10
# rpm -Uvh cvs-1.12.12-ximbiot.1.i386.rpm
Preparing...                ########################################### [100%]
   1:cvs                    ########################################### [100%]
# rpm -qa | grep cvs
cvs-1.12.12-ximbiot.1

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Sorry Felix for not mentioning that my redmine is running on port 3000. Anyway, here is my setup.

1. Checked out redmine (0.9.4) and completed the installation without any errors. Redmine is getting started with the command "ruby /opt/redmine/script/server webrick -e production -d" as root. I can access redmine using http://x.x.x.x:3000

2. Logged in as admin, created a project. Went to that project > settings > Repository. I already have a working CVS server on another machine so I configured scm to cvs, CVSROOT as :pserver:user:password@server:/var/cvs and provided an existing module name.

3. Then I executed this command as root: ruby script/runner "Repository.fetch_changesets" -e production"
The output was:
Use #requirement
cvs rlog: Logging Module_name

4. Then I went to the "Activity" tab on my project at redmine and could see the files at my CVS repository are listed. The page loaded fine and the log is:

Processing ProjectsController#activity (for 127.0.0.1 at 2010-06-17 09:45:12) [GET]
Parameters: {"action"=>"activity", "id"=>"gcw", "controller"=>"projects"}
Completed in 26ms (View: 0, DB: 3) | 304 Not Modified [http://localhost/projects/gcw/activity]

5. Clicked on a file and a page that showing the exact version of that file and a link "View differences" are showed. (Success) The log is:

Processing RepositoriesController#revision (for 127.0.0.1 at 2010-06-17 09:45:56) [GET]
Parameters: {"rev"=>"3", "action"=>"revision", "id"=>"gcw", "controller"=>"repositories"}
Rendering template within layouts/base
Rendering repositories/revision
Completed in 33ms (View: 20, DB: 3) | 200 OK [http://localhost/projects/gcw/repository/revisions/3]

6. Then I clicked on the file listed on that page and I got the error: "The entry or revision was not found in the repository.". Error log is:

Processing RepositoriesController#entry (for 127.0.0.1 at 2010-06-17 09:50:00) [GET]
Parameters: {"rev"=>"3", "action"=>"entry", "id"=>"gcw", "controller"=>"repositories", "path"=>["test2.txt"]}
Rendering template within layouts/base
Completed in 35ms (View: 17, DB: 2) | 500 Internal Server Error [http://localhost/projects/gcw/repository/revisions/3/entry/test2.txt]

7. Alternatively you can just click on the "Repository" tab and could see the same error "The entry or revision was not found in the repository.". Error log:

Processing RepositoriesController#show (for 127.0.0.1 at 2010-06-17 09:51:42) [GET]
Parameters: {"action"=>"show", "id"=>"gcw", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 147ms (View: 25, DB: 4) | 500 Internal Server Error [http://localhost/projects/gcw/repository]

RE: Unable to browse/view contents in cvs repository - Added by Neil K almost 14 years ago

Hey, I resolved the issue with the help of Toshi.

As Toshi mentioned, the cvs client i.e. /user/bin/cvs provided by cvs-1.11.23-8.fc13.i686 rpm doesn't supports "rls". So, I removed cvs-1.11.23-8.fc13.i686 and installed cvs-1.12.12-ximbiot.1.i386. Then I tried to access the CVS server from a shell prompt and got the error "cvs [rls aborted]: server does not support rls". So, I went ahead and upgraded the CVS server with cvs-1.12.12-ximbiot.1.i386 which resolved the issue.

Thanks again Toshi and Felix.

RE: Unable to browse/view contents in cvs repository - Added by Felix Schäfer almost 14 years ago

Neil, sorry for being so rough, but I really had the impression of getting nowhere. Now the detailed steps and description you have provided are much more helpful, thank you.

Does anyone of you know if the lack of the commands Toshi uncovered is specific to the fedora releases, or if it's a more general thing because they are getting phased out in newer versions of CVS? I think this should be examined and taken into account in the CVS adapter.

(1-25/28)