When I try to rsync -qaPH source/ 192.168.1.21:/var/backups
I get
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(837) [sender=3.1.0]
Whats wrong with my command?
When I try to rsync -qaPH source/ 192.168.1.21:/var/backups
I get
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(837) [sender=3.1.0]
Whats wrong with my command?
To investigate, add one or more
-v
options to the rsync command. Also, try to use plain ssh:to find out whether it is rsync or the underlying ssh connection that is causing the trouble.
255 is actually not a "native"
rsync
return code.rsync
scrapes the 255 error code from SSH and returns it. It looks to me like something on the destination server is blocking SSH or breaking it once it's connected, hence, "broken pipe". I disagree with @kenorb because if it were a timeout issue you would probably be seeingrsync
exit codes 30 or 35.Broken pipe error most likely means that you've hit the timeout. For example the remote rsync command started to calculate the file differences, but it didn't replied to the client on time.
If this happens very often, add these settings to your local
~/.ssh/config
:and on the remote server (if you've got the access), setup these in your
/etc/ssh/sshd_config
:See: What the options
ServerAliveInterval
andClientAliveInterval
mean?I got the 255 error when rsnapshot using rsync encountered the situation "The ECDSA host key for foobar has changed". The rest of the error message included "POSSIBLE DNS SPOOFING DETECTED" and "REMOTE HOST IDENTIFICATION HAS CHANGED".
I had recreated my server and so the fingerprint had changed. I removed the ECDSA key (
ssh-keygen -f "/home/bruce/.ssh/known_hosts" -R "foobar"
) and agreed to the new one when I sshed into foobar again.ssh -vvv foobar
gave me the info I needed to see this issue.I know this issue is old, but maybe someone (like me) still have the error.
a) Check if the ssh service is running:
b) Check the connection with triple verbose command:
c) Maybe you use the wrong ssh-key or the key is broken in some way.
Vine
I had a similar error using
rsync
via my deploy for anEmber
app (ember-cli-deploy). I had to configure correctly myssh
(add private keys to my~/.ssh/
)