[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: PROPFIND of /svn: 500 Internal Server Error

From: John Szakmeister <john_at_szakmeister.net>
Date: 2004-01-22 13:17:12 CET

On Thursday 22 January 2004 05:59, Gregois wrote:
> Yes. Repository is /usr/local/src Odd it may be, but the location is
> essentially arbitrary
> and this directory is unused for anything else at present. It will be moved
> elsewhere when
> the setup is working.
>
>
> Does httpd run as apache?
>
> $ ps -ef | grep httpd
>
> root 16214 1 0 Jan17 ? 00:00:04
> /usr/local/apache2/bin/httpd -k start
> apache 16317 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16318 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16319 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16320 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16321 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16322 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> apache 16323 16214 0 Jan17 ? 00:00:00
> /usr/local/apache2/bin/httpd -k start
> greg 25606 25564 0 09:15 pts/5 00:00:00 grep http
>
> I take it the first line is reporting that the process started up as root
> and then switched to
> User apache. Is this the correct interpretation?

Yep. This is fine.

> What happens if I recover the repository?
>
> # svnadmin recover /usr/local/src
> Please wait; recovering the repository may take some time...
>
> Recovery completed.
> The latest repos revision is 1.
>
> OK, so now reset permissions on repository filesystem:
>
> chown -R apache /usr/local/src
>
> Is this approach wise? Is it OK to give apache ownership of *everything* in
> here?
> Are there some files that should retain root ownership for security
> reasons?

To be honest, I don't know. I do know that fact that apache runs as it's own
user helps to mitigate risk, but I wouldn't be surprised to find out that
there probably are some files that need to have root ownership.

> And restart webserver:
>
> /usr/local/apache2/bin/apachectl start
>
>
> Now I can browse Revsision 1 as imported by the file:// protocol
> described yesterday at URL: http://my.web.address/svn/ *and*
> it reports "Revision 1" as the title in the HTML rather than
> 500 Internal Server Error, which seems positive.
>
> So, can I break this at will by repeating my earlier steps?
>
> Attempting import using TortoiseSVN via network produces
> same PROPFIND error, with no entries in apache error_log,
> so i suspect the answer will be yes. And indeed, it is.

How are you accessing your repository through TortoiseSVN? Also, do you have
to go through a firewall to reach your server? Have you tried doing a
checkout on the server machine (i.e., "svn co http://my.web.address/svn
working-copy" or "svn co http://localhost/svn working-copy")? What are you
using for your client platform? If it's XP, there is a known issue with it
corrupting packets, and you need to upgrade to XP SP1. I'd like to rule out
some sort of network failure here, whether it be a firewall or an OS.

> In the meantime, I have discovered:
>
> $ rpm -qil db4
>
> Name : db4 Relocations: (not relocateable)
> Version : 4.1.25 Vendor: Red Hat, Inc.
> Release : 14 Build Date: Sat 25 Oct 2003
> 07:37:34 EST
> ...
>
> which you suggest may have problems. I downloaded 4.2.52-2 rpms but have
> not installed these as yet.

To be honest, all the problems that I've seen related to 4.1.25 is one
multi-processor machines. You're probably fine (no guarantees, of course),
as long as both Apache and Subversion were compiled with the same BDB.
That's really what is most important.

> # rpm -Uv --test db4-4.4.52-2.i386.rpm
>
> error: Failed dependencies:
> libdb-4.1.so is needed by (installed) python-2.2.3-7
> libdb-4.1.so is needed by (installed) cyrus-sasl-2.1.15-6
> libdb-4.1.so is needed by (installed) perl-5.8.1-92
> libdb-4.1.so is needed by (installed) sendmail-8.12.10-1.1.1
> libdb-4.1.so is needed by (installed) apr-util-0.9.4-2
> libdb-4.1.so is needed by (installed) httpd-2.0.47-10
> libdb-4.1.so is needed by (installed) php-4.3.3-6
> libdb-4.1.so is needed by (installed) webalizer-2.01_10-14
> libdb-4.1.so is needed by (installed) db4-utils-4.1.25-14
> libdb_cxx-4.1.so is needed by (installed)
> openoffice.org-libs-1.1.0-6
> libdb_cxx-4.1.so is needed by (installed) openoffice.org-1.1.0-6
> db4 = 4.1.25 is needed by (installed) pam-0.77-15
> db4 = 4.1.25-14 is needed by (installed) db4-devel-4.1.25-14
> db4 = 4.1.25-14 is needed by (installed) db4-utils-4.1.25-14
>
> If I force the install of this rpm will the dependent packages still
> function?

Good question, and I'm afraid I don't have a good answer. In general, no.
RPMs tend to clean up the older version, and leave only the newer one.
Someone else with more experience could probably answer this question better.

> Is this an apache configuration problem?
>
> Not that I can see, but check for yourself:
>
> cat httpd.conf
>
> [snip]
> # Example:
> # LoadModule foo_module modules/mod_foo.so
> LoadModule dav_svn_module modules/mod_dav_svn.so
> LoadModule authz_svn_module modules/mod_authz_svn.so
> #
>
> LoadModule php4_module modules/libphp4.so

Did you compile the other modules statically? I'm assuming so since you saw
data with your web broswer, but anyway since I don't see mod_dav and
mod_authz listed.

> ##### Greg #############################################################
>
> <Location /svn/ >
> DAV svn
> SVNPath "/usr/local/src/"
> </Location>
>
> ##### End Greg #########################################################

I'm not sure it makes a difference, but I don't generally see the Location
directive have a trailing '/' on the path. However, if you're seeing data in
the web browser, this is probably fine.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 22 13:28:31 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.