05.04 Rsync Service Exception Error Summary

Chapter 1 iptables firewall opened by rsync server

1. [Client error]

No route to host

2. [Error Demonstration Process]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
rsync: failed to connect to 172.16.1.41: No route to host (113)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]

3. [Abnormal problem solving]
Close the rsync server-side firewall services (iptables)

[root@backup mnt]# /etc/init.d/iptables stop
   iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
   iptables: Flushing firewall rules:                         [  OK  ]
   iptables: Unloading modules:                               [  OK  ]
   [root@backup mnt]# /etc/init.d/iptables status
   iptables: Firewall is not running.

Chapter 2 Errors in rsync Client Executing rsync Command

1. [Client error]

   [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::/backup
   ERROR: The remote path must start with a module name not a /
   rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

2. [Abnormal problem solving]

Rsync command grammar understanding error,:/ backup is the wrong grammar, should be:: backup(rsync module)

Chapter 3 @ERROR: auth failed on module oldboy

1. [Client error]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
Password: 
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

2. [Abnormal problem solving]

1. The password is typed incorrectly and the username is typed incorrectly.
2. Secs file =/etc/rsync.password specifies a password file with an inconsistent name with the actual password file
 3. /etc/rsync.password file permissions are not 600
 4. Be careful not to have spaces behind rsync_backup: 123456 password profile
 5. rsync client password file can only enter password information, do not enter virtual authentication user name

Chapter 4 Unknown module'backup'

1. [Client error]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
@ERROR: Unknown module 'backup'
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

2. [Abnormal problem solving]

1. /etc/rsyncd.conf configuration file module name writing error

Chapter V Permission denied

1. [Client error]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
Password: 
sending incremental file list
hosts
rsync: mkstemp ".hosts.5z3AOA" (in backup) failed: Permission denied (13)

sent 196 bytes  received 27 bytes  63.71 bytes/sec
total size is 349  speedup is 1.57
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

2. [Abnormal problem solving]

   1. The owner and group of shared directories are incorrect, not rsync
   2. Shared directory permissions are incorrect, not 755

Chapter 6 chdir failed

1. [Client error]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
Password: 
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

2. [Abnormal problem solving]

    1. Backup storage directory not established
    2. Definitions of backup storage directories and configuration files are inconsistent
    Note: If there is no backup storage directory

Chapter 7 invalid uid rsync

1. [Client error]

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
Password: 
@ERROR: invalid uid rsync
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

2. [Abnormal problem solving]

rsync service corresponding to rsync virtual user does not exist

Chapter 8 Client has configured the password file, but the secret-free key login mode still needs to enter the password.

1. [Client error]

password file must not be other-accessible
[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup --password-file=/etc/rsync.password
password file must not be other-accessible
continuing without password file
Password: 
sending incremental file list

sent 26 bytes  received 8 bytes  5.23 bytes/sec
total size is 349  speedup is 10.26

2. [Abnormal problem solving]

The rsync client's secret key file must also be 600 privileges

Chapter 9 The Slow Connection of rsync Client

1. [Error log output]

2017/03/08 20:14:43 [3422] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
2017/03/08 20:14:43 [3422] name lookup failed for 172.16.1.31: Name or service not known
2017/03/08 20:14:43 [3422] connect from UNKNOWN (172.16.1.31)
2017/03/08 20:14:43 [3422] rsync to backup/ from rsync_backup@unknown (172.16.1.31)
2017/03/08 20:14:43 [3422] receiving file list
2017/03/08 20:14:43 [3422] sent 76 bytes  received 83 bytes  total size 349

2. [Correct log output]

2017/03/08 20:16:45 [3443] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors
2017/03/08 20:16:45 [3443] connect from nfs02 (172.16.1.31)
2017/03/08 20:16:45 [3443] rsync to backup/ from rsync_backup@nfs02 (172.16.1.31)
2017/03/08 20:16:45 [3443] receiving file list
2017/03/08 20:16:45 [3443] sent 76 bytes  received 83 bytes  total size 349

3. [Abnormal problem solving]

    View logs for analysis

Chapter 10: rsync service did not start correctly

1. [Client error]

Connection refused (111)
[root@oldboy-muban ~]#  rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
rsync: failed to connect to 172.16.1.41: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]

2. [rsync service not opened]

[root@oldboy-muban ~]# rsync --daemon
[root@oldboy-muban ~]# ss -lntup |grep rsync
tcp    LISTEN     0      5                     :::873                  :::*      users:(("rsync",1434,5))
tcp    LISTEN     0      5                      *:873                   *:*      users:(("rsync",1434,4))
[root@oldboy-muban ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup
Password: 
sending incremental file list
hosts

sent 196 bytes  received 27 bytes  49.56 bytes/sec
total size is 349  speedup is 1.57

Tags: rsync iptables firewall socket

Posted on Thu, 13 Jun 2019 17:13:20 -0700 by Petty_Crim