我用以下configuration在两个节点上安装了csync2:
nossl * *; group cluster { host node1; host (node2); # Slave host key /etc/csync2/csync2.key; include /home; exclude *.log; auto younger; }
我确认服务正在通过xinetd进行侦听:
# netstat -vatn | grep 30865 tcp 0 0 :::30865 :::* LISTEN
但是,当我运行同步命令我得到这个错误:
# csync2 -xv Connecting to host node2 (PLAIN) ... Connect to 10.122.71.140:30865 (node2). Config command failed. ERROR: Connection to remote host `node2' failed. Host stays in dirty state. Try again later... Connection closed. Finished with 2 errors.
我以为有可能端口被本地防火墙阻塞,所以我closures了两台机器上的iptables。 我还通过端口30865在一台服务器上远程login。
有没有人有任何想法,为什么这可能会发生?
检查csync是否由xinet启动:chkconfig –lits csync2
如果是closures的,那就把它添加到chkconfig csync2上
然后重新启动xinetd
服务xinetd重启
您可能在csync数据库中有一个错误的configuration。 删除数据库,并仔细检查您的configuration。
rm / var / lib / csync2 / *