rsync bind failed (Address already in use)故障处理

rsync bind failed (Address already in use)故障处理:

故障现象描述:

在客户端进行同步时,报错:
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [receiver=3.0.4]

登录rsync服务器,查看日志,发现错误信息如下 :
Nov  2 09:07:01 localhost xinetd: xinetd shutdown succeeded
Nov  2 09:07:01 localhost xinetd[5115]: bind failed (Address already in use (errno = 98)). service = rsync
Nov  2 09:07:01 localhost xinetd[5115]: Service rsync failed to start and is deactivated.
Nov  2 09:07:01 localhost xinetd[5115]: xinetd Version 2.3.13 started with libwrap loadavg options compiled in.
Nov  2 09:07:01 localhost xinetd[5115]: Started working: 0 available services

以上信息表明,有其它的程度占用了873端口,致使rsync服务无法启动.

1.把相关的进程都杀掉,现次用netstat -na命令查看,发现服务器还有进程在监听873端口。如果把rsyncr的服务端口修改,服务可以正常启动并提供服务(修改/etc/xinetd.d/rsync,增加一行:port = 8888 并修改/etc/services中有关rsync两个的配置,将873改为8888)

2.后来用命令netstat -nlp --ip查看到底是什么进程占用了873端口,发现:
tcp   0   0.0.0.0:873     0.0.0.0:*    LISTEN     2390/RPC.mountd
原来是NFS进程因为要写操作致使连接锁定,使873端口锁定不能用,kill -9 2390 后,重新启动rsync进程,故障解决!

你可能感兴趣的:(服务配置,故障处理)