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
On Thu, 2008-11-13 at 10:29 +0100, Michael H?rtl wrote:> 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]You mean ip.of.rsync.server, right? Try manually running "nc -v ip.of.rsync.server 873" a few times and see if you get the same "Connection refused". If so, that means the rsync client is not at fault. On the server side, you could try setting up the daemon under inetd and see if you get the same result and whether inetd logs anything useful. You could even try "nc -l 873" on the server to see if the problem is purely with the network.> There's also nothing in the logs.I guess that would suggest that the daemon isn't seeing the incoming connection at all. Matt