Gentoo: “rsync: didn’t get server startup line” bei emerge –sync

Wir betreiben einen gentoo portage mirror für unsere Server in den vier Rechenzentren. Nach dem letzten world update funktioniert emerge –sync auf keinem Server mehr.

Beispiele:

[...]
TASK [emerge --sync] **********************************************************************************************************************************************************************************************
fatal: [t-001-0017.int.iteres.com]: FAILED! => {"changed": false, "msg": "could not sync package repositories"}
[...]
s-001-0006 ~ # emerge --sync                                                              
rsync: didn't get server startup line      
rsync error: error starting client-server protocol (code 5) at main.c(1777) [Receiver=3.2.0]
>>> Retrying...                
!!! Exhausted addresses for 10.10.100.10

Die Datei /etc/rsyncd.conf hat folgenden Inhalt:

 /etc/rsyncd.conf

# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help

# This line is required by the /etc/init.d/rsyncd script
pid file = /run/rsyncd.pid
use chroot = yes
read only = yes

# Simple example for enabling your own local rsync server
#[gentoo-portage]
#       path = /var/db/repos/gentoo
#       comment = Gentoo ebuild repository
#       exclude = /distfiles /packages

uid = nobody
gid = nobody
max connections = 90
motd file = /etc/rsync/rsyncd.motd
transfer logging = yes
syslog facility = local3
timeout = 300
hosts allow = 10.10.0.0/16
hosts deny  = *

[gentoo-portage]
path = /var/rsync/gentoo
comment = Gentoo Linux Portage tree mirror
exclude = distfiles

In unserem Fall war die folgende Zeile problematisch:

transfer logging = yes

Auf die Schnelle habe ich nicht herausgefunden, wo das Problem beim eingeschalteten transfer logging genau liegt, daher habe ich es als workaround abgeschaltet.

Falls Du also über dieses Problem stolperst, geh’ mal deine rsyncd.conf Zeile für Zeile durch…

Nachtrag: Das scheint tatsächlich ein Bug in rsync 3.2.0 und 3.2.1 zu sein: https://git.samba.org/rsync.git/?p=rsync.git;a=commitdiff;h=317beebef8b0f60eb36255b35cbea71c84f6ac38

Die Lösung ist, das log format vorzugeben:

transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3

Vielleicht hilft es ja jemandem…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.