csync2 ERROR: Connection to remote host failed
- by Emil Salama
I was unable to find any articles to answer this question, so my best bet was to post this here:
Scenario
We have 2x application servers in production hosting a PHP website and I would like some folders to be syncronized between the 2, the same was setup for the development environment with no issues, I've followed all instructions from the URL "http://www.cloudedify.com/synchronising-files-in-cloud-with-csync2/", I still seem to have the same result, firewall has been disabled on both boxes for troubeshooting purposes:
Config Files:
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
}
I've made sure that the daemon is listening on both server on port 30865 and the keys matched on both servers
I've run a tcpdump on each server, output as follows:
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
Is there anything else i'm missing or should be doing?