1

Trying to connect to rsync on CentOS from Cygwin on Windows 7 but getting the following errors:

$ rsync -vrtz -vvv --password-file=c:\cygwin\secret --delete /cygdrive/d/Data [email protected]::modulename

opening tcp connection to xx.xx.xx.xx port 873
rsync: failed to connect to xx.xx.xx.xx (xx.xx.xx.xx): Connection timed out (116)
[sender] _exit_cleanup(code=10, file=/home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/clientserver.c, line=122): entered
rsync error: error in socket IO (code 10) at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/clientserver.c(122) [sender=3.0.9]
[sender] _exit_cleanup(code=10, file=/home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/clientserver.c, line=122): about to call exit(10)

I can SSH to this server from putty on the same windows machine. I can ping the IP address directly as well.

Do I need to ensure that a specific port is open for rsync to connect on?

Update

Doing

cat /etc/services | grep rsync

Returns

rsync           873/tcp                         # rsync
rsync           873/udp                         # rsync

Another update

iptables -L

outputs:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere
           tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     esp  --  anywhere             anywhere
ACCEPT     ah   --  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
5
  • It's saying connection timed out. Is rsync running as a daemon on the remote node, and is there any firewall running? Feb 18, 2012 at 14:07
  • rsync is running on remote. How can I ensure it is running as a daemon? I am checking on the port issue but I am not sure how to check if that port is open to traffic. Bit of a server newbie. Feb 18, 2012 at 14:12
  • made some updates above to show the output of firewall and port listening settings. what am I missing? Feb 18, 2012 at 14:37
  • It looks like netfilter is blocking port 873. Try running service iptables stop briefly and see if it works, if it does, I'll add an answer with the fix. Feb 18, 2012 at 14:40
  • boo ya. Connection worked. There were other errors but I think just in my rsync config which I will try to work out. Feb 18, 2012 at 14:45

1 Answer 1

1

You have the default netfilter ruleset running on your CentOS server.

If this host is internal-only (not publicly-accessible) you could disable the firewall:

service iptables stop
chkconfig iptables off

However, it would be better to simply allow the rsync port:

iptables -A INPUT -p tcp --dport 873 -j ACCEPT
service iptables save
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .