rsync - unexplained errorDebugging rsync over SSH in verbose mode using tee to redirect stdout to log fileDeltaCopy (Rsync for windows) giving an error on task runrsync connection closing right around an hourwhy rsync is not working with crontab?SVN Post Commit Issue (Calling Bash)Rsync with ssh and root not working after change hosts IPBackupPC using rsync fails with “protocol version mismatch — is your shell clean?”Rsnapshot frequently exits with error 12 when processing tar.gz filersync stopped working. unexplained error (code 130)ssh connects okay from command line but from cron using publickey
How well known and how commonly used was Huffman coding in 1979?
What does Mildred mean by this line in Three Billboards Outside Ebbing, Missouri?
Can I travel from Germany to England alone as an unaccompanied minor?
Alphabet completion rate
Was "I have the farts, again" broadcast from the Moon to the whole world?
Why is a blank required between "[[" and "-e xxx" in ksh?
Was touching your nose a greeting in second millenium Mesopotamia?
The difference between Rad1 and Rfd1
How fast can a ship with rotating habitats be accelerated?
Should I hide continue button until tasks are completed?
Polish letters in ASME English template
What could a reptilian race tell by candling their eggs?
How should I behave to assure my friends that I am not after their money?
What shortcut does ⌦ symbol in Camunda macOS app indicate and how to invoke it?
Averting Real Women Don’t Wear Dresses
How to start learning the piano again
Can a single server be associated with multiple domains?
Why transcripts instead of degree certificates?
For people who believe in Jesus and not the devil, what happened in the desert?
Do we or do we not observe (measure) superpositions all the time?
Does ultrasonic bath cleaning damage laboratory volumetric glassware calibration?
Can a police officer film me on their personal device in my own home?
Are there any vegetarian astronauts?
How to formulate maximum function in a constraint?
rsync - unexplained error
Debugging rsync over SSH in verbose mode using tee to redirect stdout to log fileDeltaCopy (Rsync for windows) giving an error on task runrsync connection closing right around an hourwhy rsync is not working with crontab?SVN Post Commit Issue (Calling Bash)Rsync with ssh and root not working after change hosts IPBackupPC using rsync fails with “protocol version mismatch — is your shell clean?”Rsnapshot frequently exits with error 12 when processing tar.gz filersync stopped working. unexplained error (code 130)ssh connects okay from command line but from cron using publickey
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm using a script like that:
rsync -avu --delete --progress user@host:~/backup .
and every time, after a while, a receive this error:
rsync: connection unexpectedly closed (10251754 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (45482 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]
# generator = Debian 5, rsync version 3.0.3 protocol version 30 (Generator[A])
# receiver = Ubuntu 14.04, rsync version 3.1.0 protocol version 31 (Receiver[A])
I have over ten years of experience in rsync
, I tried everything, but I can't figure out why it happens.
On both sides: I have no errors in logs, no strange things in tcpdump, no connection problems, no firewalls. The transfer just suddently stops after sometime.
The problem is not limited to one server.
I thought it could be a some king of incompatibility between rsync versions, so I switch the generator with a fresh new server (Debian 8) on a completely different server farm and I have update rsync on the receiver, but I get this error:
rsync: connection unexpectedly closed (31931964 bytes received so far) [receiver]
rsync: [generator] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [generator=3.1.2]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.2]
# generator = Debian 8, rsync version 3.1.1 protocol version 31 (Generator[B])
# receiver = Ubuntu 14.04, rsync version 3.1.2 protocol version 31 (Receiver[B])
Then I tried to sync Receiver[A] with Generator[B] throught a proxy and it works
Receiver[A](Italy) <=> HTTP Proxy(Paris) <=> Generator[B](Strasbourg)
So now I have
Receiver[A] <=> Generator[A] // ERROR
Receiver[A] <=> Generator[B] // ERROR
Receiver[B] <=> Generator[B] // ERROR
Receiver[A] <=> HTTP Proxy <=> Generator[A] // OK
Receiver[A] <=> HTTP Proxy <=> Generator[B] // OK
I tried too without HTTP Proxy
Receiver[A] <=> Generator[C] // OK
Receiver[A] <=> Generator[D] // OK
Receiver[A] <=> Generator[E] // ERROR
where generators [C]
, [D]
and [E]
are servers in Paris (same server farm of my HTTP Proxy
) with rsync 3.0.9, prot. v. 30
.
So the bottom line here is: I have multiple servers in multiple locations. On Receiver[A]
I have no firewall and things works well since few days ago. Now rsync
return unexplained error
and I can't figure out why.
I think it's a some king of phisical network error (not on my machines), but I don't know if I can find, isolate and reproduce this error.
Thanks for your help!
networking ssh rsync
add a comment |
I'm using a script like that:
rsync -avu --delete --progress user@host:~/backup .
and every time, after a while, a receive this error:
rsync: connection unexpectedly closed (10251754 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (45482 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]
# generator = Debian 5, rsync version 3.0.3 protocol version 30 (Generator[A])
# receiver = Ubuntu 14.04, rsync version 3.1.0 protocol version 31 (Receiver[A])
I have over ten years of experience in rsync
, I tried everything, but I can't figure out why it happens.
On both sides: I have no errors in logs, no strange things in tcpdump, no connection problems, no firewalls. The transfer just suddently stops after sometime.
The problem is not limited to one server.
I thought it could be a some king of incompatibility between rsync versions, so I switch the generator with a fresh new server (Debian 8) on a completely different server farm and I have update rsync on the receiver, but I get this error:
rsync: connection unexpectedly closed (31931964 bytes received so far) [receiver]
rsync: [generator] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [generator=3.1.2]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.2]
# generator = Debian 8, rsync version 3.1.1 protocol version 31 (Generator[B])
# receiver = Ubuntu 14.04, rsync version 3.1.2 protocol version 31 (Receiver[B])
Then I tried to sync Receiver[A] with Generator[B] throught a proxy and it works
Receiver[A](Italy) <=> HTTP Proxy(Paris) <=> Generator[B](Strasbourg)
So now I have
Receiver[A] <=> Generator[A] // ERROR
Receiver[A] <=> Generator[B] // ERROR
Receiver[B] <=> Generator[B] // ERROR
Receiver[A] <=> HTTP Proxy <=> Generator[A] // OK
Receiver[A] <=> HTTP Proxy <=> Generator[B] // OK
I tried too without HTTP Proxy
Receiver[A] <=> Generator[C] // OK
Receiver[A] <=> Generator[D] // OK
Receiver[A] <=> Generator[E] // ERROR
where generators [C]
, [D]
and [E]
are servers in Paris (same server farm of my HTTP Proxy
) with rsync 3.0.9, prot. v. 30
.
So the bottom line here is: I have multiple servers in multiple locations. On Receiver[A]
I have no firewall and things works well since few days ago. Now rsync
return unexplained error
and I can't figure out why.
I think it's a some king of phisical network error (not on my machines), but I don't know if I can find, isolate and reproduce this error.
Thanks for your help!
networking ssh rsync
add a comment |
I'm using a script like that:
rsync -avu --delete --progress user@host:~/backup .
and every time, after a while, a receive this error:
rsync: connection unexpectedly closed (10251754 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (45482 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]
# generator = Debian 5, rsync version 3.0.3 protocol version 30 (Generator[A])
# receiver = Ubuntu 14.04, rsync version 3.1.0 protocol version 31 (Receiver[A])
I have over ten years of experience in rsync
, I tried everything, but I can't figure out why it happens.
On both sides: I have no errors in logs, no strange things in tcpdump, no connection problems, no firewalls. The transfer just suddently stops after sometime.
The problem is not limited to one server.
I thought it could be a some king of incompatibility between rsync versions, so I switch the generator with a fresh new server (Debian 8) on a completely different server farm and I have update rsync on the receiver, but I get this error:
rsync: connection unexpectedly closed (31931964 bytes received so far) [receiver]
rsync: [generator] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [generator=3.1.2]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.2]
# generator = Debian 8, rsync version 3.1.1 protocol version 31 (Generator[B])
# receiver = Ubuntu 14.04, rsync version 3.1.2 protocol version 31 (Receiver[B])
Then I tried to sync Receiver[A] with Generator[B] throught a proxy and it works
Receiver[A](Italy) <=> HTTP Proxy(Paris) <=> Generator[B](Strasbourg)
So now I have
Receiver[A] <=> Generator[A] // ERROR
Receiver[A] <=> Generator[B] // ERROR
Receiver[B] <=> Generator[B] // ERROR
Receiver[A] <=> HTTP Proxy <=> Generator[A] // OK
Receiver[A] <=> HTTP Proxy <=> Generator[B] // OK
I tried too without HTTP Proxy
Receiver[A] <=> Generator[C] // OK
Receiver[A] <=> Generator[D] // OK
Receiver[A] <=> Generator[E] // ERROR
where generators [C]
, [D]
and [E]
are servers in Paris (same server farm of my HTTP Proxy
) with rsync 3.0.9, prot. v. 30
.
So the bottom line here is: I have multiple servers in multiple locations. On Receiver[A]
I have no firewall and things works well since few days ago. Now rsync
return unexplained error
and I can't figure out why.
I think it's a some king of phisical network error (not on my machines), but I don't know if I can find, isolate and reproduce this error.
Thanks for your help!
networking ssh rsync
I'm using a script like that:
rsync -avu --delete --progress user@host:~/backup .
and every time, after a while, a receive this error:
rsync: connection unexpectedly closed (10251754 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (45482 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]
# generator = Debian 5, rsync version 3.0.3 protocol version 30 (Generator[A])
# receiver = Ubuntu 14.04, rsync version 3.1.0 protocol version 31 (Receiver[A])
I have over ten years of experience in rsync
, I tried everything, but I can't figure out why it happens.
On both sides: I have no errors in logs, no strange things in tcpdump, no connection problems, no firewalls. The transfer just suddently stops after sometime.
The problem is not limited to one server.
I thought it could be a some king of incompatibility between rsync versions, so I switch the generator with a fresh new server (Debian 8) on a completely different server farm and I have update rsync on the receiver, but I get this error:
rsync: connection unexpectedly closed (31931964 bytes received so far) [receiver]
rsync: [generator] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [generator=3.1.2]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.2]
# generator = Debian 8, rsync version 3.1.1 protocol version 31 (Generator[B])
# receiver = Ubuntu 14.04, rsync version 3.1.2 protocol version 31 (Receiver[B])
Then I tried to sync Receiver[A] with Generator[B] throught a proxy and it works
Receiver[A](Italy) <=> HTTP Proxy(Paris) <=> Generator[B](Strasbourg)
So now I have
Receiver[A] <=> Generator[A] // ERROR
Receiver[A] <=> Generator[B] // ERROR
Receiver[B] <=> Generator[B] // ERROR
Receiver[A] <=> HTTP Proxy <=> Generator[A] // OK
Receiver[A] <=> HTTP Proxy <=> Generator[B] // OK
I tried too without HTTP Proxy
Receiver[A] <=> Generator[C] // OK
Receiver[A] <=> Generator[D] // OK
Receiver[A] <=> Generator[E] // ERROR
where generators [C]
, [D]
and [E]
are servers in Paris (same server farm of my HTTP Proxy
) with rsync 3.0.9, prot. v. 30
.
So the bottom line here is: I have multiple servers in multiple locations. On Receiver[A]
I have no firewall and things works well since few days ago. Now rsync
return unexplained error
and I can't figure out why.
I think it's a some king of phisical network error (not on my machines), but I don't know if I can find, isolate and reproduce this error.
Thanks for your help!
networking ssh rsync
networking ssh rsync
asked Nov 2 '16 at 16:25
Andrej PandovichAndrej Pandovich
1261 silver badge4 bronze badges
1261 silver badge4 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It seems that you are having a hard time pinpointing the issue but no problems reproducing it. In this case, it may help if you troubleshoot the SSH connection itself, and also the data that you are getting over it.
You can run your rsync
command like below, it would produce some data du:
rsync -e 'bash -x -c "ssh -vvvv $0 $@ 2>/tmp/rsync-ssh.stderr | tee /tmp/rsync.stdout"' -avu --delete --progress user@host:~/backup .
Looking at the end of those files might have something useful. E.g., if the SSH connections was interrupted, something should show up in /tmp/rsync-ssh.stderr
. And if it is actually a problem on the other side, the actual rsync protocol dump in /tmp/rsync.stdout
may have some stringified hint (strings /tmp/rsync.stdout
).
If I had to take a guess, it is either a nasty firewall or a physical issue corrupting packets causing the SSH connection to drop.
add a comment |
It is possible that rsync
might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync
over a samba
/cifs
mounted drive.
A possible solution could be to throttle rsync
using the --bwlimit=
option. Depending on the network/disk performance of the server, I would recommend trying values between 2000-10000 (in kbit/s).
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f812781%2frsync-unexplained-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It seems that you are having a hard time pinpointing the issue but no problems reproducing it. In this case, it may help if you troubleshoot the SSH connection itself, and also the data that you are getting over it.
You can run your rsync
command like below, it would produce some data du:
rsync -e 'bash -x -c "ssh -vvvv $0 $@ 2>/tmp/rsync-ssh.stderr | tee /tmp/rsync.stdout"' -avu --delete --progress user@host:~/backup .
Looking at the end of those files might have something useful. E.g., if the SSH connections was interrupted, something should show up in /tmp/rsync-ssh.stderr
. And if it is actually a problem on the other side, the actual rsync protocol dump in /tmp/rsync.stdout
may have some stringified hint (strings /tmp/rsync.stdout
).
If I had to take a guess, it is either a nasty firewall or a physical issue corrupting packets causing the SSH connection to drop.
add a comment |
It seems that you are having a hard time pinpointing the issue but no problems reproducing it. In this case, it may help if you troubleshoot the SSH connection itself, and also the data that you are getting over it.
You can run your rsync
command like below, it would produce some data du:
rsync -e 'bash -x -c "ssh -vvvv $0 $@ 2>/tmp/rsync-ssh.stderr | tee /tmp/rsync.stdout"' -avu --delete --progress user@host:~/backup .
Looking at the end of those files might have something useful. E.g., if the SSH connections was interrupted, something should show up in /tmp/rsync-ssh.stderr
. And if it is actually a problem on the other side, the actual rsync protocol dump in /tmp/rsync.stdout
may have some stringified hint (strings /tmp/rsync.stdout
).
If I had to take a guess, it is either a nasty firewall or a physical issue corrupting packets causing the SSH connection to drop.
add a comment |
It seems that you are having a hard time pinpointing the issue but no problems reproducing it. In this case, it may help if you troubleshoot the SSH connection itself, and also the data that you are getting over it.
You can run your rsync
command like below, it would produce some data du:
rsync -e 'bash -x -c "ssh -vvvv $0 $@ 2>/tmp/rsync-ssh.stderr | tee /tmp/rsync.stdout"' -avu --delete --progress user@host:~/backup .
Looking at the end of those files might have something useful. E.g., if the SSH connections was interrupted, something should show up in /tmp/rsync-ssh.stderr
. And if it is actually a problem on the other side, the actual rsync protocol dump in /tmp/rsync.stdout
may have some stringified hint (strings /tmp/rsync.stdout
).
If I had to take a guess, it is either a nasty firewall or a physical issue corrupting packets causing the SSH connection to drop.
It seems that you are having a hard time pinpointing the issue but no problems reproducing it. In this case, it may help if you troubleshoot the SSH connection itself, and also the data that you are getting over it.
You can run your rsync
command like below, it would produce some data du:
rsync -e 'bash -x -c "ssh -vvvv $0 $@ 2>/tmp/rsync-ssh.stderr | tee /tmp/rsync.stdout"' -avu --delete --progress user@host:~/backup .
Looking at the end of those files might have something useful. E.g., if the SSH connections was interrupted, something should show up in /tmp/rsync-ssh.stderr
. And if it is actually a problem on the other side, the actual rsync protocol dump in /tmp/rsync.stdout
may have some stringified hint (strings /tmp/rsync.stdout
).
If I had to take a guess, it is either a nasty firewall or a physical issue corrupting packets causing the SSH connection to drop.
answered Oct 10 '17 at 11:03
chutzchutz
6,37819 silver badges48 bronze badges
6,37819 silver badges48 bronze badges
add a comment |
add a comment |
It is possible that rsync
might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync
over a samba
/cifs
mounted drive.
A possible solution could be to throttle rsync
using the --bwlimit=
option. Depending on the network/disk performance of the server, I would recommend trying values between 2000-10000 (in kbit/s).
add a comment |
It is possible that rsync
might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync
over a samba
/cifs
mounted drive.
A possible solution could be to throttle rsync
using the --bwlimit=
option. Depending on the network/disk performance of the server, I would recommend trying values between 2000-10000 (in kbit/s).
add a comment |
It is possible that rsync
might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync
over a samba
/cifs
mounted drive.
A possible solution could be to throttle rsync
using the --bwlimit=
option. Depending on the network/disk performance of the server, I would recommend trying values between 2000-10000 (in kbit/s).
It is possible that rsync
might be writing faster to the disk cache than the disk on the server is able to keep up with, see for example https://unix.stackexchange.com/a/331189/163108 for a more detailed explanation, and https://unix.stackexchange.com/a/523896/163108 for a similar problem but different case when using rsync
over a samba
/cifs
mounted drive.
A possible solution could be to throttle rsync
using the --bwlimit=
option. Depending on the network/disk performance of the server, I would recommend trying values between 2000-10000 (in kbit/s).
answered Jun 10 at 9:55
davidovitchdavidovitch
11 bronze badge
11 bronze badge
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f812781%2frsync-unexplained-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown