Tuesday, April 22, 2008

svn: PROPFIND request failed on ...

Have you ever run a command like this?
svn co http://some.host.org/some/repo/somewhere/with/a/trunk myFavoriteProject
And gotten an error like this?
svn: PROPFIND request failed on '/some/repo/somewhere/with/a/trunk'
svn: PROPFIND of '/some/repo/somewhere/with/a/trunk': Could not resolve hostname `some.host.org': Unknown host (http://some.host.org)
Well, you are not alone. You are probably behind a proxy server (like Squid) that filters and/or caches incoming and outgoing traffic.

try doing what I did ...
$ vi ~/.subversion/servers
then go down to the [global] section of the file where you might see soemthing like this:
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
# http-proxy-host = defaultproxy.whatever.com
# http-proxy-port = 7000
Uncomment some of the lines, and fill this section out with the name of your favorite proxy that your business throttles you with, so that it looks something like this:
http-proxy-host = web-proxy.mycompany.com
http-proxy-port = 8080
And then retry your subversion command.

If your company's proxy server supports all of the HTTP methods that Subversion uses like PROPFIND, REPORT, MERGE, MKACTIVITY, and CHECKOUT, then you should be fine.

If something in the way does not support HTTP methods such as REPORT (like our proxy), then you might get subsequent errors like this:
svn: REPORT request failed on '/repos/asf/!svn/vcc/default'
svn: REPORT of '/repos/asf/!svn/vcc/default': Could not read response body: Connection reset by peer (http://some.host.org)
Hope that helps.

If anyone understands this issue better, and can shed some light on it, please give us a link that shows us how to avoid these issues completely.

BOLD UPPERCASE WARNING!

I AM GLAD THAT THE SOLUTION PROVIDED HAS HELPED SOME OF YOU, BUT 100s OF PEOPLE HAVE BEEN READING THIS POST EVERYDAY, AND WE WANT A MORE DEFINITIVE AND CLEAR ANSWER TO THESE ISSUES THAN WHAT YOU SEE ABOVE. WHY ARE PEOPLE HAVING ALL OF THESE ISSUES? THOSE OF YOU WHO FIGURE THIS OUT ... POST YOUR COMMENTS BELOW!

11 comments:

Mahendra Tipale said...

Thanks for SVN info..

I had prob with svn server connection.
I had changed ~/.subversion/server to work with office proxy setting.. but that wasnt needed..

Finally I resolved issue..

:) thanks

mswebby said...

If my company's proxy server did not support the HTTP methods used by subversion, would I see this error intermittently? SVN operations seem to work like 50% of the time.

svn: REPORT request failed on '/svn/!svn/vcc/default'
svn: REPORT of '/svn/!svn/vcc/default': Could not read response body: Connection reset by peer (my svn server here)

Could this be because I'm going through an Apache interface?

ranga said...

hi sir
i am using subversion repositories,
i am getting propfind 500 intrnal error when im going to checkout subversion clientside. can u plz tell me about these error to resolve the problem.
thanq
Prasad

Daniel J. Doughty said...

In my particular case, I was receiving this error due to a start-commit hook that didn't have execute permissions. I fixed that and now I'm cooking with gas.

Daniel J. Doughty said...

Vernon emailed me and asked me to elaborate on a few things.

Thanks for the info. Could you explain what a start-commit hook is?
Where is it defined? How did you know that the error was due to that
hook trying to execute without permissions?

Do other folks have these start-commit hooks with default installs of
some software? If so, what software package(s)?
I should first mention that I'm a unix sys admin, so I know some Subversion but developers tend to know it better than me.

A start-commit hook is a script that Subversion calls before allowing a developer to check code in. In my particular case, I use it to prevent users from checking code in unless they are using a particular username. I do that because I'm creating a Subversion mirror and mirrors, unlike webdav-proxy's, don't like multiple users to check code in. You can read more about that at this website: http://www.kirkdesigns.co.uk/mirror-svn-repository-svnsync

I didn't know for sure that the bad permissions were the problem, but I was able to check in code earlier that day. I traced my steps and looked over everything I'd recently added to the project before this error.

Others will not have start-commit hooks installed by default, although there are usually example files in the repository.

I hope that answers all your questions and perhaps it will help others. If you have other questions, feel free to ask me on twitter at @danielJdoughty

Sai Krishna said...

Hi,

Can this error occur for some other reasons as well, even if proxy is not present.

Vernon Singleton said...

@Sai Krishna

That is why I stated "You are probably behind a proxy server", because that is where we have most often seen this issue.

And we also find this one "svn: REPORT request failed ..." is especially annoying.

But would you care to elaborate and enlighten us? And if you can give us a link that explains how to avoid all of these issues completely whether behind a proxy or not, we would greatly appreciate it.

Anonymous said...

I got the same error and this was because I did not have the persmission to do an SVN update. I changed the user to root[svn --usernma --password update .] and it worked like a charm.

Anonymous said...

Thank you Vernon, it's very a helpful posting.
The only thing I had to work out was where to find the .subversion (equivalent) folder for my platform and SVN client. For command-line SVN on Windows, it was in my ${user.dir}\Application Data\Subversion\servers file. it worked fine after that.
Simon

Vernon Singleton said...

@Anonmymous Thursday, November 04, 2010

If you live in a sad, proprietary jail cell, as a second class citizen you will need to know a secret.

In your prison, the secret is:
${user.dir}\Application Data\

Other folks live in a different padded room where the secrets change more often. At one time, they may have had to know this secret:
C:\Windows\Application Data\

and then later, they learned the new secret which might have been something like:
C:\Documents and Settings\user\Application data\

But more likely, folks like this, love to pay more money each year to maintain a false sense of status, among their lonely friends, as simpleminded, uncircumcised idolaters, and they often advise that everyone should pay to re-learn the answer to this question again and again and again which more recently has been found to be something like:
C:\Users\{user name}\Application data\

But for those of us who learned the answer one time, twenty-some years ago, with no intention of ever updating any secrets about such things still just use:
~/.

Anonymous said...

Make sure you are not running as sudo. Sometimes I know I require sudo to update but not to checkout