You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Xesc Arbona <be...@topdesk.com> on 2009/03/18 17:05:51 UTC

Re: Problem committing to a write-thru proxy

nlif wrote:
> 
> Hi all,
> 
> I am trying to set-up a proxy repository (using SVN 1.5). I have followed
> the instructions and set-up a slave repository, which is served by Apache
> 2.2 via DAV. The Locationsection in the http.conf is the same as the
> master, and I added the SVNMasterURI like so:
> http://URL:PORT/svn/repositories. I then created a new local working copy
> by checkeding-out from the proxy repository. Now, I am trying committing a
> change, and this is what I keep getting:
> 
> 
> Command: Commit  
> Error: Commit failed (details follow):  
> Error: Server sent unexpected return value (405 Method Not Allowed) in
> response to   
> Error: MKACTIVITY request for
> '/svn/la/!svn/act/53faaa48-7461-914e-bff7-d5017525ca18'  
> Finished!:
> 
> 
> Can anyone shed some light?
> 

I had exactly the same problem. Everything worked fine except committing
data to the master. Problem has nothing to do with Subversion, but with
Apache2. You need to enable proxy and proxy_http modules. Perhaps also the
rewrite module.

The following code is equivalent to "SVNMasterURI http://master/svn", and
should also work:

  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} !^GET$
  RewriteCond %{REQUEST_METHOD} !^PROPFIND$
  RewriteCond %{REQUEST_METHOD} !^OPTIONS$
  RewriteCond %{REQUEST_METHOD} !^REPORT$
  RewriteRule ^(.*)$ http://master%{REQUEST_URI} [P]
  ProxyPassReverse http://master/svn

I tried it and I got several errors on Apache2 logs that made me install the
modules. Now it works like a charm. ;)

Regards,

--
Xesc
-- 
View this message in context: http://www.nabble.com/Problem-committing-to-a-write-thru-proxy-tp20524286p22583729.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1349505

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Problem committing to a write-thru proxy

Posted by Tshepo Madigage <ts...@bytes.co.za>.
nlif wrote:
> 
> Thanks, man, I think it's working now! 
> 
> Apparently, half of it was enabling the modules, as you said, and the
> other half, was in the permissions file. Just reading your post got me to
> think in that direction, so I took a look at the svn-acl file, and indeed,
> there were differences between the one on the master and the one on the
> slave. 
> 
> Thanks a lot!
> Naaman
> 
> Hi Naaman,
> 
> Can you elaborate on how you enabled the modules and fixed the permission
> file. BTW i'm running on linux(ubuntu 9.04) and svn 1.5.4
> 
> Regards,
> 
> Tshepo
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-committing-to-a-write-thru-proxy-tp20524286p24841073.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2380760

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Problem committing to a write-thru proxy

Posted by nlif <na...@plimus.com>.
Thanks, man, I think it's working now! 

Apparently, half of it was enabling the modules, as you said, and the other
half, was in the permissions file. Just reading your post got me to think in
that direction, so I took a look at the svn-acl file, and indeed, there were
differences between the one on the master and the one on the slave. 

Thanks a lot!
Naaman


-- 
View this message in context: http://www.nabble.com/Problem-committing-to-a-write-thru-proxy-tp20524286p22643684.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1378605

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Problem committing to a write-thru proxy

Posted by Xesc Arbona <be...@topdesk.com>.
nlif wrote:
> 
> Thanks!
> 
> I tried it, and it's not working, but since I'm not very familiar with
> Apache, maybe I didn't do it properly.
> 
> In my httpd I un-commented these lines:
> 
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule rewrite_module modules/mod_rewrite.so
> 
> I then added the rewrite directives inside the <Location /svn> element. Is
> this the correct place?
> 

Yes, that's right.


nlif wrote:
> 
> I am getting this error, when I try to commit a change from my local
> working copy to the SVN proxy:
> 
> Error: Commit failed (details follow):  
> Error: Server sent unexpected return value (403 Forbidden) in response to
> CHECKOUT   
> Error: request for '/svn/la/!svn/ver/11046/Projects/Core/trunk/build.xml'  
> 

Here you are faced with a different problem. You should check if the slave
is allowed to commit on the master. Which kind of authentication are you
using? I suggest to always allow requests from the slave IP address.

Regards,

--
Xesc
-- 
View this message in context: http://www.nabble.com/Problem-committing-to-a-write-thru-proxy-tp20524286p22619970.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1364394

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Problem committing to a write-thru proxy

Posted by nlif <na...@plimus.com>.
Thanks!

I tried it, and it's not working, but since I'm not very familiar with
Apache, maybe I didn't do it properly.

In my httpd I un-commented these lines:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so

I then added the rewrite directives inside the <Location /svn> element. Is
this the correct place?

I am getting this error, when I try to commit a change from my local working
copy to the SVN proxy:

Error: Commit failed (details follow):  
Error: Server sent unexpected return value (403 Forbidden) in response to
CHECKOUT   
Error: request for '/svn/la/!svn/ver/11046/Projects/Core/trunk/build.xml'  


Thanks again,
Naaman




Xesc Arbona wrote:
> 
> 
> nlif wrote:
>> 
>> Hi all,
>> 
>> I am trying to set-up a proxy repository (using SVN 1.5). I have followed
>> the instructions and set-up a slave repository, which is served by Apache
>> 2.2 via DAV. The Locationsection in the http.conf is the same as the
>> master, and I added the SVNMasterURI like so:
>> http://URL:PORT/svn/repositories. I then created a new local working copy
>> by checkeding-out from the proxy repository. Now, I am trying committing
>> a change, and this is what I keep getting:
>> 
>> 
>> Command: Commit  
>> Error: Commit failed (details follow):  
>> Error: Server sent unexpected return value (405 Method Not Allowed) in
>> response to   
>> Error: MKACTIVITY request for
>> '/svn/la/!svn/act/53faaa48-7461-914e-bff7-d5017525ca18'  
>> Finished!:
>> 
>> 
>> Can anyone shed some light?
>> 
> 
> I had exactly the same problem. Everything worked fine except committing
> data to the master. Problem has nothing to do with Subversion, but with
> Apache2. You need to enable proxy and proxy_http modules. Perhaps also the
> rewrite module.
> 
> The following code is equivalent to "SVNMasterURI http://master/svn", and
> should also work:
> 
>   RewriteEngine on
>   RewriteCond %{REQUEST_METHOD} !^GET$
>   RewriteCond %{REQUEST_METHOD} !^PROPFIND$
>   RewriteCond %{REQUEST_METHOD} !^OPTIONS$
>   RewriteCond %{REQUEST_METHOD} !^REPORT$
>   RewriteRule ^(.*)$ http://master%{REQUEST_URI} [P]
>   ProxyPassReverse http://master/svn
> 
> I tried it and I got several errors on Apache2 logs that made me install
> the modules. Now it works like a charm. ;)
> 
> Regards,
> 
> --
> Xesc
> 

-- 
View this message in context: http://www.nabble.com/Problem-committing-to-a-write-thru-proxy-tp20524286p22600978.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1355651

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].