rsync faliure on iscsi disk - rsync

[root#localhost ~]# rsync -aHXA /mnt/capture-tmp/source/ /mnt/capture-tmp/dest
rsync: writefd_unbuffered failed to write 4092 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "/mnt/capture-tmp/dest/opt/StorageManager/jre/lib/i386/server/libjvm.so": Read-only file system (30)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync: connection unexpectedly closed (135188 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
"dest" is iscsi disk.I am not able to reason out the cause for the faliure??
Thank you.

Seems obvious enough:
rsync: write failed on "[...snip...]/libjvm.so": Read-only file system (30)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Remount it as read/write and try again.

Related

FileZilla: able to connect via SFTP, but failed to list directories

I used FileZilla to connect to one of my Linux servers via the SFTP protocol, but got below error stack trace.
Status: Connecting to <server_ip>...
Response: fzSftp started, protocol_version=5
Command: keyfile "C:\ruifeng_ibm.ppk"
Command: open "root#<server_ip>" 22
Status: Connected to <server_ip>
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
On the server when I ran lsof -i, I was able to see the established sshd connection.
sshd 12333 root 3u IPv4 109406 0t0 TCP <server_hostname>:ssh-><workstation_ip>:54315 (ESTABLISHED)
How could the directories not be listed when the connection is successful? No idea how to debug either.
Turned out to be a silly problem.
I put below welcome message in the .bashrc file.
echo -e "\n\nHello Ruifeng...Welcome to the Arena! \n#>>------>---->>"
Either it contained some illegal characters FileZilla does not honor, or it's completely not supported by FileZilla. Too lazy to further dig in. After removing this message, the connection worked and the directories got listed.

GCE - Can not create an instance image from the startup script

I am trying to create a GCE instance image from its startup script (just after some setup instructions). I use a command line looking like :
gcimagebundle -d "/dev/sda" -o "/tmp/" --log_file=/var/log/image_generation.log "--output_file_name=/tmp/myimage.tar.gz"
After few seconds the gcimagebundle exits and I get the following error message (from the /var/log/image_generation.log file) :
INFO:root:found platform Centos
INFO:root:File System: ext4
INFO:root:Disk Size: 10737418240 bytes
INFO:root:Resolved /dev/sda to /dev/sda
INFO:root:exclude list: (/etc/ssh/.host_key_regenerated, 0:0:0) (/dev, 0:1:0) (/proc, 0:1:0) (/run, 0:1:1) (/selinux, 0:0:0) (/tmp, 0:1:0) (/sys, 0:1:0) (/var/lib/google/per- instance, 0:1:0) (/var/lock, 0:1:1) (/var/log, 0:1:1) (/var/run, 0:1:1)
INFO:root:ignoring mounts /proc /sys /dev/pts /dev/shm /proc/sys/fs/binfmt_misc
WARNING:root:overwrite list =
INFO:root:Initializing disk file
INFO:root:Making filesystem
INFO:root:Copying contents
WARNING:root:Error while running ['rsync', '--times', '--perms', '--owner', '--group', '--links', '--devices', '--acls', '--sparse', '--hard-links', '--recursive', '--xattrs', '--exclude-from=/tmp/tmpXtECHY/tmp6Y_7Dr', '/', '/tmp/tmpXtECHY/tmpencYI_'] return_code = 11
stdout=
stderr=rsync: failed to open exclude file /tmp/tmpXtECHY/tmp6Y_7Dr: Permission denied (13)
rsync error: error in file IO (code 11) at exclude.c(1062) [client=3.0.6]
I tried to execute the same startup script on a fresh instance after a manual sudo su and all works.
I execute a whoami from the startup script and the result is root.

Errors when I rsync from a server to my local machine

I tried the following command to rsync from a server and got the following error message:
rsync -e ssh -avz name#home.com:/home/name/. .
receiving file list ... done
Desktop/Python_Nick/Python-2.4.1/
Desktop/Python_Nick/Python-2.4.1/Python/
Write failed: Broken pipe
rsync: writefd_unbuffered failed to write 4092 bytes [generator]: Broken pipe (32)
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(1121) [generator=2.6.9]
rsync error: received SIGUSR1 (code 19) at /SourceCache/rsync/rsync-42/rsync/main.c(1197) [receiver=2.6.9]
Sometimes it gives the following error:
Read from socket failed: Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
Then sometimes the following error:
Write failed: Broken pipe
rsync: connection unexpectedly closed (314764 bytes received so far) [receiver]rsync: writefd_unbuffered failed to write 4092 bytes [generator]: Broken pipe (32)
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(1121) [generator=2.6.9]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9]
I even tried using FETCH (The MAC application).
Any suggestions? The server is running LINUX and my local machine is a MAC
I had a similar problem, and my solution was to update rsync on my Mac.
As is clear from point 3 in the rsync "current issues and debugging" page, the "connection unexpectedly closed"
error tells you that the local rsync was trying to talk to the
remote rsync, but the connection to that rsync is now gone. The thing
you must figure out is why, and that can involve some investigative
work.
One of the first things suggested on this page is to update rsync. It turns out that Apple has not given us the latest rsync in their machines. Thus, I updated the rsync version on my Mac via Macports to 3.1.1. After that, I have had no problems syncing.
This is no general solution, of course, but then again there seem to be no general solution for this vague error message: if this had not worked, I had had to try and debug it. For details on how, see the above-mentioned rsync issues page.

How do lbackup backup remote files with root previllege, and without root ssh login?

Well, I currently use lbackup to backup files on my remote server. So I logged in with my account, which is NOT root.
And I got below errors, obviously, my account is NOT www-data.
Any suggestions?
$ ls -l /var/www/cache |grep cache
drwx------ 13 www-data www-data 4096 Jul 28 06:27 cache
Sun Jul 28 23:53:17 CST 2013
Hard Links Enabled
Synchronizing...
Creating Links
rsync: opendir "/var/www/bbs/cache" failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync: opendir "/var/www/bbs/files" failed: Permission denied (13)
rsync: opendir "/var/www/bbs/store" failed: Permission denied (13)
rsync: send_files failed to open "/var/www/bbs/config.php": Permission denied (13)
Number of files: 10048
Number of files transferred: 1919
Total file size: 202516431 bytes
Total transferred file size: 16200288 bytes
Literal data: 16200288 bytes
Matched data: 0 bytes
File list size: 242097
File list generation time: 0.002 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 39231
Total bytes received: 5617302
sent 39231 bytes received 5617302 bytes 50731.24 bytes/sec
total size is 202516431 speedup is 35.80
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1536) [generator=3.0.9]
WARNING! : Data Transfer Interrupted
WARNING! : No mail configuration partner specified.
To specify a mail partner configuration file add the
following line into your backup configuration file :
mailconfigpartner=nameofyourmailpartner.conf
you have two possibilities:
a) ignore the files you cannot read (--exclude=PATTERN)
b) get read persmissions for these files, either by logging in as another user or by chmod-ing the files, whatever is appropriate

cygwin rsync protocol error

I'm trying to rsync files between 64bit windows 7 and 64bit Linux. I have rsync 3.0.7 installed on both machine (cygwin version on windows).
This is the command I'm running on windows. I see it's establishing a connection to the remote machine but it just dies after authenticating and before transferring files. What could cause this problem?
rsync -vvvv localfile REMOTE-HOST:~/
FILE_STRUCT_LEN=16, EXTRA_LEN=4
cmd=<NULL> machine=REMOTE-HOST user=guest path=~/
cmd[0]=ssh cmd[1]=-l cmd[2]=guest cmd[3]=REMOTE-HOST cmd[4]=rsync cmd[5]=--server cmd[6]=-vvvvv.Lsf cmd[7]=. cmd[8]=~/
opening connection using: ssh -l guest REMOTE-HOST rsync --server -vvvve.Lsf. "~/"
note: iconv_open("UTF-8", "UTF-8") succeeded.
Password:
FILE_STRUCT_LEN=24, EXTRA_LEN=4
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
[Receiver] _exit_cleanup(code=12, file=io.c, line=601): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [Receive
r=3.0.7]
[Receiver] _exit_cleanup(code=12, file=io.c, line=601): about to call exit(12)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
[sender] _exit_cleanup(code=12, file=/home/lapo/packaging/rsync-3.0.7-1/src/rsyn
c-3.0.7/io.c, line=601): entered
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packagi
ng/rsync-3.0.7-1/src/rsync-3.0.7/io.c(601) [sender=3.0.7]
[sender] _exit_cleanup(code=12, file=/home/lapo/packaging/rsync-3.0.7-1/src/rsyn
c-3.0.7/io.c, line=601): about to call exit(12)
The problem was a conflicting git installation. Git included it's own ssh and it's path was before cygwin path, so rsync was using git's ssh. The fix was to swap the order of git/cygwin bin path so rsync was using the right version of ssh.
I found a way around this error by adding the absolute path to ssh in my call:
rsync -avzphi --chmod=ugo=rwX --checksum --delete-after -e
"C:\cwRsync\ssh.exe -p 9999 -i c:\cwRsync\ssh\test_id_rsa"
"/cygdrive/c/repository/blah.com/"
test#xx.xx.xxx.xxx:/home/test/public_html

Resources