Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 09:56:29AM -0800, Rob Farmer wrote: > > > > 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 Rob, thank you Anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 1:23 AM, Anton Shterenlikht wrote: > I'm learning how to set up svn server. > I've read through several sections of > http://svnbook.red-bean.com/nightly/en/ > > Here's what I do: > > ZEEV> svnadmin create /home/mexas/zzz > ZEEV> svnlook info zzz > > 2011-02-25 09:15:28 + (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/zzz.work > ZEEV> cd /home/mexas/zzz.work/ > > 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://10.10.10.14/home/mexas/zzz . > svn: Can't connect to host '10.10.10.14': Connection refused > > ZEEV> ifconfig em1 > em1: flags=8843 metric 0 mtu 1500 > > options=209b > ether 00:13:21:5b:05:1d > inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 > inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 > nd6 options=29 > media: Ethernet autoselect (100baseTX ) > status: active > ZEEV> > > 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 1.2.3.4" 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 09:59:54AM -0500, Greg Larkin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2/25/11 9:32 AM, Anton Shterenlikht wrote: > [...] > > > > > > Many thanks for your help, Greg. > > > > However, following David Kelly's advice, > > I switched to svn+ssh, and that seems > > to work fine. Nevertheless, I'm curious > > to find out why svnserve is not working > > as expected. > > > > Anton > > > > Hi Anton, > > Frank Shute mentioned /etc/hosts.allow in his reply. Is there anything > in that file that prevents the connection to TCP port 3690? not sure, here it is: # # hosts.allow access control file for "tcp wrapped" applications. # $FreeBSD: head/etc/hosts.allow 161710 2006-08-29 09:20:48Z ru $ # # NOTE: The hosts.deny file is deprecated. # Place both 'allow' and 'deny' rules in the hosts.allow file. # See hosts_options(5) for the format of this file. # hosts_access(5) no longer fully applies. # Protect against simple DNS spoofing attacks by checking that the # forward and reverse records for the remote host match. If a mismatch # occurs, access is denied, and any positive ident response within # 20 seconds is logged. No protection is afforded against DNS poisoning, # IP spoofing or more complicated attacks. Hosts with no reverse DNS # pass this rule. ALL : PARANOID : RFC931 20 : deny # Allow anything from localhost. Note that an IP address (not a host # name) *MUST* be specified for rpcbind(8). ALL : localhost 127.0.0.1 : allow # Comment out next line if you build libwrap without IPv6 support. ALL : [::1] : allow #ALL : my.machine.example.com 192.0.2.35 : allow # To use IPv6 addresses you must enclose them in []'s #ALL : [fe80::%fxp0]/10 : allow #ALL : [fe80::]/10 : deny #ALL : [2001:db8:2:1:2:3:4:3fe1] : deny #ALL : [2001:db8:2:1::]/64 : allow # Sendmail can help protect you against spammers and relay-rapers sendmail : localhost : allow #sendmail : .nice.guy.example.com : allow #sendmail : .evil.cracker.example.com : deny sendmail : ALL : allow # Rpcbind is used for all RPC services; protect your NFS! # (IP addresses rather than hostnames *MUST* be used here) #rpcbind : 192.0.2.32/255.255.255.224 : allow #rpcbind : 192.0.2.96/255.255.255.224 : allow rpcbind : ALL : deny # NIS master server. Only local nets should have access # (Since this is an RPC service, rpcbind needs to be considered) ypserv : localhost : allow #ypserv : .unsafe.my.net.example.com : deny #ypserv : .my.net.example.com : allow ypserv : ALL : deny # sshd : ALL : allow svn : ALL : allow # allow all access from TZAV and pointyhat.freebsd.org ALL : 137.222.187.241 : allow ALL : 69.147.83.43 : allow ALL : 10.10.10.31 : allow # The rest of the daemons are protected. ALL : ALL \ : severity auth.info \ : twist /bin/echo "You are not welcome to use %d from %h." > > Otherwise, I didn't see anything in the output of your commands that > indicate a problem. When I have a problem like this, I often run the > failing command under truss(1) or strace to help me determine why a > connection fails or a file cannot be opened. That may help, but I'm > glad svn+ssh:// is working in the mean time. Ok, I might try to learn how to use this tool.. Many thanks Anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/25/11 9:32 AM, Anton Shterenlikht wrote: [...] > > > Many thanks for your help, Greg. > > However, following David Kelly's advice, > I switched to svn+ssh, and that seems > to work fine. Nevertheless, I'm curious > to find out why svnserve is not working > as expected. > > Anton > Hi Anton, Frank Shute mentioned /etc/hosts.allow in his reply. Is there anything in that file that prevents the connection to TCP port 3690? Otherwise, I didn't see anything in the output of your commands that indicate a problem. When I have a problem like this, I often run the failing command under truss(1) or strace to help me determine why a connection fails or a file cannot be opened. That may help, but I'm glad svn+ssh:// is working in the mean time. Cheers, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1nw+oACgkQ0sRouByUApBfeACeJtju9Tif9Rsxv5DEnO710xnq 1nwAoMH/ECMlKOdJ6NYawQJozohp50yJ =7DbG -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 07:09:04AM -0600, David Kelly wrote: > > On Feb 25, 2011, at 3:23 AM, Anton Shterenlikht wrote: > > > 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://10.10.10.14/home/mexas/zzz . > > svn: Can't connect to host '10.10.10.14': Connection refused > > Forget the SVN server daemon its much easier to use svn+ssh:// than svn:// Yes, it is much simpler, and works ok. Many thanks Anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 09:23:03AM +, Anton Shterenlikht wrote: > > I'm learning how to set up svn server. > I've read through several sections of > http://svnbook.red-bean.com/nightly/en/ > > Here's what I do: > > ZEEV> svnadmin create /home/mexas/zzz > ZEEV> svnlook info zzz > > 2011-02-25 09:15:28 + (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/zzz.work > ZEEV> cd /home/mexas/zzz.work/ > > 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 This sounds like it's a problem with your routing table. Does: $ netstat -r show a destination of localhost? $ ping localhost is useful. > ZEEV> svn co svn://10.10.10.14/home/mexas/zzz . > svn: Can't connect to host '10.10.10.14': Connection refused That's more hopeful. Don't know what's wrong though! > > ZEEV> ifconfig em1 > em1: flags=8843 metric 0 mtu 1500 > > options=209b > ether 00:13:21:5b:05:1d > inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 > inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 > nd6 options=29 > media: Ethernet autoselect (100baseTX ) > status: active > ZEEV> > > I get exactly the same "Connection refused" if I > connect from another host. > > I turned the firewall off completely. > > What could be the problems? > It was a few years ago that I setup my svn repository and I referenced the book you're using too. I launch it out of inetd.conf. I've got the line: svn stream tcp nowait frank /usr/local/bin/svnserve svnserve -i in there. Fixed hosts.allow to only allow machines on the lan to connect and it works well. Sorry I can't be more helpful but a different approach to running a daemon permanently is probably a good idea. Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html pgp5ZZz4D6JBu.pgp Description: PGP signature
Re: setting up svn server - Connection refused
On Fri, Feb 25, 2011 at 09:15:30AM -0500, Greg Larkin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2/25/11 4:23 AM, Anton Shterenlikht wrote: > > I'm learning how to set up svn server. > > I've read through several sections of > > http://svnbook.red-bean.com/nightly/en/ > > > > Here's what I do: > > > > ZEEV> svnadmin create /home/mexas/zzz > > ZEEV> svnlook info zzz > > > > 2011-02-25 09:15:28 + (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/zzz.work > > ZEEV> cd /home/mexas/zzz.work/ > > > > 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://10.10.10.14/home/mexas/zzz . > > svn: Can't connect to host '10.10.10.14': Connection refused > > > > ZEEV> ifconfig em1 > > em1: flags=8843 metric 0 mtu 1500 > > > > options=209b > > ether 00:13:21:5b:05:1d > > inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 > > inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 > > nd6 options=29 > > media: Ethernet autoselect (100baseTX ) > > status: active > > ZEEV> > > > > I get exactly the same "Connection refused" if I > > connect from another host. > > > > I turned the firewall off completely. > > > > What could be the problems? > > > > Many thanks > > Anton > > > > Hi Anton, > > The first place that I'd start is checking if the TCP port for svnserve > is listening for connections: > > netstat -an | grep 3690 # svnserve -d # netstat -an | grep 3690 tcp6 0 0 *.3690 *.*LISTEN # > If it isn't, then something is not working correctly when svnserve > starts in daemon mode. If it is listening, then something is still > blocking the connection from your svn client to the TCP port. > > The fact that you're getting a "localhost: Network is unreachable" error > is strange. What is the output of "/sbin/ifconfig -a" and "netstat -rn"? # /sbin/ifconfig -a em0: flags=8843 metric 0 mtu 1500 options=209b ether 00:13:21:5b:05:1c inet 137.222.187.28 netmask 0xff00 broadcast 137.222.187.255 inet6 fe80::213:21ff:fe5b:51c%em0 prefixlen 64 scopeid 0x4 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8843 metric 0 mtu 1500 options=209b ether 00:13:21:5b:05:1d inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 nd6 options=29 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff00 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 nd6 options=21 # # netstat -rn Routing tables Internet: DestinationGatewayFlagsRefs Use Netif Expire default137.222.187.250UGS 0 697em0 10.10.10.0/24 link#5 U 00em1 10.10.10.14link#5 UHS 00lo0 127.0.0.1 link#6 UH 0 44lo0 137.222.187.0/24 link#4 U 1 338em0 137.222.187.28 link#4 UHS 00lo0 Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRSlo0 ::1 ::1 UH lo0 :::0.0.0.0/96 ::1 UGRSlo0 fe80::/10 ::1 UGRSlo0 fe80::%em0/64 link#4U em0 fe80::213:21ff:fe5b:51c%em0 link#4UHS lo0 fe80::%em1/64 link#5U em1 fe80::213:21ff:fe5b:51d%em1 link#5UHS lo0 fe80::%lo0/64 link#6U lo0 fe80::1%lo0 link#6UHS lo0 ff01:4::/32 fe80::213:21ff:fe5b:51c%em0 U em0 ff01:5::/32 fe80::213:21ff:fe5b:51d%em1 U em1 ff01:6::/32 ::1 U lo0 ff02::/16 ::1 UGRSlo0 ff02::%em0/32 fe80::213:21ff:fe5b:51c%em0 U em0 ff02::%em1/32 fe80::213:21ff:fe5b:51d%em1 U em1 ff02::%lo0/32 ::1
Re: setting up svn server - Connection refused
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/25/11 4:23 AM, Anton Shterenlikht wrote: > I'm learning how to set up svn server. > I've read through several sections of > http://svnbook.red-bean.com/nightly/en/ > > Here's what I do: > > ZEEV> svnadmin create /home/mexas/zzz > ZEEV> svnlook info zzz > > 2011-02-25 09:15:28 + (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/zzz.work > ZEEV> cd /home/mexas/zzz.work/ > > 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://10.10.10.14/home/mexas/zzz . > svn: Can't connect to host '10.10.10.14': Connection refused > > ZEEV> ifconfig em1 > em1: flags=8843 metric 0 mtu 1500 > > options=209b > ether 00:13:21:5b:05:1d > inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 > inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 > nd6 options=29 > media: Ethernet autoselect (100baseTX ) > status: active > ZEEV> > > I get exactly the same "Connection refused" if I > connect from another host. > > I turned the firewall off completely. > > What could be the problems? > > Many thanks > Anton > Hi Anton, The first place that I'd start is checking if the TCP port for svnserve is listening for connections: netstat -an | grep 3690 If it isn't, then something is not working correctly when svnserve starts in daemon mode. If it is listening, then something is still blocking the connection from your svn client to the TCP port. The fact that you're getting a "localhost: Network is unreachable" error is strange. What is the output of "/sbin/ifconfig -a" and "netstat -rn"? Regards, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1nuYIACgkQ0sRouByUApAhIACeOBk9/CGcoj3rsg49P97u8ql3 LnYAoMTjq71cLafJi/NACTU4gIsB2VOE =XTJF -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: setting up svn server - Connection refused
On Feb 25, 2011, at 3:23 AM, Anton Shterenlikht wrote: > 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://10.10.10.14/home/mexas/zzz . > svn: Can't connect to host '10.10.10.14': Connection refused Forget the SVN server daemon its much easier to use svn+ssh:// than svn:// -- David Kelly N4HHE, dke...@hiwaay.net Whom computers would destroy, they must first drive mad. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
setting up svn server - Connection refused
I'm learning how to set up svn server. I've read through several sections of http://svnbook.red-bean.com/nightly/en/ Here's what I do: ZEEV> svnadmin create /home/mexas/zzz ZEEV> svnlook info zzz 2011-02-25 09:15:28 + (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/zzz.work ZEEV> cd /home/mexas/zzz.work/ 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://10.10.10.14/home/mexas/zzz . svn: Can't connect to host '10.10.10.14': Connection refused ZEEV> ifconfig em1 em1: flags=8843 metric 0 mtu 1500 options=209b ether 00:13:21:5b:05:1d inet 10.10.10.14 netmask 0xff00 broadcast 10.10.10.255 inet6 fe80::213:21ff:fe5b:51d%em1 prefixlen 64 scopeid 0x5 nd6 options=29 media: Ethernet autoselect (100baseTX ) status: active ZEEV> I get exactly the same "Connection refused" if I connect from another host. I turned the firewall off completely. What could be the problems? Many thanks Anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"