Apache22 + Subversion 1.6.6 = No go.

Glen Johnson nelgmj at verizon.net
Mon Nov 23 22:56:02 UTC 2009


On Nov 23, 2009, at 1:49 PM, Greg Larkin wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Glen Johnson wrote:
>>
>> On Nov 20, 2009, at 4:21 PM, Greg Larkin wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Glen Johnson wrote:
>>>>
>>>> On Nov 19, 2009, at 11:59 PM, Greg Larkin wrote:
>>>>
>>>>> Glen Johnson wrote:
>>>>>> On Nov 19, 2009, at 11:43 AM, Greg Larkin wrote:
>>>>>>>
>>>>>>> Glen Johnson wrote:
>>>>>>>> FreeBSD-questions,
>>>>>>>> I am attempting to use FreeBSD as my Subversion server.  I have
>>>>>>>> Subversion working, and I have Apache working.  However when I
>>>>>>>> try to
>>>>>>>> use http:/my_server/svn/my_project I get:
>>>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>>> <D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns"
>>>>>>>> xmlns:C="svn:">
>>>>>>>> <C:error/>
>>>>>>>> <m:human-readable errcode="2">
>>>>>>>> Could not open the requested SVN filesystem
>>>>>>>> </m:human-readable>
>>>>>>>> </D:error>
>>>>>>>>
>>>>>>>> 1 I tried chmod -R 777 /home/svn/repos.
>>>>>>>> 2 I tried recompiling apache, db, and subversion.
>>>>>>>> 3 I looked at /var/log/http-error.log (partial list below)
>>>>>>>> [Thu Nov 19 09:35:52 2009] [notice] Graceful restart requested,
>>>>>>>> doing
>>>>>>>> restart
>>>>>>>> [Thu Nov 19 09:35:53 2009] [notice] Digest: generating secret 
>>>>>>>> for
>>>>>>>> digest
>>>>>>>> authentication ...
>>>>>>>> [Thu Nov 19 09:35:53 2009] [notice] Digest: done
>>>>>>>> [Thu Nov 19 09:35:54 2009] [notice] Apache/2.2.13 (FreeBSD)
>>>>>>>> mod_ssl/2.2.13 OpenSSL/0.9.8e DAV/2 SVN/1.6.6 configured -- 
>>>>>>>> resuming
>>>>>>>> normal operations
>>>>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12]
>>>>>>>> (20014)Internal
>>>>>>>> error: Can't open file '/usr/home/svn/repos/default/format': No 
>>>>>>>> such
>>>>>>>> file or directory
>>>>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12] Could 
>>>>>>>> not
>>>>>>>> fetch
>>>>>>>> resource information.  [500, #0]
>>>>>>>> [Thu Nov 19 09:36:10 2009] [error] [client 192.168.2.12] Could 
>>>>>>>> not
>>>>>>>> open
>>>>>>>> the requested SVN filesystem  [500, #2]
>>>>>>>>
>>>>>>>>
>>>>>>>> What am I missing?
>>>>>>>> Thank you,
>>>>>>>> Glen
>>>>>>>
>>>>>>> Hi Glen,
>>>>>>>
>>>>>>> Please post the relevant bits from your httpd.conf where you set
>>>>>>> up the
>>>>>>> SVNPath, etc.  It looks like maybe the SVNPath directive is
>>>>>>> pointing to
>>>>>>> the wrong place.
>>>>>>>
>>>>>> Thanks for your reply.  I currently have this info in
>>>>>> /usr/local/etc/apache22/Includes/svn.conf.  Apache22 loads all the
>>>>>> conf
>>>>>> files in this directory when httpd.conf is loaded.
>>>>>> <Location /svn>
>>>>>>         DAV svn
>>>>>>         SVNParentPath /usr/home/svn/repos
>>>>>>         SVNListParentPath on
>>>>>>         SVNPathAuthz off
>>>>>>         SVNIndexXSLT "/data-dist/svnindex.xsl"
>>>>>>
>>>>>>         # anonymous first
>>>>>>         Satisfy Any
>>>>>>         Require valid-user
>>>>>>
>>>>>>         # authenticating them valid ones
>>>>>>         AuthType Basic
>>>>>>         AuthName "Subversion Repositories"
>>>>>>         AuthUserFile /usr/home/svn/access/users
>>>>>> </Location>
>>>>>>
>>>>
>>>>> Hi Glen,
>>>>
>>>>> At first glance, that looks OK to me. The next tests are:
>>>>
>>>>> - - Does /usr/home/svn/repos/default exist? (I know, dumb 
>>>>> question!)
>>>> No, not so dumb.  It is good not to make assumptions that I may
>>>> overlook.  This however is not one.  This is what I did to verify I 
>>>> do
>>>> have a project.
>>>> 1. svn co file:///usr/home/svn/repos def     # Then for fun I added
>>>> hello.txt in def/trunk.  More about this below.
>>>> 2. svn co svn://usr/home/svn/repos def    # Still works fine.
>>>> 3. svn co file:///usr/home/svn/repos def    # SVN: Could not open 
>>>> the
>>>> requested SVN filesystem (Error message from svn)
>>>>
>>>>> - - If it does, are permissions set such that the httpd process 
>>>>> user
>>>>> can
>>>>> read the directory? You said "chmod 777" on the repository parent
>>>>> directory didn't work.
>>>> I tried:
>>>> chmod -R 777 /usr/home/svn/repos
>>>> chmod -R www:www /usr/home/svn/repos
>>>>
>>>> By the way here are the settings for user www and group www.
>>>>
>>>> grep www /etc/passwd
>>>> www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
>>>>
>>>> grep www /etc/group
>>>> www:*:80:glen,root
>>>>
>>>>
>>>>> - - Please post the output of "ls -laR /usr/home/svn/repos"
>>>> First I noticed that there are some files that are owned by glen 
>>>> due to
>>>> me adding repos/trunk/hello.txt.
>>>> Ok you asked for this:
>>>> total 24
>>>> drwxrwxrwx  10 www   www  512 Nov 20 08:48 ./
>>>> drwxrwxrwx   5 root  www  512 Nov 20 08:46 ../
>>>> drwxrwxrwx   6 www   www  512 Nov 20 08:48 .svn/
>>>> -rwxrwxrwx   1 www   www  229 Nov 20 08:46 README.txt*
>>>> drwxrwxrwx   3 www   www  512 Nov 20 08:48 branches/
>>>> drwxrwxrwx   2 www   www  512 Nov 20 08:46 conf/
>>>> drwxrwxrwx   6 www   www  512 Nov 20 09:01 db/
>>>> -rwxrwxrwx   1 www   www    2 Nov 20 08:46 format*
>>>> drwxrwxrwx   2 www   www  512 Nov 20 08:46 hooks/
>>>> drwxrwxrwx   2 www   www  512 Nov 20 08:46 locks/
>>>> drwxrwxrwx   3 www   www  512 Nov 20 08:48 tags/
>>>> drwxrwxrwx   3 www   www  512 Nov 20 08:48 trunk/
>>>>
>>> [...]
>>>
>>> Hi Glen,
>>>
>>> Ok, I see what's going on now.  First, you have an SVNParentPath
>>> directive in your httpd.conf file.  The directory on that line 
>>> specifies
>>> a place where multiple, separate Subversion repositories will 
>>> appear, so
>>> you could have a setup like this:
>>>
>>> /usr/home/svn/repos
>>>                    /internal-repos
>>>                    /client-projects-repos
>>>                    /oss-contrib-repos
>>>                    ...
>>>                    ...
>>>
>>> In this case, each of those repository subdirectories would be 
>>> created
>>> like so:
>>>
>>> svnadmin create /usr/home/svn/repos/internal-repos
>>> svnadmin create /usr/home/svn/repos/client-projects-repos
>>> svnadmin create /usr/home/svn/repos/oss-contrib-repos
>>>
>>> So far, so good.
>>>
>>> What I notice in your directory listings is that you have a 
>>> Subversion
>>> repository anchored at /usr/home/svn/repos, not in a subdirectory
>>> therein.  This is going to cause problems with SVNParentPath, 
>>> because it
>>> will treat all subdirectories under there (e.g. conf/, db/, hooks/,
>>> etc.) as Subversion repositories.  If you only plan to use that 
>>> single
>>> repository, your httpd.conf should read:
>>>
>>> SVNPath /usr/home/svn/repos
>>>
>>> instead of:
>>>
>>> SVNParentPath /usr/home/svn/repos
>>>
>>>
>> You are absolutely right!  I have attempted to follow a howto
>> http://www.bsdguides.org/guides/freebsd/misc/subversion.php to make 
>> all
>> this happen.  I miss read it and mixed up the multiple repositories
>> instructions with the single repository directions.  Good catch.
>>
>>> Next, I notice that /usr/home/svn/repos also contains a Subversion
>>> working copy, indicated by the directories .svn/, trunk/, tags/ and
>>> branches/.  I recommend that you delete those and re-checkout your
>>> repository into a new working directory somewhere else.
>> What a mess I have made!  I am using
>> http://www.bsdguides.org/guides/freebsd/misc/subversion.php as a guide
>> and miss read it, I deleted /usr/home/svn/repos and wrote a script 
>> which
>> follows the directions from the site.  I ran it and the repository 
>> looks
>> clean and nothing is checked out in the midst of it.
>>>
>>> The reason you saw the message "error: Can't open file
>>> '/usr/home/svn/repos/default/format': No such file or directory" was
>> I continue to get the exact same error as I started with.  Here is the
>> full error msg from httpd-error.log:
>> [Mon Nov 23 12:59:56 2009] [error] [client 192.168.2.100] (20014)Error
>> string not specified yet: Can't open file
>> '/usr/home/svn/repos/repos/format': No such file or directory
>> [Mon Nov 23 12:59:56 2009] [error] [client 192.168.2.100] Could not
>> fetch resource information.  [500, #0]
>> [Mon Nov 23 12:59:56 2009] [error] [client 192.168.2.100] Could not 
>> open
>> the requested SVN filesystem  [500, #2]
>> [Mon Nov 23 12:59:56 2009] [error] [client 192.168.2.100] Could not 
>> open
>> the requested SVN filesystem  [500, #2]
>>
>> I am not sure what it refers to by "Error string not specified yet:"
>> The odd thing is it can't find it but it knows that format exists.  It
>> really looks like it can't find format, but I can see format when I do
>> ls -Rla /usr/home/svn/repos in /usr/home/svn/repos/default/format.
>>
>> ls -Rla /usr/home/svn/repos
>> total 6
>> drwxrwxrwx  3 www  www  512 Nov 23 11:29 ./
>> drwxrwxrwx  4 www  www  512 Nov 23 11:29 ../
>> drwxrwxrwx  6 www  www  512 Nov 23 11:29 default/
>>
>> /usr/home/svn/repos/default:
>> total 16
>> drwxrwxrwx  6 www  www  512 Nov 23 11:29 ./
>> drwxrwxrwx  3 www  www  512 Nov 23 11:29 ../
>> -rwxrwxrwx  1 www  www  229 Nov 23 11:29 README.txt*
>> drwxrwxrwx  2 www  www  512 Nov 23 11:29 conf/
>> drwxrwxrwx  6 www  www  512 Nov 23 11:29 db/
>> -rwxrwxrwx  1 www  www    2 Nov 23 11:29 format*
>> drwxrwxrwx  2 www  www  512 Nov 23 11:29 hooks/
>> drwxrwxrwx  2 www  www  512 Nov 23 11:29 locks/
>
> Hi Glen,
>
> Please start over with the instructions from the bsdguides.org site, 
> and
> make sure you enter each command exactly as it specifies.  Your
> directory structure above indicates that you've created your repository
> in the wrong place.
>
> Best of luck,
> Greg
>

I worked on this a little more after my last e-mail and figured out 
that I was using the wrong URL.  I was trying 
http://penti4/svn/repos/default.  What I really needed was 
http://penti4/svn/default.
Thank you for all your help Mr. Larkin!
Good day,
Glen



More information about the freebsd-questions mailing list