After emerging gentoo-rsync-mirror 1.0-r2 I tried to setup the rest of the configuration so I could locally mirror the portage tree. However, when trying to rsync my server with the gentoo servers, I would continually run into problems such as "connection unexpectedly closed", "error in file IO", and general timeouts. The reason for this seems to be that the file /etc/init.d/rsyncd is installed with: RSYNC_OPTS="--safe-links --compress --bwlimit=700 --timeout=1800" The option --compress is what I believe is causing the problem. After I removed this option from RSYNC_OPTS everything as been smooth as silk. Reproducible: Always Steps to Reproduce: 1. ACCEPT_KEYWORDS="~x86" emerge gentoo-rsync-mirror 2. /etc/init.d/rsyncd start 3. /opt/gentoo-rsync/./rsync-gentoo-portage.sh 4. Let this run for a bit -- notice it takes way too long or never finishes 5. cat rsync-gentoo-portage.sh.log and view errors Actual Results: The log file showed errors such as: "connection unexpectedly closed", "error in file IO", and general timeouts. Also, the time period required to sync the portage tree was much longer than necessary. Expected Results: The local portage tree mirror server should be synced with the official gentoo portage tree mirrors without any problems. bash-2.05b# emerge info Portage 2.0.49-r13-2 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r6, 2.4.20-gentoo- r7) ================================================================= System uname: 2.4.20-gentoo-r7 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer -fforce-addr -falign-func tions=4 -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi g /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer -fforce-addr -falign-fu nctions=4 -fprefetch-loop-arrays" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.gtlib.cc.ga tech.edu/pub/gentoo/ http://gentoo.oregonstate.edu/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="apm arts foomaticdb libg++ mad mikmod motif gdbm slang tcpd pam esd avi ber kdb cdr crypt cups curl dga directfb doc dvd encode fastcgi fbcon gd gdmb ggi gi f gpm gtk gtk2 guile imap imlib jpeg java ldap libwww mod mmx mpeg mpi nas ncurs es nls odbc oggvorbis opengl oss pdflib perl png python qt quicktime readline sa mba sasl sdl slp snmp spell sse ssl svga tcltk tiff truetype usb wmf X xml xml2 xmms xv zlib x86 -kde -gnome -3dnow"
I'm a bit confused...you're saying your local rsyncd.conf file is causing things to fail when you initiate an rsync connection to a remote server? In that case, the rsyncd.conf file on the remote server would be the controlling file -- your local rsyncd.conf file should have nothing to do with it. Just as a test, I ran the following command manually on my system: rsync -av --safe-links --compress --bwlimit=700 --timeout=1800 \ rsync://rsync.namerica.gentoo.org/gentoo-portage ./ And I'm using the gentoo-rsync-mirror ebuild as well, with the --compress option in my rsyncd.conf Closing as worksforme.
I think that you may have mis-read what I reported. The problem is not with the rsyncd.conf file, but rather with the rsyncd deamon in /etc/init.d/rsyncd The file is set with the RSYNC_OPTS to include --compress. This causes problems because when the deamon tries to sync with one of the official gentoo mirrors, it tries to compress an already compressed package, and this causes rsync to either stall or fail. Other people have had this same problem, and the solution is very easy (simply remove the --compress option from the deamon in the ebuild), here is a link to a post in the forum where this topic is discussed in detail. The problem I'm reporting is talked about at the bottom of page 1. http://forums.gentoo.org/viewtopic.php?t=59134&highlight=rsync+howto Once again, the problem is not in the /opt/gentoo-rsync/ script or the /etc/rsyncd/rsyncd.conf file, but rather in the deamon at /etc/init.d/rsyncd If you open this file, there is a line that says RSYNC_OPTS and by default it includes the --safe-links --bandwidth=700 --compress --timeout=1800 options. The --compress option causes the local server to stall when it tries to sync with one of the official gentoo rsync mirrors since it tries to compress an already compress package when retrieve it from the official mirror. If you have any questions, let me know. You can also check the forum thread above. Josh
rsyncd is the server daemon. It handles incoming connections. It has no bearing when you initiate an rsync connection from that box to another box. But just for posterity's sake, I installed the gentoo-rsync-mirror ebuild and started rsyncd using the default options. ps aux verified it was so: root 30299 0.0 0.0 1644 624 ? S 09:21 0:00 rsync --daemon --safe-links --compress --bwlimit=700 --timeout=1800 Then, I used the /opt/gentoo-rsync/rsync-gentoo-portage.sh script to successfully complete a full rsync with rsync1.us.gentoo.org: [snip] xfce-extra/xfwm4-themes/xfwm4-themes-4.0.0.ebuild wrote 850235 bytes read 28196872 bytes 201018.04 bytes/sec total size is 51272175 speedup is 1.77 so, this error is not reproducable.