当前位置: 首页 > 工具软件 > Csync2 > 使用案例 >

linux sync 错误,linux – csync2错误:与远程主机的连接失败

东郭勇
2023-12-01

我无法找到任何文章来回答这个问题,所以我最好的选择是在这里发布:

脚本

我们有2个应用程序服务器在生产托管PHP网站,我想在2之间同步一些文件夹,同样是为开发环境设置没有问题,我已经按照URL“http://www.cloudedify.com/synchronising-files-in-cloud-with-csync2/”的所有说明,我仍然似乎有相同的结果,防火墙已被禁用在两个盒子上用于故障目的:

配置文件:

cysnc2.cfg

nossl * *;

group production {

host server1;

host server2;

key /etc/csync-production-group.key;

include /etc/httpd/sites-available;

include /xxxxxx/public_html/files

include /xxxxxxx/magento/media/catalog/product

include /xxxxxxx/magento/media/brands

exclude *.log;

exclude /xxxx/public_html/file/cache;

exclude /xxxxx/public_html/magento/var/cache;

exclude /xxxx/public_html/logs;

exclude /xxxxx/public_html/magento/var/log;

backup-directory /data/sync-conflicts/;

backup-generations 2;

auto younger;

}

/etc/xinetd.d/csync2

csync2.cfg

service csync2

{

disable = no

flags = REUSE

socket_type = stream

wait = no

user = root

group = root

server = /usr/sbin/csync2

server_args = -i -D /data/sync-db/

port = 30865

type = UNLISTED

log_type = FILE /data/logs/csync2/csync2-xinetd.log

log_on_failure += USERID

}

我确保守护进程正在端口30865上的服务器上监听,并且在两台服务器上都匹配了密钥

我在每台服务器上运行tcpdump,输出如下:

12:20:31.366771 IP server1.49919 > server2.csync2: Flags [S], seq 445156159, win 14600, options [mss 1460,sackOK,TS val 794864936 ecr 0,nop,wscale 7], length 0

12:20:31.366810 IP server2.csync2 > server1.49919: Flags [S.], seq 450593575, ack 445156160, win 14480, options [mss 1460,sackOK,TS val 794798911 ecr 794864936,nop,wscale 7], length 0

12:20:31.367101 IP server1.49919 > server2.csync2: Flags [.], ack 1, win 115, options [nop,nop,TS val 794864937 ecr 794798911], length 0

12:20:31.367138 IP server1.49919 > server2.csync2: Flags [P.], seq 1:9, ack 1, win 115, options [nop,nop,TS val 794864937 ecr 794798911], length 8

12:20:31.367147 IP server2.csync2 > server1.49919: Flags [.], ack 9, win 114, options [nop,nop,TS val 794798912 ecr 794864937], length 0

12:20:31.368625 IP server2.csync2 > server1.49919: Flags [R.], seq 1, ack 9, win 114, options [nop,nop,TS val 794798913 ecr 794864937], length 0

还有什么我错过或应该做的吗?

 类似资料: