Error in rsync protocol data stream code 12 at io c 600

Recently I have been unable to rsync over ssh. Each time I get the same error bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: ...

Recently I have been unable to rsync over ssh. Each time I get the same error

bash: rsync: command not found
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]

I am running

sudo rsync -av /var/www/html/somedir/ myuser@999.999.99.9:Users/myuser/Desktop/ec2backup

Please note the username, IP, and directories have been changed for the purposes of this post.

In the past I have ran the exact same command as verified using bash_history.

What I have tried:

  1. Ran a similar command from another server, resulting in the same
    error message.
  2. Tested rsync locally (local dir to local dir), which worked
    perfectly.

The only thing that has changed is I’ve recently installed Virtualbox and Vagrant. Is it possible I may have messed up authentication/ports/etc on my local machine?

Any help is greatly appreciated.

asked Aug 28, 2018 at 23:52

TucDev990's user avatar

1

rsync is not installed on 999.999.99.9

answered Aug 29, 2018 at 0:03

Sandor Marton's user avatar

6

my problem was that I was using cwrsync_6.2.1_x64 in conjunction with SSH_for_Windows_7.7p1, LibreSSL 2.6.5 that was preinstalled in win10 2004 build 19041.685.

in your rsync command, you need to point to the ssh.exe that comes with that specific rsync build. For example:

rsync -avHz -e "path_tocwrsync_6.2.1_x64_freebinssh.exe" --partial ...

Andrew Schulman's user avatar

answered Feb 17, 2021 at 10:44

Remuz's user avatar

RemuzRemuz

811 silver badge1 bronze badge

1

I got this error error when the target directory didn’t pre-exist. With a source data file: /a/b/c/d/data,
rsync -av -e ssh /a/b/c/d/ hostname:/a/b/c/d
needs the target directory: hostname:/a/b/c to pre-exist.

In reading the man page as a last resort I see that this is the intended behavior.

answered Nov 11, 2020 at 18:36

Don's user avatar

Using cygwin, I did a ‘which rynsc’ and the result was the rsync provided by the cygwin setup program. I had previously installed rsync through Cygwin setup. However, when I did, from Cygwin, ‘which ssh’, it was pointing to the ssh of the Windows path. So, I exited Cygwin, executed the cygwin setup program and installed ssh from cygwin. After I did that, I did the same two previous commands again (which rsync and which ssh) and both binaries were pointing to the cygwin binaries. Then when I did my rsync from cygwin, it worked without any issue at all.

answered Jun 24, 2021 at 19:31

Daniel Reimann's user avatar

Lack of permissions to access the remote directory caused the same error.

on the server

~# sudo -u ubuntu ls -l /opt/aws/opsworks/current/
   ls: cannot access /opt/aws/opsworks/current/: Permission denied

on the client

$ rsync --dry-run -v -r --checksum ./ ubuntu@10.1.1.1:/opt/aws/opsworks/current/
...
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.2/rsync/io.c(453) [sender=2.6.9]

answered May 14, 2022 at 7:37

David Davidov's user avatar

With the exception of the rsync: command not found you might get 12 Error in rsync protocol data stream if the remote (ssh) user requests a password change.
I.e on an expired password — even if you use ssh keys.

Got that exact error message in a backup script, and when manually logging in to the remote server — from the backup server — I got this:

WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user logs.
Changing password for logs.
(current) UNIX password:

Either set the new password, or remove password expiry rules. ymmv — and check with your admin if your not it.

On the remote server:

chage -l logs ; chage -I -1 -m 0 -M -1 -E -1 logs ; chage -l logs

answered Jan 29, 2020 at 9:28

sastorsl's user avatar

sastorslsastorsl

3622 silver badges14 bronze badges

I got this error in rsync protocol data stream (code 12) for a pair of rsync’s with different versions.

In my case, local rsync was version 2.6.9 (on Mac OSX), while remote one was version 3 (can’t remember now the exact version).

Then I upgraded my local rsync to version 3 (using brew) and that fixed the problem.

answered Apr 2, 2020 at 21:59

Gui Lima's user avatar

1

When I get this error, it is usually because the path on the remote server is invalid or does not exist. mkdir -p fixes it up.

Michael Hampton's user avatar

answered Jul 13, 2021 at 3:41

tqwhite's user avatar

Rsync must be installed in both servers, origin and destine.

answered Apr 7, 2022 at 3:01

Andres Mejia's user avatar

0

Permission denied, please try again. rsync: connection unexpectedly
closed (0 bytes received so far) [sender] rsync error: error in rsync
protocol data stream (code 12) at io.c(235) [sender=3.1.2]

I had this error wit rsync from my ubuntu to Synology DS411j

  • protocol version was different but that was not problem
  • ssh was working

I fixed problem on Synology system (armv5tel) to allow user use rsync

Now it is working perfect!

answered Jun 10, 2022 at 13:06

user2308728's user avatar

I was getting a similar error on macOS when trying to rsync from macOS to Ubuntu. Both had the same version of rsync, but it turned out ssh server was not installed on Ubuntu. To install it:

sudo apt install openssh-server

answered Apr 27, 2021 at 14:43

lenooh's user avatar

2

I tried:

rsync -v -v -e 'ssh -p YY' ./testfile me@XXXXX:/home

Error Message

opening connection using: ssh -p YY -l me 146.6.84.206 rsync ->-server -vvve.s . /home 
[sender] make_file(testfile,*,0)
send_file_list done
send_files starting
server_recv(2) starting pid=17537
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)[sender=3.0.6]
_exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)

This works fine:

ssh -p YY me@XXXXX

Which suggests to me the problem is neither that sshd is not running nor that port YY is firewalled. I have checked anyway.

What other problems could there be?

EDIT:
The problem seems to have been «self resolving.» I could not replicate the following day. I started my local computer up. Perhaps notably I had a different IP address than last time. And now rsync magically works. I’d appreciate guesses as to what it could have been in light of it going away.

asked May 18, 2015 at 3:39

user3391229's user avatar

user3391229user3391229

1,1652 gold badges7 silver badges7 bronze badges

6

You can also get this error if you specify a remote path that doesn’t exist.

I got this error on OS X:

$ rsync -avz public/ static:apps/myapp.com
building file list ... done
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/io.c(453) [sender=2.6.9]

Turned it was simply a matter of mistyping the destination path. The apps dir didn’t exist. When I changed that to static:sites/myapp.com instead (the sites dir did exist), the error went away.

It’s fine if the final directory in the path doesn’t exist (I could do static:sites/mynewapp.com) but it appears any preceding directory must already exist.

answered Jan 4, 2016 at 19:39

Henrik N's user avatar

Henrik NHenrik N

1,4861 gold badge10 silver badges7 bronze badges

8

I got this error when rsync wasn’t installed on the target host. The error message in my case also said rsync: command not found. A simple

sudo apt-get install rsync

on the target host solved the problem.

answered May 17, 2017 at 14:24

Florian Brucker's user avatar

3

Does your login script at the remote end produce garbage on stdout?
Check this with

ssh -p YY me@XXXXX /bin/true > out.txt

If out.txt contains data, identify the offending statements in your .profile or .bashrc and wrap them in

if [ ! -t 1 ]; then
  echo garbage
fi

answered May 18, 2015 at 8:35

Arjen's user avatar

ArjenArjen

3663 silver badges5 bronze badges

2

This error can also happen if the path to rsync at the remote system is not what the local system assumes it to be. You can see what is happening by specifying -vv (or even more vs). If this is the problem you can specify the remote path to rsync with the —rsync-path option.

answered Oct 18, 2016 at 17:21

Mike's user avatar

3

You may need to put in the full path to the ssh binary, ie

rsync -v -v -e '/usr/bin/ssh -p YY' ./testfile me@XXXXX:/home

Though there are other possible causes.

answered May 18, 2015 at 3:54

thomasrutter's user avatar

thomasrutterthomasrutter

35.4k10 gold badges85 silver badges103 bronze badges

1

I hit this error because I was rsyncing to a drive that was full! Check your disk usage if the other solutions here don’t help you resolve this.

answered Dec 15, 2020 at 21:09

duhaime's user avatar

duhaimeduhaime

5981 gold badge6 silver badges12 bronze badges

I happened to run into this error for a specific file’s transfer because a previously aborted rsync run seems to have corrupted the destination file (maybe due to interrupted delta/incremental changes on the destination file).

My solution was to find out which file caused the error (by using -v and/or --progress), deleting that file in the destination, then running rsync normally again.

answered Feb 28, 2022 at 12:52

Abdull's user avatar

AbdullAbdull

2992 gold badges6 silver badges12 bronze badges

I was seeing this error:

rsync -e 'ssh -v'

debug1: Exit status 11

rsync error: error in rsync protocol data stream (code 12) at /BuildRoot
/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/io.c(453)
[sender=2.6.9]

I was able to ssh into the remote host and found that it was out of disk space.

Ravexina's user avatar

Ravexina

53k23 gold badges151 silver badges176 bronze badges

answered May 2, 2017 at 20:37

Andy's user avatar

AndyAndy

1012 bronze badges

I got this error in rsync protocol data stream (code 12) for a pair of rsync’s with different versions. So please check the rsync versions on both client and server.

In my case, local rsync was version 2.6.9 (on Mac OSX), while remote one was version 3 (can’t remember now the exact version). Once I upgraded my local rsync to version 3 (using brew), the problem was fixed.

answered Apr 2, 2020 at 22:09

Gui Lima's user avatar

Backups and file transferring is important for server management.

And Rsync is one of the best shots, but errors are always a setback.

Rsync error code 12 is a tricky error that occurs due to insufficient disk space, network errors and so on.

That is why at Bobcares, we often get requests to fix Rsync errors as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix Rsync error code 12 for our customers.

Explaining Rsync error code 12

Rsync is one of the popular file synchronization tools. It is useful for both local and remote file transfer.

If the destination already contains the source file then the Rsync only copies the differences. This makes Rsync a faster file transfer option.

But, in many situations, the Rsync operation ends by showing the error message:

rsync error: error in rsync protocol data stream (code 12) at io.c(xxx).

So, why does the file transfer ends by showing an error code 12?

Usually, the reason for this varies from insufficient disk space to network errors, improper destination and so on.

Let’s now check on a few reasons and see how our Support Engineers fix them.

Causes and fixes for the Rsync error 12

Whenever a server operation ends up in error, the initial troubleshooting starts from the log file. In the case of Rsync, our Support Engineers always make sure to set up the log file right. As a result, the reason that leads to the error can be easily found out from teh log file.

The most common reasons for the Rsync error code 12 are:

1. Insufficient disk space

While trying to Rsync data from one server to another, one of our customers got the error code 12. Here, the user tried to transfer a large file.

So, our Support Engineers initially tried to transfer a small file. Since the file transfer was successful, we could infer that the disk space was insufficient in the first case.

Thus, we always recommend checking the disk space before transferring large files. For instance, the free disk space should be at least more than the size of the largest file.

2. Missing remote Rsync

In some cases, the remote side does not have Rsync installed. Also, the destination path specified does not exist. In both cases, the Rsync error 12 shows up.

For instance, one of our customers executed the command:

rsync -v -v -e 'ssh -p YY' ./testfile user@XXXXX:/home

Here, YY denotes the SSH port number.

This ended up in the error code 12.

Initially, our Dedicated Engineers made sure that ssh -p YY user@XXXXX works fine. Since this was working fine, we checked the Rsync in the remote end.

Rsync was found missing in the remote end. So, we installed it on the Ubuntu/Debian server using:

apt-get install rsync

That fixed the error and Rsync ran successfully.

3. Failure due to idle connection

Similarly, an idle connection can also show the error code 12 in remote file transfer.

In such situations, our Support Team always recommends using –timeout option in the Rsync command. Here, the Rsync sends keep-alive messages to the remote server to prevent a timeout.

We can also configure ssh to prevent timeout by setting a few parameters like KeepAlive, ServerAliveInterval, ServerAliveCountMax, etc.

[Having trouble in fixing Rsync errors? – We’ll help you.]

Conclusion

In short, Rsync error code 12 denotes ‘error in rsync protocol data stream’. Usually, this error occurs due to insufficient disk space, missing Rsync at the destination, idle connection timeout and so on. Today, we saw how our Support Engineers fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

I’m trying to use rsync on Windows 7. I installed cwRsync and tried to connect to Ubuntu 9.04.

$ rsync -azC --force --more-options ./ user@server:/my/path/
rsync: connection unexpectedly closed (0 bytes received so far) [receiver] 
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.5]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(610) [sender=3.0.8]

Anthony Mastrean's user avatar

asked Aug 31, 2011 at 17:37

rkmax's user avatar

2

The trick for me was I had ssh conflict.

I have Git installed on my Windows path, which includes ssh. cwrsync also installs ssh.

The trick is to have make a batch file to set the correct paths:

rsync.bat

@echo off
SETLOCAL
SET CWRSYNCHOME=c:commandscwrsync
SET HOME=c:UsersPetah
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%bin;%PATH%
%~dp0cwrsyncbinrsync.exe %*

On Windows you can type where ssh to check if this is an issue. You will get something like this:

where ssh
C:Program Files (x86)Gitbinssh.exe
C:Program FilescwRsyncssh.exe

answered Jun 13, 2013 at 21:39

Petah's user avatar

PetahPetah

45k28 gold badges157 silver badges212 bronze badges

6

I saw this when changing rsync versions. In the older version, it worked to say:

rsync -e 'ssh ...

when the rsync.exe and ssh.exe were in the same directory.

With the newer version, I had to specify the path:

rsync -e './ssh ...

and it worked.

Jess's user avatar

Jess

23k19 gold badges122 silver badges141 bronze badges

answered Apr 26, 2012 at 17:36

Seth Wegner's user avatar

Seth WegnerSeth Wegner

2212 silver badges3 bronze badges

2

I had this problem, but only when I tried to rsync from a Linux (RH) server to a Solaris server. My fix was to make sure rsync had the same path on both boxes, and that the ownership of rsync was the same.

On the linux box, rsync path was /usr/bin, on Solaris box it was /usr/local/bin. So, on the Solaris box I did ln -s /usr/local/bin/rsync /usr/bin/rsync.

I still had the same problem, and noticed ownership differences. On linux it was root:root, on solaris it was bin:bin. Changing solaris to root:root fixed it.

answered Sep 5, 2012 at 16:41

Mark's user avatar

MarkMark

711 silver badge2 bronze badges

1

I had this error coming up between 2 Linux boxes. Easily solved by installing RSYNC on the remote box as well as the local one.

answered Apr 9, 2013 at 4:29

davidgo's user avatar

davidgodavidgo

2694 silver badges10 bronze badges

1

This error message probably means that you either mistyped the server name or forgot to start an ssh server at server. Make absolutely certain that an ssh server is running on the server at port 22, and that it’s not firewalled. You can test that with ssh user@server.

answered Aug 31, 2011 at 21:10

phihag's user avatar

phihagphihag

273k71 gold badges444 silver badges466 bronze badges

9

i get the solution. i’ve using cygwin and this is the problem the rsync command for Windows work only in windows shell and works in the windows powershell.

A few times it has happened the same error between two linux boxes. and appears to be by incompatible versions of rsync

answered Sep 1, 2011 at 20:42

rkmax's user avatar

rkmaxrkmax

17.2k22 gold badges91 silver badges175 bronze badges

2

Comments

@gsrigo

@ansibot
ansibot

added

affects_2.4

This issue/PR affects Ansible v2.4

needs_info

This issue requires further information. Please answer any outstanding questions.

needs_template

This issue/PR has an incomplete description. Please fill in the proposed template correctly.

needs_triage

Needs a first human triage before being processed.

labels

May 26, 2017

@ansibot
ansibot

added

bug_report

module

This issue/PR relates to a module.

and removed

needs_info

This issue requires further information. Please answer any outstanding questions.

needs_template

This issue/PR has an incomplete description. Please fill in the proposed template correctly.

labels

May 26, 2017

@ansibot
ansibot

added
the

needs_info

This issue requires further information. Please answer any outstanding questions.

label

May 31, 2017

@ansibot
ansibot

added
the

support:core

This issue/PR relates to code supported by the Ansible Engineering Team.

label

Jun 29, 2017

@ansible
ansible

locked and limited conversation to collaborators

Apr 26, 2019

Иногда при копировании большого объема и количества файлов по сети с помощью RSYNC может возникнуть некая плохо трактуемая ошибка типа:

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (90241361 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

Она может означать что угодно, в том числе и банальное исчерпание свободного места на диске-приемнике.
Но иногда в этом проявляется странный косячок RSYNC, связанный с разделом SWAP.
Борьба с этим недостаточно изученным явлением природы производится следующим образом:

— Перед копированием отключаем использование раздела подкачки:

# swapoff -a

— После копирования возвращаем его во включенное состояние:

# swapon -a

И как ни странно, этот прием иногда помогает.

Хотя потом оказалось, что в подсети, в которой находился этот компьютер, находился другой компьютер с неисправной сетевой картой, которая зафлудила всю сеть лавиной бессмысленных пакетов, и нарушала работу многих других компьютеров и сетевых программ.

Вот тут нашел как сделать отладку при такой ошибке:
samba.anu.edu.au/rsync/issues.html

На удаленном сервере сделал файл rsync-debug:
#!/bin/sh
ulimit -c unlimited
strace -f rsync «${@}» 2>~/tmp/rsync-$$.out

Запустил rsync с опцией —rsync-path=~/rsync-debug

В результате получился файл с отладочной инфой от strace:

execve(«/usr/bin/rsync», [«rsync», «—server», «-e.Lsf», «.», «/home/un1t/tmp/test»], [/* 12 vars */]) = 0
brk(0) = 0x1198000
access(«/etc/ld.so.nohwcap», F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af6383000
access(«/etc/ld.so.preload», R_OK) = -1 ENOENT (No such file or directory)
open(«/etc/ld.so.cache», O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=43482, …}) = 0
mmap(NULL, 43482, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5af6378000
close(3) = 0
access(«/etc/ld.so.nohwcap», F_OK) = -1 ENOENT (No such file or directory)
open(«/lib/libacl.so.1», O_RDONLY) = 3
read(3, «177ELF2113>136036″…, 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=30472, …}) = 0
mmap(NULL, 2125648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5af5f61000
mprotect(0x7f5af5f68000, 2093056, PROT_NONE) = 0
mmap(0x7f5af6167000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f5af6167000
close(3) = 0
access(«/etc/ld.so.nohwcap», F_OK) = -1 ENOENT (No such file or directory)
open(«/lib/libpopt.so.0», O_RDONLY) = 3
read(3, «177ELF2113>1340″»…, 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=41984, …}) = 0
mmap(NULL, 2137264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5af5d57000
mprotect(0x7f5af5d61000, 2093056, PROT_NONE) = 0
mmap(0x7f5af5f60000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f5af5f60000
close(3) = 0
access(«/etc/ld.so.nohwcap», F_OK) = -1 ENOENT (No such file or directory)
open(«/lib/libc.so.6», O_RDONLY) = 3
read(3, «177ELF2113>1`3551″…, 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1432968, …}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af6377000
mmap(NULL, 3541032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5af59f6000
mprotect(0x7f5af5b4e000, 2093056, PROT_NONE) = 0
mmap(0x7f5af5d4d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x157000) = 0x7f5af5d4d000
mmap(0x7f5af5d52000, 18472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5af5d52000
close(3) = 0
access(«/etc/ld.so.nohwcap», F_OK) = -1 ENOENT (No such file or directory)
open(«/lib/libattr.so.1», O_RDONLY) = 3
read(3, «177ELF2113>1p24″…, 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=17808, …}) = 0
mmap(NULL, 2112952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5af57f2000
mprotect(0x7f5af57f6000, 2093056, PROT_NONE) = 0
mmap(0x7f5af59f5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f5af59f5000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af6376000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af6375000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af6374000
arch_prctl(ARCH_SET_FS, 0x7f5af6375700) = 0
mprotect(0x7f5af5d4d000, 16384, PROT_READ) = 0
mprotect(0x7f5af6385000, 4096, PROT_READ) = 0
munmap(0x7f5af6378000, 43482) = 0
rt_sigaction(SIGUSR1, {0x41ab20, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {0x41b450, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x41b4a0, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
geteuid() = 1041
umask(0) = 022
brk(0) = 0x1198000
brk(0x11b9000) = 0x11b9000
open(«/usr/lib/locale/locale-archive», O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2942400, …}) = 0
mmap(NULL, 2942400, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5af5523000
close(3) = 0
open(«/usr/etc/popt», O_RDONLY) = -1 ENOENT (No such file or directory)
open(«/etc/popt», O_RDONLY) = -1 ENOENT (No such file or directory)
stat(«/etc/popt.d», 0x7fff5ac491b0) = -1 ENOENT (No such file or directory)
open(«/home/un1t/.popt», O_RDONLY) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGINT, {0x40b0e0, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0x40b0e0, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x40b0e0, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT USR1 USR2 TERM CHLD], NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, {SIG_IGN, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f5af5a281e0}, NULL, 8) = 0
getcwd(«/home/un1t», 4095) = 13
fcntl(0, F_GETFL) = 0 (flags O_RDONLY)
fcntl(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(1, F_GETFL) = 0x1 (flags O_WRONLY)
fcntl(1, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl(0, F_GETFL) = 0x800 (flags O_RDONLY|O_NONBLOCK)
fcntl(1, F_GETFL) = 0x801 (flags O_WRONLY|O_NONBLOCK)
select(2, NULL, [1], [1], {60, 0}) = 1 (out [1], left {59, 999997})
write(1, «36», 4) = 4
select(1, [0], [], NULL, {60, 0}) = 1 (in [0], left {59, 966985})
read(0, «», 4) = 0
write(2, «rsync: connection unexpectedly c»…, 74rsync: connection unexpectedly closed (0 bytes received so far) [receiver]) = 74
write(2, «n», 1
) = 1
rt_sigaction(SIGUSR1, {SIG_IGN, [], SA_RESTORER, 0x7f5af5a281e0}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [], SA_RESTORER, 0x7f5af5a281e0}, NULL, 8) = 0
write(2, «rsync error: error in rsync prot»…, 88rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]) = 88
write(2, «n», 1
) = 1
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
exit_group(12) =?

Чесно говоря не особо понятно, кроме того что не моет найти какой-то файл /etc/ld.so.nohwcap


Я пытался:

rsync -v -v -e 'ssh -p YY' ./testfile me@XXXXX:/home

Сообщение об ошибке

opening connection using: ssh -p YY -l me 146.6.84.206 rsync ->-server -vvve.s . /home 
[sender] make_file(testfile,*,0)
send_file_list done
send_files starting
server_recv(2) starting pid=17537
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)[sender=3.0.6]
_exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)

Это прекрасно работает:

ssh -p YY me@XXXXX

Это наводит меня на мысль, что проблема не в том, что sshdон не работает, а в том, что порт YY защищен от огня. Я все равно проверил.

Какие еще проблемы могут быть?

РЕДАКТИРОВАТЬ: проблема, кажется, «сам решается». Я не мог повторить на следующий день. Я запустил свой локальный компьютер. Возможно, у меня был другой IP-адрес, чем в прошлый раз. И теперь rsync волшебным образом работает. Я был бы признателен за предположения о том, что это могло бы быть в свете его ухода.





Ответы:


Вы также можете получить эту ошибку, если укажете удаленный путь, который не существует.

Я получил эту ошибку на OS X:

$ rsync -avz public/ static:apps/myapp.com
building file list ... done
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/io.c(453) [sender=2.6.9]

Оказалось, что это просто вопрос опечатки пути назначения. Режиссёр appsне существовал. Когда я изменил , что static:sites/myapp.comвместо ( sitesреж сделал СУЩЕСТВУЕТ), ошибка ушла.

Это нормально, если окончательный каталог в пути не существует (я мог бы сделать static:sites/mynewapp.com), но кажется, что любой предыдущий каталог уже должен существовать.







Я получил эту ошибку, когда rsyncне был установлен на целевом хосте. Сообщение об ошибке в моем случае также сказал rsync: command not found. Просто

sudo apt-get install rsync

на целевом хосте решили проблему.



Ваш сценарий входа в систему на удаленном конце производит мусор на стандартный вывод? Проверьте это с

ssh -p YY me@XXXXX /bin/true > out.txt

Если out.txtсодержит данные, определите оскорбительные заявления в вашем .profileили .bashrcи оберните их в

if [ ! -t 1 ]; then
  echo garbage
fi




Возможно, вам потребуется указать полный путь к бинарному файлу ssh, т.е.

rsync -v -v -e '/usr/bin/ssh -p YY' ./testfile me@XXXXX:/home

Хотя есть и другие возможные причины.



Эта ошибка также может произойти, если путь к rsync в удаленной системе не совпадает с тем, что предполагается в локальной системе. Вы можете увидеть, что происходит, указав -vv (или даже больше против). Если это проблема, вы можете указать удаленный путь к rsync с опцией —rsync-path.


Я видел эту ошибку:

rsync -e 'ssh -v'

debug1: Exit status 11

rsync error: error in rsync protocol data stream (code 12) at /BuildRoot
/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/io.c(453)
[sender=2.6.9]

Я смог подключиться к удаленному хосту через ssh и обнаружил, что на диске недостаточно места.

Понравилась статья? Поделить с друзьями:
  • Error in resource files pubg code 00000d04 0021 ошибка
  • Error in resource files pubg code 00000d04 0021 как исправить
  • Error in resource files pubg code 00000d01 0021
  • Error in render rangeerror maximum call stack size exceeded
  • Error in render error cannot find module undefined