2

I've installed csync2 on two nodes with the following config:

nossl * *;
group cluster
{
    host node1;
    host (node2); # Slave host

    key /etc/csync2/csync2.key;
    include /home;

    exclude *.log;
    auto younger;
}

I verified that the service is listening via xinetd:

# netstat -vatn | grep 30865
tcp        0      0 :::30865                    :::*                        LISTEN      

However, when I run the sync command I get this error:

# 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.

I thought it's possible that the port is being blocked by a local firewall, so I shut down iptables on both machines. I also telnetted on one server to another on port 30865.

Does anyone have any ideas on why this might be happening?

user209180
  • 87
  • 1
  • 2
  • 6

3 Answers3

2

check that csync is started by xinet: chkconfig --lits csync2

If it is off then add it chkconfig csync2 on

And restart xinetd

service xinetd restart

0

You could have a bad configuration in the csync database. Remove the database and double check your configuration.

rm /var/lib/csync2/*

0

I came here after googling the same error. To help those who come after me:

What happened, was that my actual hostname was not node1 nor node2. In that case csync2 needs the be started with the -N hostname option. When running it at the remote host the -N hostname My xinetd config file looks like:

# description: csync2
service csync2
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        group           = root
        server          = /usr/sbin/csync2
        server_args     = -i -l -N {hostname}
        disable         = no

}