Rsync服务器搭建遇到的报错解决办法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Rsync服务器搭建遇到的报错解决办法相关的知识,希望对你有一定的参考价值。

遇到错误1

[[email protected] tmp]# rsync -avz /etc/hosts -e 'ssh -p 22' [email protected]:/tmp/

rsync: Failed to exec ssh: No such file or directory (2)

rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

从网上找打解决方法讲是没有安装openssh客户端,然后安装尝试一下

[[email protected] tmp]# yum -y install openssh-clients.x86_64

安装完成之后有执行一次,发现错误提示变了,说明刚才那个错误已解决然后开始解决新的报错问题

从本地服务器上推送文件到172.16.1.5这台服务器上,发现一直提示这个错误信息。然后在网上找各种解决方法,最终得以解决。

[[email protected]backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' [email protected]:/tmp/

[email protected]'s password:

bash: rsync: command not found

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

造成这种原因是因为172.16.1.5这台服务上没有安装rsync这个软件包,安装后得以解决

[[email protected]backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' [email protected]:/tmp/

[email protected]'s password:

sending incremental file list

hosts

sent 124 bytes  received 31 bytes  62.00 bytes/sec

total size is 158  speedup is 1.02

[[email protected]lb01 tmp]# ifconfig eth1| awk -F "[ :]+" 'NR==2 {print $4}'

172.16.1.5

[[email protected]lb01 tmp]# ls /tmp/

hosts

 

对端没有配置文件里面的目录不存在

[[email protected] sh]# rsync -avz /backup/ [email protected]::backup/ --password-file\=/etc/rsync.password

@ERROR: chdir failed

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

对端配置文件里面的目录存在,但是权限被拒绝

[[email protected] sh]# rsync -avz /backup/ [email protected]::backup/ --password-file\=/etc/rsync.password

sending incremental file list

./

rsync: failed to set times on "." (in backup): Operation not permitted (1)

1/

rsync: recv_generator: mkdir "1" (in backup) failed: Permission denied (13)

*** Skipping any contents from this failed directory ***

sent 46 bytes  received 15 bytes  122.00 bytes/sec

total size is 0  speedup is 0.00

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

 

模块名称错误

[[email protected] sh]# rsync -avz /backup/ [email protected]::baskup/ --password-file\=/etc/rsync.password

@ERROR: Unknown module 'baskup'

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

 

服务端虚拟用户不存在

[[email protected] sh]# rsync -az /backup/ [email protected]::backup/ --password-file\=/etc/rsync.password

@ERROR: invalid uid rsync

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

 

服务端没有backup模块里面的密码文件,客户端和服务端的密码文件密码不一致

[[email protected] sh]# rsync -az /backup/ [email protected]::backup/ --password-file\=/etc/rsync.password

@ERROR: auth failed on module backup

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

 

在传输的时候远程模块名称前面多写了一个“/

[[email protected] /]# rsync -avz /tmp/  [email protected]::/backup/ --password-file\=/etc/rsync.password              

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]


以上是关于Rsync服务器搭建遇到的报错解决办法的主要内容,如果未能解决你的问题,请参考以下文章

rsync同步遇到的报错和解决办法

解决搭建官方openstack时遇到的服务器报错Internal Server Error 返回状态500The server encountered an internal error

配置vsftpd的遇到的坑及搭建虚拟账户

zabbix   监控平台搭建过程中的报错与解决方法总结

zabbix   监控平台搭建过程中的报错与解决方法总结

20170514002Oracle 11g R2安装过程中遇到的报错及解决办法