GearHack

: :

Add Comment | Related Links | TrackBack
Related Content

rsync errors

Recently, I haven't been able to transfer files between two shell accounts using rsync and scp. Today, I decided to tackle the problem. When I issue rsync from one server, I get the following error message:

unexpected tag 94
rsync error: error in rsync protocol data stream (code 12) at io.c(689)

From the other server, I get the following error message:

protocol version mismatch - is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(60)

Very particular problems indeed. I search on the web but got no viable results. But I remembered recently that I had installed the TimeOutNotify.sh (GPL) script. After removing the script from my startup file, the transfer worked just fine.

I guess my startup scripts needs to be a little smarter. Only run the TimeOutNotify.sh script when I log in, but not when rsync and scp log in. But I have no clue how to do that yet . . . anyone?

Chieh Cheng
Fri, 14 Dec 2007 10:44:03 +0000

Ok, I figured it out. To determine if the shell is interactive, you can check the $- variable. If the content of the variable includes the character 'i', then the shell is interactive. See the following example:

interactive=`echo $- | grep -c "i"`
if [ $interactive -eq 1 ]
then
TimeOutNotify.sh &
fi

Chieh Cheng
Fri, 14 Dec 2007 11:03:57 +0000

I bumped into this problem again today. I got the "protocol version mismatch" error again. But luckily this time, I knew exactly what I did to cause it. I place "echo" calls inside my ".cshrc". Apparently, rsync can't handle any outputs to stdout. I guess I'll have to use the interactive flag all over.

Chieh Cheng
Sat, 20 Jun 2009 02:31:15 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

Title: rsync with server on non-standard SSH port
Weblog: GearHack
Excerpt: Recently, I've moved some of my web sites over to a hosting service with WebHostingBuzz. WebHostingBuzz provides SSH access, except it uses a non-standard port (not port 22). So when I do rsync to transfer files, I had to use the following form: rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [D . . .
Tracked: Sat, 20 Jun 2009 02:32:09 +0000

Title: RelayTransfer.sh (GPL)
Weblog: Cynosure.X International
Excerpt: Have you ever wanted to transfer some files from your computer to a computer on a different network. Your computer can't talk directly to that computer. So you'll have to first transfer the files to a relay computer that could see both network. Then transfer the files over to the destination compute . . .
Tracked: Sat, 20 Jun 2009 02:34:39 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 4 + 6?
Click button only once, please!

Messages, files, and images copyright by respective owners.


Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

88 Users Online



Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 2004 - 2024. All Rights Reserved.