Old boy Education Daily-March 20, 2017: Use the rsync daemon mode, often the exception description, and explain how to resolve

Source: Internet
Author: User
Tags file permissions rsync

The Rsync Service FAQ Summary explains:

==================================

    • Iptables firewall enabled by Rsync server

client-side error behavior: No Route to host

[Email protected]]# rsync-avz/etc/hosts [email protected]::backup rsync:failed to connect to 172.16.1.41:no route to Host (113) Rsyncerror:error in socket IO (code ten) at CLIENTSERVER.C (124) [sender=3.0.6]

exception Problem Resolution:

Turn off The Firewall service on the rsync server (iptables)

[[email protected] mnt]#/etc/init.d/iptables stop iptables:setting chains to Policy accept:filter [OK] I                              ptables:flushing firewall rules: [OK] iptables:unloading modules:  [OK] [Email protected] mnt]#/etc/init.d/iptables status Iptables:firewall is not running.

    • Rsync Client performs rsync command error:

client-side error behavior:

[Email protected] tmp]# rsync-avz/etc/hosts [email protected]::/backuperror:theremote path must start with a module NA Me not A/rsyncerror:error starting Client-server Protocol (code 5) at MAIN.C (1503) [sender=3.0.6]

exception Problem Resolution:

The rsync command syntax understands the error::/backup is the wrong syntax and should be :: Backup (rsync module )

    • @ERROR: Auth failed on module Oldboy

client-side error behavior:

[Email protected] tmp]# rsync-avz/etc/hosts [email protected]::backuppassword: @ERROR: Auth failed on module Backuprsync Error:error starting Client-server Protocol (code 5) at MAIN.C (1503) [sender=3.0.6]

exception Problem Resolution:

1. password really input error, user name is really wrong

2.secrets file =/etc/rsync.password The specified password and actual password file names are inconsistent

3./etc/rsync.password file permissions are not 600

4.rsync_backup:123456 Password Profile Note that there are no spaces behind it

5.rsync Client password file only enter the password information, do not enter the virtual authentication user name

    • Unknown module ' backup '

[[email protected] tmp]# rsync-avz/etc/[email protected]::backup@error:unknown module ' backup ' rsync error:error starti NG Client-server Protocol (code 5) at MAIN.C (1503) [sender=3.0.6]

exception Problem Resolution:

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

    • Permission denied

[Email protected] tmp]# rsync-avz/etc/[email protected]::backuppassword:sending incremental file Listhostsrsync: Mkstemp ". Hosts.5z3aoa" (inbackup) Failed:permission denied (all sent 196 bytes received) bytes 63.71 bytes/sectotal s Ize is 349 speedup are 1.57rsync error:some files/attrs were not transferred (see previous errors) (code) at MAIN.C (1039 ) [sender=3.0.6]

exception Problem Resolution:

1. the owner and owner group of the shared directory is incorrect, not rsync

2. the permissions of the shared directory are incorrect, not 755

    • ChDir failed

[Email protected] tmp]# rsync-avz/etc/[email Protected]::backuppassword: @ERROR: chdir failedrsync error:error Startin G Client-server Protocol (code 5) at MAIN.C (1503) [sender=3.0.6]

exception Problem Resolution:

1. Backup Storage directory not established

2. inconsistent backup storage directory and configuration file definitions established

[[email protected]]# /etc/init.d/xinetd restartshell-init: error retrieving  current directory:getcwd: cannot access parent directories: no such  file or directorystopping xinetd:                                            [  OK   ]STARTING XINETD: SHELL-INIT: ERROR RETRIEVINGCURRENT DIRECTORY: GETCWD:  cannot access parent directories: No such file ordirectory                                                             [  ok   ]

Description: If there is no backup storage directory, thexinetd service will not start correctly

    • Invalid UID rsync

[Email protected] tmp]# rsync-avz/etc/[email Protected]::backuppassword: @ERROR: Invalid UID rsyncrsync error:error STA Rting Client-server Protocol (code 5) at MAIN.C (1503) [sender=3.0.6]

exception Problem Resolution:

rsync service corresponds to rsync virtual user does not exist

    • The client has configured the password file, but the secret key login method, still need to enter the password

Passwordfile must not being other-accessible[[email protected] tmp]# rsync-avz/etc/[email protected]::backup--password-fi Le=/etc/rsync.passwordpassword file must not being other-accessiblecontinuing without password filepassword:sending Incremental file list sent bytes received 8 bytes 5.23 bytes/sectotal size is 349 speedup is 10.26

exception Problem Resolution:

The Rsync client's secret key file must also be a privilege

    • rsync Client Connection slow problem

Error log output

2017/03/08 20:14:43 [3422] Params.c:parameter ()-ignoring badly formed line in configuration File:ignore errors

2017/03/0820: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/[email protected] (172.16.1.31) 2017/03/08 20:14:43 [3422] Receiving file list2017/03/08 20:14:43 [3422] sent bytes received bytes to Tal size 349

Correct log output

2017/03/08 20:16:45 [3443] Params.c:parameter ()-ignoring badly formed line in configuration File:ignore errors2017/03/08 20:16:45 [3443] Connect from NFS02 (172.16.1.31) 2017/03/08 20:16:45 [3443] rsync to backup/[email protected] (172.16.1.31 ) 2017/03/08 20:16:45 [3443] Receiving file list2017/03/08 20:16:45 [3443] Sent (bytes received) bytes Total size 349

exception Problem Resolution:

View logs for analysis

    • Rsync Service does not start correctly

Connection refused (111) [[email protected] ~]# Rsync-avz/etc/[email protected]::backuprsync:failed to connect to 172.1 6.1.41:connectionrefused (111) rsync error:error in Socket IO (code) ATCLIENTSERVER.C (124) [sender=3.0.6]

fix rsync service not turned on

[[Email protected] ~]# rsync --daemon[[email protected] ~]# ss -lntup  |grep rsynctcp   LISTEN     0       5                      :::873                   :::*       users: (("rsync", 1434,5) tcp    LISTEN     0      5                       *:873                     *:*       users: (("rsync", 1434,4) [[email protected] ~]#  rsync -avz /etc/[email protected]::backuppassword:sending incremental file listhosts sent 196  bytes received 27 bytes  49.56 bytes/sectotal size is 349  speedup is 1.57


This article is from the "Lee blog" blog, make sure to keep this source http://lidao.blog.51cto.com/3388056/1914588

Old boy Education Daily-March 20, 2017: Use the rsync daemon mode, often the exception description, and explain how to resolve

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.