setting up svn server - Connection refused

Rob Farmer rfarmer at
Fri Feb 25 17:56:33 UTC 2011

On Fri, Feb 25, 2011 at 1:23 AM, Anton Shterenlikht <mexas at> wrote:
> I'm learning how to set up svn server.
> I've read through several sections of
> Here's what I do:
> ZEEV> svnadmin create /home/mexas/zzz
> ZEEV> svnlook info zzz
> 2011-02-25 09:15:28 +0000 (Fri, 25 Feb 2011)
> 0
> ZEEV> svnserve -d
> ZEEV> ps ax | grep svnserve
> 66952  ??  Ss     0:00.01 /usr/local/bin/svnserve.bin -d
> ZEEV> mkdir /home/mexas/
> ZEEV> cd /home/mexas/
> When I try to connect to the svn server, I get this:
> ZEEV> svn co svn://localhost/home/mexas/zzz .
> svn: Can't connect to host 'localhost': Network is unreachable
> ZEEV> svn co svn:// .
> svn: Can't connect to host '': Connection refused
> ZEEV> ifconfig em1
> em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>        ether 00:13:21:5b:05:1d
>        inet netmask 0xffffff00 broadcast
>        inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5
>        media: Ethernet autoselect (100baseTX <full-duplex>)
>        status: active
> I get exactly the same "Connection refused" if I
> connect from another host.
> I turned the firewall off completely.
> What could be the problems?

>From the rc script (which would probably be better than starting it manually):

# Note:
# svnserve bind per default at the ipv6 address!
# If you want svnserve binding at ipv4 address, you have
# to use option 'svnserve_flags' with --listen-host parameter

Have you tried something like this in rc.conf:
svnserve_flags="-d --listen-port=3690 --listen-host"

Also check the other variables in that file - you need to specify
where the repo is (-r), the user to run as, etc.

svn+ssh avoids all of this because there is no sever - it just
executes svn in the user's ssh session and manipulate the repo's files
directly (this allows users to accidentally or intentionally trash up
the repo, so svnserve is safer if you don't fully trust all your
committers. Plus you have to watch for permission and umask issues
with svn+ssh).

Rob Farmer

More information about the freebsd-questions mailing list