I am on Amazon EC2 and trying to sync two directories(/var/www/html) on my instance together with lsyncd but I am receiving this error in the log:
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Mon Dec 5 05:43:36 2011 Error: Failure on startup of '/var/www/html/'.
Mon Dec 5 05:47:38 2011 Normal: recursive startup rsync: /var/www/html/ -> 10.xxx.xx.xx2:/var/www/html/
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Mon Dec 5 05:47:38 2011 Error: Failure on startup of '/var/www/html/'.
Here is my configuration.
[root@ip-xxx ec2-user]# vi /etc/lsyncd.conf
settings = {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.stat",
statusInterval = 1,
}
sync{
default.rsync,
source="/var/www/html",
target="10.xxx.xx.xx2:/var/www/html/",
rsyncOps="-avlt",
}
Receiving server:
[root@ip-xxx ec2-user]# vi /etc/rsyncd.conf
[application]
path = /var/www/html
hosts allow = 10.xxx.xx.xx1
log file = /tmp/rsyncd.log
uid = ec2-user
gid = ec2-user
read only = false
What am I doing wrong?
ssh 10.xxx.xx.xx2from the sending server, it connects without prompting you? – Conspicuous Compiler Dec 5 '11 at 6:53