Intermittent connection failure

Michael Härtl rsynclist at m-h-it.de
Thu Nov 13 09:29:16 GMT 2008


Hi,

i have sporadic connection problems with my rsync server.

I have _no_ firewall involved and there is _no_ max connections set. 
rsync on the clients is started from cron via a bash script. There's 
also no permission problem. rsyncd runs as daemon (is not started from 
inetd).

It sometimes works, but every third or fourth rsync fails with this message:

rsync: failed to connect to ip.of.client.A: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(104) 
[sender=2.6.9]

There's also nothing in the logs.

Here some details from my setup:

rsync Server:
-------------

/etc/rsyncd.conf:
--------------------------------------------------------
pid file = /var/run/rsyncd.pid
use chroot = yes
read only = yes
log file = /var/log/rsync.log
[clienta]
     path = /opt/backup-a
     comment = Backup area for client A
     uid = root
     gid = root
     auth users = clienta
     hosts allow = ip.of.client.A
     read only = no
     list = yes
     secrets file = /etc/rsyncd.secrets

[clientb]
     path = /opt/backup-b
     comment = Backup area for client B
     uid = root
     gid = root
     auth users = clientb
     hosts allow = ip.of.clientB
     read only = no
     list = yes
     secrets file = /etc/rsyncd.secrets
--------------------------------------------------------


/etc/rsyncd.secrets
--------------------------------------------------------
clienta:y0fs...
clientb:xf03...
--------------------------------------------------------


Clients:
--------

/etc/backup-scripts/backup-clientA
(started from cron)
--------------------------------------------------------
#!/bin/bash

# Remote rsync info
REMOTE_SERVER=ip.of.rsync.server
REMOTE_USER=clienta
REMOTE_MODULE=clienta
REMOTE_PWFILE=/etc/backup-scripts/backup.secrets

RSYNC="/usr/bin/rsync -avzqR --del --password-file=${REMOTE_PWFILE}"
export PATH=/usr/bin:/bin:/usr/sbin:/sbin

RSYNC_REMOTE="${REMOTE_USER}@${REMOTE_SERVER}::${REMOTE_MODULE}"

# rsync /www
if ! ${RSYNC} /www ${RSYNC_REMOTE} ; then
     echo "Error when trying to sync /www"
     exit 2;
fi
# ... more rsyncs...
--------------------------------------------------------


/etc/backup-scripts/backup.secrets
--------------------------------------------------------
y0fs...
--------------------------------------------------------


Any help is appreciated.

Thanks!
Mike


More information about the rsync mailing list