rsync: read error: Connection reset by peer (104)
Centos7 rsync守护进程上传文件失败
[root@nfs ~]# rsync -avz /etc rsync_backup@172.16.1.41::backup
sending incremental file list
rsync: read error: Connection reset by peer (104)
rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.2]
[root@backup ~]# systemctl status rsyncd
● rsyncd.service - fast remote file copy program daemon
Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-15 22:29:50 CST; 5min ago
Main PID: 1245 (rsync)
CGroup: /system.slice/rsyncd.service
└─1245 /usr/bin/rsync --daemon --no-detach
Jan 15 22:29:50 backup systemd[1]: Started fast remote file copy program daemon.
Jan 15 22:29:50 backup systemd[1]: Starting fast remote file copy program daemon...
Jan 15 22:29:50 backup rsyncd[1245]: rsyncd version 3.1.2 starting, listening on port 873
Jan 15 22:30:20 backup rsyncd[1252]: Global parameter port found in module section!
Jan 15 22:30:20 backup rsyncd[1252]: params.c:Parameter() - Ignoring badly formed line ...ors
Jan 15 22:30:30 backup rsyncd[1252]: name lookup failed for 172.16.1.31: Name or servic...own
Jan 15 22:30:30 backup rsyncd[1252]: connect from UNKNOWN (172.16.1.31)
Jan 15 22:30:30 backup rsyncd[1252]: rsync to backup/ from UNKNOWN (172.16.1.31)
Jan 15 22:30:30 backup rsyncd[1252]: ERROR: module is read only
Jan 15 22:30:30 backup rsyncd[1252]: rsync error: syntax or usage error (code 1) at mai....2]
Hint: Some lines were ellipsized, use -l to show in full.
后来尝试重新写配置文件,发现成功了
[root@backup ~]# vim /etc/rsyncd.conf
uid = rsync gid = rsync port = 873 fake super = yes use chroot = no max connections = 200 timeout = 600 ignore errors read only = false list = false auth users = rsync_backup secrets file = /etc/rsync.passwd log file = /var/log/rsyncd.log ##################################### [backup] comment = welcome to oldboyedu backup! path = /backup |