rsync: failed to connect to x.x.x.x: Connection refused (111)
2013-09-16 16:28
225 查看
问题:
工作背景:1. 局域网内两台PC机,一台用作rsync服务器,一台用作rsync客户端,两者以C/S方式(即客户连接远程rsync 服务器,用户验证由rsync 服务器负责)而非远程shell方式(即用户验证由远程shell负责,shell一半使用ssh)进行文件同步;
2. rsync服务器端使用xinetd方式运行rsync服务,即使用/etc/xinetd.d/rsync作为配置文件,以service xinetd restart来启动服务;
3. 从客户端同步服务器端的文件时,出现错误如下:
u1204@u1204-zhw:~/wrk/tmp/tmp$ rsync -a root@192.168.1.144::web_backup/ . rsync: failed to connect to 192.168.1.144 (192.168.1.144): Connection refused (111) rsync error: error in socket IO (code 10) at clientserver.c(128) [Receiver=3.1.0pre1]
解决办法:
1. 该问题属于服务器端服务未启动所造成。检查rsync服务是否已经启动,
u1204@u1204-zhw:/tftpboot$ ps -ef | grep rsync
root 25509 1 0 15:02 ? 00:00:05 gvim /etc/rsyncd.conf
u1204 26629 5681 0 16:01 pts/5 00:00:00 grep --color=auto rsync
可以看到rsync服务并没有启动。
手动启动rsync服务,
u1204@u1204-zhw:/tftpboot$ sudo rsync --daemon
再次检查rsync服务是否启动,
u1204@u1204-zhw:/tftpboot$ ps -ef | grep rsync root 25509 1 0 15:02 ? 00:00:07 gvim /etc/rsyncd.conf root 26800 1 0 16:05 ? 00:00:00 rsync --daemon u1204 26824 5681 0 16:07 pts/5 00:00:00 grep --color=auto rsync
可以看到rsync服务已经启动了。
2. 从客户端重新进行文件同步操作。
# /usr/local/rsync -a root@192.168.1.144::web_backup . Password: # ls msg_info.txt hello.txt hello.cpp hello.c hello
可以看到服务器端的文件同步到本地目录了。
问题解决。
相关文章推荐
- rsync: failed to connect to x.x.x.x: Connection refused (111)
- connect() failed (111: Connection refused) while connecting to upstream
- connect() failed (111: Connection refused) while connecting to upstream的解决
- 问题:connect() failed (111: Connection refused) while connecting to upstream
- Nginx报错 connect() failed (111: Connection refused) while connecting to upstream 的解决方法
- connect() failed (111: Connection refused) while connecting to upstream
- [nginx] connect() failed (111: Connection refused) while connecting to upstream, client: 101.18.123.107, server: localhost,
- nginx 报错 connect() failed (111: Connection refused) while connecting to upstream
- 配置nginx.config 报错:connect() failed (111: Connection refused) while connecting to upstream解决
- 遇到问题----connect() failed (111: Connection refused) while connecting to upstream解决
- 遇到问题----connect() failed (111: Connection refused) while connecting to upstream解决
- windows7 下调试出现Failed to connect to remote VM. Connection refused 解决方案
- Failed to connect to remote VM. Connection refused. Connection refused: connect
- Launch error: Failed to connect to remote VM. Connection refused.的解决办法
- Failed to connect to socket /com/ubuntu/upstart: Connection refused: Errors were encountered while p
- rsync错误处理-failed to connect to 192.168.xxx.xxx: Connection refused (111)
- dbus/qt检测U盘:Failed to connect to socket。。。 system_bus_socket: Connection refused解决
- Failed to connect to remote VM. Connection refused. Connection refused: connect
- Caused by: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.
- Failed to connect to SDP server on FF:FF:FF:00:00:00: Connection refused问题解决方法