You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David <dd...@gmail.com> on 2010/12/20 07:03:16 UTC

A problem trying to use svn:// and http:// for a same repository at the same time

Good day sirs and madams,

We use http:// for local team. Currently another team at another site
need to visit our repository to cooperate.
They complain about the slow speed of diff, merge and tag. So I want
to turn on svn:// for them while http:// for us.
It seems to be posibble, right?
But when I tried, I got an error saying: There has been a problem
contacting the server...

I read the INSTALLING SUBVERSION A Quick Guide carefully and install
svn from source:

#install Apache:
tar zxf httpd-2.2.14.tar.gz
cd httpd-2.2.14
./configure --prefix=/local/svnroot/apache2 --enable-so --enable-mods-
shared=all --enable-dav=share
--enable-dav-fs --with-ldap --enable-ldap --enable-authnz-ldap --
enable-authn-alias \
--enable-maintainer-mode --with-serf  --enable-ssl --with-ssl --with-
openssl
make
make install

#install Subversion
tar zxf subversion-1.6.15.tar.gz
tar zxf subversion-deps-1.6.15.tar.gz
cd subversion-1.6.15
./configure --prefix=/local/svnroot/subversion --with-apxs=/local/
svnroot/apache2/bin/apxs \
--with-apr=/local/svnroot/apache2 --with-apr-util=/local/svnroot/
apache2 \
--with-ssl --enable-maintainer-mode \
--enable-javahl --with-jdk=/local/jdk1.6.0_17 \
--with-serf=/root/subversion-1.6.15/serf \
PYTHON=/usr/bin/python2.4
make
make install

./svnadmin create --pre-1.5-compatible /local/svnroot/repository/one
#start the ./subversion/bin/svnserve
#configure ./one/conf/svnserve.conf, authz, passwd
svn://172.18.127.148/one
It is ok to view logs via TortoiseSVN-->Show log


But:
./svnadmin create /local/svnroot/repository/test
#configure ./one/conf/svnserve.conf, authz, passwd
svn://172.18.127.148/test
An error happen when i try to view logs via TortoiseSVN-->Show log

The error message is:
There has been a problem contacting the server. Do you want to see the
cached data instead?

please understand that the cached data may be outdated, incomplete or
even misleading due to incomplete history data.

Make this the dafault
Offline now             Permanently offline
Cancel


svn, version 1.6.15 (r1038135)
TortoiseSVN 1.6.12, Build 20536 - 32 Bit , 2010/11/24 20:59:01
and tested TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi
Window SP3
Red Hat Enterprise Linux 5

Also see my old post at:
http://groups.google.com/group/tortoisesvn/browse_thread/thread/94b8f12b8dcfcb1f/21d8e8f4c9180c51#21d8e8f4c9180c51

Have somebody seen the same error? Any guides?


Thanks in advance,
David

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Dec 22, 2010 at 09:12:13AM +0800, David Xie wrote:
> Thanks Stefan.
> 
> Wow, it really works when disable authz. This means I could access to svn://
> 172.18.127.148/test (read and write) and successfully to view log
> history. Hard to believe!
> #authz-db = authz
> 
> And the logs are showed correctly without authz.
> 
> What's wrong? What should I do to make authz and log history both work?

Authz restrictions always affect paths and log history.

If a revision modified a path that the authenticated user cannot access
because of authz rules, the user will always get an empty log message
for this revision. The log message might contain information the user
isn't allowed to see.

Stefan

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by David Xie <dd...@gmail.com>.
Thanks Stefan.

Wow, it really works when disable authz. This means I could access to svn://
172.18.127.148/test (read and write) and successfully to view log
history. Hard to believe!
#authz-db = authz

And the logs are showed correctly without authz.

What's wrong? What should I do to make authz and log history both work?

Regards,
David

On Tue, Dec 21, 2010 at 5:17 PM, Stefan Sperling <st...@elego.de> wrote:

>  On Tue, Dec 21, 2010 at 04:25:55PM +0800, 谢带达 wrote:
> > Thank you Stefan.
> >
> > I start svnserve this way:
> >
> > /local/svnroot/repository/one/conf/svnserve.conf
> > [general]
> > anon-access =
> > auth-access = write
> > password-db = passwd
> > authz-db = authz
> > /local/svnroot/repository/one/conf/authz
> > [/]
> > test = rw
> > * =
> >
> > /local/svnroot/repository/one/conf/passwd
> > [users]
> > test = test
> >
> > And then I start svnserve with root account:
> > /local/svnroot/subversion/bin/svnserve -d --listen-host 172.18.127.148
> > --root /local/svnroot/repository
> >
> > Yes I could connet to :
> > svn://172.18.127.148/test
> > svn://172.18.127.148/one
> >
> > The problem is that it show "Item is not readble" when I try to show log
> via
> > TSVN.
> > The only difference between Repository one and Repository test is that
> the
> > former is created with --pre-1.5-compatible but the latter not.
> > 3 snaps are attached for your reference.
>
> I think this means that something is wrong with your authz configuration.
> Can you try to disable authz to see if it works without?
>
> Stefan
>

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Dec 21, 2010 at 04:25:55PM +0800, 谢带达 wrote:
> Thank you Stefan.
> 
> I start svnserve this way:
> 
> /local/svnroot/repository/one/conf/svnserve.conf
> [general]
> anon-access =
> auth-access = write
> password-db = passwd
> authz-db = authz
> /local/svnroot/repository/one/conf/authz
> [/]
> test = rw
> * =
> 
> /local/svnroot/repository/one/conf/passwd
> [users]
> test = test
> 
> And then I start svnserve with root account:
> /local/svnroot/subversion/bin/svnserve -d --listen-host 172.18.127.148
> --root /local/svnroot/repository
> 
> Yes I could connet to :
> svn://172.18.127.148/test
> svn://172.18.127.148/one
> 
> The problem is that it show "Item is not readble" when I try to show log via
> TSVN.
> The only difference between Repository one and Repository test is that the
> former is created with --pre-1.5-compatible but the latter not.
> 3 snaps are attached for your reference.

I think this means that something is wrong with your authz configuration.
Can you try to disable authz to see if it works without?

Stefan

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by 谢带达 <dd...@gmail.com>.
Thank you Stefan.

I start svnserve this way:

/local/svnroot/repository/one/conf/svnserve.conf
[general]
anon-access =
auth-access = write
password-db = passwd
authz-db = authz
/local/svnroot/repository/one/conf/authz
[/]
test = rw
* =

/local/svnroot/repository/one/conf/passwd
[users]
test = test

And then I start svnserve with root account:
/local/svnroot/subversion/bin/svnserve -d --listen-host 172.18.127.148
--root /local/svnroot/repository

Yes I could connet to :
svn://172.18.127.148/test
svn://172.18.127.148/one

The problem is that it show "Item is not readble" when I try to show log via
TSVN.
The only difference between Repository one and Repository test is that the
former is created with --pre-1.5-compatible but the latter not.
3 snaps are attached for your reference.



2010/12/20 Stefan Sperling <st...@elego.de>

> On Sun, Dec 19, 2010 at 11:03:16PM -0800, David wrote:
> > ./svnadmin create --pre-1.5-compatible /local/svnroot/repository/one
> > #start the ./subversion/bin/svnserve
>
> How did you really invoke svnserve? Did you pass any options?
>
> You need to tell svnserve where to find repositories.
> This is done with the --root option.
>
> > #configure ./one/conf/svnserve.conf, authz, passwd
> > svn://172.18.127.148/one
>
> svnserve in daemon mode can only listen on a single IP address.
> If you don't specify the address when you start svnserve, it asks
> the operating system for some address it can use. If the OS decides
> to return an IPv6 address (default on many systems these days),
> you won't be able to connect to svnserve via the IPv4 address.
> This is done with the --listen-host option.
>
> > It is ok to view logs via TortoiseSVN-->Show log
> >
> >
> > But:
> > ./svnadmin create /local/svnroot/repository/test
> > #configure ./one/conf/svnserve.conf, authz, passwd
> > svn://172.18.127.148/test
> > An error happen when i try to view logs via TortoiseSVN-->Show log
>
> Try something like this:
>
> svnserve --listen-host 172.18.127.148 --root /local/svn/root/repository
>
> You should now be able to connect to either repository.
>
> svn://172.18.127.148/one
>  svn://172.18.127.148/test
>
> Stefan
>

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by 谢带达 <dd...@gmail.com>.
Thank you Stefan.

I start svnserve this way:

/local/svnroot/repository/one/conf/svnserve.conf
[general]
anon-access =
auth-access = write
password-db = passwd
authz-db = authz
/local/svnroot/repository/one/conf/authz
[/]
test = rw
* =

/local/svnroot/repository/one/conf/passwd
[users]
test = test

And then I start svnserve with root account:
/local/svnroot/subversion/bin/svnserve -d --listen-host 172.18.127.148
--root /local/svnroot/repository

Yes I could connet to :
svn://172.18.127.148/test
svn://172.18.127.148/one

The problem is that it show "Item is not readble" when I try to show log via
TSVN.
The only difference between Repository one and Repository test is that the
former is created with --pre-1.5-compatible but the latter not.
3 snaps are attached for your reference.



2010/12/20 Stefan Sperling <st...@elego.de>

> On Sun, Dec 19, 2010 at 11:03:16PM -0800, David wrote:
> > ./svnadmin create --pre-1.5-compatible /local/svnroot/repository/one
> > #start the ./subversion/bin/svnserve
>
> How did you really invoke svnserve? Did you pass any options?
>
> You need to tell svnserve where to find repositories.
> This is done with the --root option.
>
> > #configure ./one/conf/svnserve.conf, authz, passwd
> > svn://172.18.127.148/one
>
> svnserve in daemon mode can only listen on a single IP address.
> If you don't specify the address when you start svnserve, it asks
> the operating system for some address it can use. If the OS decides
> to return an IPv6 address (default on many systems these days),
> you won't be able to connect to svnserve via the IPv4 address.
> This is done with the --listen-host option.
>
> > It is ok to view logs via TortoiseSVN-->Show log
> >
> >
> > But:
> > ./svnadmin create /local/svnroot/repository/test
> > #configure ./one/conf/svnserve.conf, authz, passwd
> > svn://172.18.127.148/test
> > An error happen when i try to view logs via TortoiseSVN-->Show log
>
> Try something like this:
>
> svnserve --listen-host 172.18.127.148 --root /local/svn/root/repository
>
> You should now be able to connect to either repository.
>
> svn://172.18.127.148/one
>  svn://172.18.127.148/test
>
> Stefan
>

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by Stefan Sperling <st...@elego.de>.
On Sun, Dec 19, 2010 at 11:03:16PM -0800, David wrote:
> ./svnadmin create --pre-1.5-compatible /local/svnroot/repository/one
> #start the ./subversion/bin/svnserve

How did you really invoke svnserve? Did you pass any options?

You need to tell svnserve where to find repositories.
This is done with the --root option.

> #configure ./one/conf/svnserve.conf, authz, passwd
> svn://172.18.127.148/one

svnserve in daemon mode can only listen on a single IP address.
If you don't specify the address when you start svnserve, it asks
the operating system for some address it can use. If the OS decides
to return an IPv6 address (default on many systems these days),
you won't be able to connect to svnserve via the IPv4 address.
This is done with the --listen-host option.

> It is ok to view logs via TortoiseSVN-->Show log
> 
> 
> But:
> ./svnadmin create /local/svnroot/repository/test
> #configure ./one/conf/svnserve.conf, authz, passwd
> svn://172.18.127.148/test
> An error happen when i try to view logs via TortoiseSVN-->Show log

Try something like this:

svnserve --listen-host 172.18.127.148 --root /local/svn/root/repository

You should now be able to connect to either repository.

svn://172.18.127.148/one
svn://172.18.127.148/test

Stefan

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by 谢带达 <dd...@gmail.com>.
Thank you Ryan.

I read the sections:
http://svnbook.red-bean.com/nightly/en/svn.serverconfig.multimethod.html
and
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication
The multiple access methods section seems not to help me to resolve my
question.
About the mirror repository, I will try it later. But for easy, I hope the
remote team and the local team could use the same repository. Thank you.

Regards,
David

2010/12/20 Ryan Schmidt <su...@ryandesign.com>

>
> On Dec 20, 2010, at 01:03, David wrote:
>
> > We use http:// for local team. Currently another team at another site
> > need to visit our repository to cooperate.
> > They complain about the slow speed of diff, merge and tag. So I want
> > to turn on svn:// for them while http:// for us.
> > It seems to be posibble, right?
>
> Certainly. Have you read the section of the book about supporting multiple
> access methods?
>
> http://svnbook.red-bean.com/nightly/en/svn.serverconfig.multimethod.html
>
>
> If speed is the concern, a different solution might be to give your remote
> team a local read-only mirror of your repository, with write-through
> proxying back to your main repository. You can read about repository
> replication here:
>
>
> http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication
>
>
>
>

Re: A problem trying to use svn:// and http:// for a same repository at the same time

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 20, 2010, at 01:03, David wrote:

> We use http:// for local team. Currently another team at another site
> need to visit our repository to cooperate.
> They complain about the slow speed of diff, merge and tag. So I want
> to turn on svn:// for them while http:// for us.
> It seems to be posibble, right?

Certainly. Have you read the section of the book about supporting multiple access methods?

http://svnbook.red-bean.com/nightly/en/svn.serverconfig.multimethod.html


If speed is the concern, a different solution might be to give your remote team a local read-only mirror of your repository, with write-through proxying back to your main repository. You can read about repository replication here:

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication