3

A post-commit script calls an rsync command to update files from the SVN system to a production web server, both running Ubuntu 10.04.3, rsync 3.1.1. The issue had been occurring with rsync 3.0.7 as well, upgrading to 3.1.1 was a troubleshooting step.

Regardless if files need updated or not I periodically receive:

Write Failed: Broken pipe
rsync: connection unexpectedly closed (xxxx bytes sent so far) [sender]

When the pipe breaks the very verbose output 99% of the time ends at:

send_files(2, /some/path/to/.htaccess)
send_files(3, /some/path/to/file1.zip)
send_files(4, /some/path/to/file2.zip)
send_files(5, /some/path/to/file3.zip)
send_files(6, /some/path/to/file4.zip)
send_files(7, /some/path/to/index.php)
recv_files(22) starting
[sender] _exit_cleanup(code=12, file=io.c, line=226): about to call exit(255)

SSH and SCP connections stay alive and work fine to both servers no problem. If I run the rsync command 10 times in a row, about 50% of the time its does it thing just fine. Transferring files from all directories exhibit this symptom, so I don’t think its a certain file type or permissions issue.

Some more outputs:

send_files(27, /a/different/path/verdana.ttf)
recv_files(50) starting
[sender] _exit_cleanup(code=12, file=io.c, line=226): about to call exit(255)

send_files(25, /yet/another/path/unsubscribe.htm)
recv_files(162) starting
[sender] _exit_cleanup(code=12, file=io.c, line=226): about to call exit(255)

Here is a sample of the command:

rsync -azv --delete --exclude=.svn /svn/path -e ssh user@server:/remote/path
4
  • ask the remote to log stuff too, eg add to your cmd: -M --log-file=/tmp/mylog.
    – meuh
    Commented Nov 9, 2015 at 16:23
  • @meuh, thanks. When it fails, it fails at the same spot every time as well. 'recv_file_name' \some\file
    – burns
    Commented Nov 9, 2015 at 17:08
  • TCPDUMPS reveal that when things fail, both machines send TCP RST packets.
    – burns
    Commented Nov 9, 2015 at 17:10
  • Did you try it on a different server?
    – pfnuesel
    Commented Nov 13, 2015 at 22:51

1 Answer 1

2

You mentioned you see TCP RST packet whenever this fails. This sounds similar to the issue of a firewall potentially disconnecting as mentioned on the following post, which also has a work around by re-using a hanging ssh connection. rsync-connection-closing-right-around-an-hour

There's also an option of --timeout=[timeout value] but I think it's not as good as the hanging ssh connection solution.

1
  • It ended up being a security device which was triggering an SSH Overflow Signature, thus terminating the connection.
    – burns
    Commented Feb 9, 2016 at 18:03

You must log in to answer this question.

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