Tuesday, December 15, 2015

rsync: failed to connect to 1.2.3.4: Connection refused (111)

If you encounter the following error:

$ rsync -avr 1.2.3.4::I/home/izeye/test/ .
rsync: failed to connect to 1.2.3.4: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]
$

checkout your rsync configuration as follows:

$ sudo vi /etc/xinetd.d/rsync

service rsync
{
        disable = yes
        flags           = IPv6
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
        log_on_failure  += USERID
}

and change `disable` from `yes` to `no`.

Restart the xinetd as follows:

$ sudo /etc/init.d/xinetd restart

As a side note, if you encounter the following error:

$ rsync -avr 1.2.3.4::I/home/izeye/test/ .
@ERROR: access denied to I from unknown (5.6.7.8)
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
$

checkout your `/etc/rsyncd.conf`, especially `hosts allow` and `hosts deny` values.

No comments:

Post a Comment