LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2010, 10:47 AM   #1
ginoboy
LQ Newbie
 
Registered: Oct 2009
Distribution: Slackware
Posts: 14

Rep: Reputation: 0
rsync don't works with many files...


Guys, is this, I maintain some packages my synchronized with my remote server but I have a problem ... is very hard to understand, time it works, time not works. When not working the following happens:

Code:
[root@xxxx repository]# rsync -avzP --delete-after --partial-dir=.partial-dir rsync://xxxx@xxx.xx.xxx.xxx/repositorio 13.1
Password: 
receiving file list ... 
178 files to consider
rsync error: timeout in data send/receive (code 30) at io.c(137) [sender=3.0.7]
rsync: connection unexpectedly closed (6990 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
rsync: connection unexpectedly closed (6990 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [generator=3.0.6]
this happens when you have many files.... strange

I'm using slackware 13.1...

any idea?
 
Old 10-23-2010, 01:05 PM   #2
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
178 files is a small number of rsync. You should have a look at your network connections.
 
Old 10-23-2010, 03:20 PM   #3
ginoboy
LQ Newbie
 
Registered: Oct 2009
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by escaflown View Post
178 files is a small number of rsync. You should have a look at your network connections.
Yes, but if a few files (less than 50 for example) works fine.

If I synchronize folders over the local LAN, it works. But it happens on the Internet.

Anyone have any examples of configuration of rsync?

Difficult to understand. On the local network works fine, but if I give this problem on the Internet (port 873 is open on my system).

Thanks.
 
Old 10-23-2010, 03:50 PM   #4
maxmiorim
Member
 
Registered: Sep 2010
Location: Brazil
Distribution: Slackware
Posts: 43

Rep: Reputation: 8
You can try without compression (remove the -z from the command line), use a high value for --timeout (even though it's 0 by default, which means it shouldn't timeout at all) or use rsync over ssh.

Personally, I like to use rsync over ssh because a couple of ISPs that I know tend to prioritize SSH, which helps to avoid such timeouts.

Also, rsync -vvvv in both sides should spit out more details that might help you, like the protocol version used, wether keep-alive packets are being sent or not, what happens right before the timeout and etc.
 
1 members found this post helpful.
Old 10-23-2010, 07:17 PM   #5
ginoboy
LQ Newbie
 
Registered: Oct 2009
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
I've tried using without compression..

max, you can give me an example of how you use via SSH?

abraço
 
Old 10-23-2010, 08:22 PM   #6
maxmiorim
Member
 
Registered: Sep 2010
Location: Brazil
Distribution: Slackware
Posts: 43

Rep: Reputation: 8
It's pretty much like any ssh tunnel:

1 - Establish the tunnel
Code:
ssh -L 8873:the.remote.host:873 -fNC localhost
The above line will make ssh act like a SOCKS proxy, sending the requests to 127.0.0.1:8873 through localhost to the.remote.host:873.
It will enable compression (-C), go into background (-f) and don't allocate a pseudo-terminal (-N). See ssh(1).


2 - Rsync through it
Code:
rsync -avP --delete-after --partial-dir=.partial-dir rsync://127.0.0.1:8873/repositorio 13.1
It's almost the same thing that you use, except that here compression is disabled (ssh is taking care of it, remember?) and you send the requests to 127.0.0.1:8873 (which goes to the.remote.host:873 through the tunnel).

3 - Kill the tunnel
Code:
pkill -TERM -x "ssh -L 8873:the.remote.host:873 -fNC localhost"
Note: netstat and lsof will give you the PID with a bit of awk/grep, then you can kill it using the ol' good kill if you don't like/want to use pkill.
 
Old 10-24-2010, 06:15 AM   #7
ginoboy
LQ Newbie
 
Registered: Oct 2009
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Hi Max, see:
Code:
$ssh -L 8873:myip:873 -fNC localhost
$rsync -avP --delete-after --partial-dir=.partial-dir rsync://127.0.0.1:8873/sbo slackbuilds 
receiving file list ... 
19307 files to consider
created directory slackbuilds
./
rsync error: timeout in data send/receive (code 30) at io.c(137) [sender=3.0.7]
rsync: connection unexpectedly closed (445368 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
rsync: connection unexpectedly closed (445365 bytes received so far) [generator]                                                                            
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [generator=3.0.6]
 
Old 10-24-2010, 05:54 PM   #8
maxmiorim
Member
 
Registered: Sep 2010
Location: Brazil
Distribution: Slackware
Posts: 43

Rep: Reputation: 8
Hmm, I'm getting out of ideas. :\

Did you read [1] already?

Also, are you sure it's not a network problem like packet loss or some kind of shaper dropping the packets to throttle the transfer rates? The rsync option --bwlimit may help to work around the latter.


[1] - http://samba.anu.edu.au/rsync/issues.html
 
Old 06-19-2015, 12:47 AM   #9
plofkat
LQ Newbie
 
Registered: Sep 2011
Distribution: Debian Squeeze
Posts: 5

Rep: Reputation: Disabled
I have the same problem with rsync timing out after a day or so.

I am copying server images (almost 7TB)
At the moment, as a work around I am splitting the copy into smaller groups to see if that works.

File copy is on local lan - Gigabit network with 6gbps backbone between switches

The error I get after a few hours:
Code:
rsync: connection unexpectedly closed (85406994 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
 
Old 06-21-2015, 05:35 PM   #10
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
ginoboy --

I have had occasional indeterminate issues with remote rsync servers from time-to-time myself. The issues are on machines where I've got no admin rights so I've not bothered to debug.

OTOH ... If there is an ssh server open on the remote server, you can also invoke the rsync -e '<<ssh shell>>' syntax.

Assuming:
Code:
   uuuuuuuu is your remote username, 
   xxx.xxx.xxx.xxx is the Source Machine's IP Addr,
   /remote/path/to/repositorio is the full path to the remote Source directory and ...
   /local/path/to/13.1 is the directory on your local machine containing the 13.1 Target directory.
You'll need to convert the rsync server Source directory ( repositorio ) to a full path on the remote machine and you'll need permissions to reach it !

The following command should work without having to set up a separate ssh tunnel ( note the single-quote pair around the -e arg the -p <<PORT>> Arg is optional if ssh listens on port 22 ):

Code:
rsync -e 'ssh -p 22 -l UUUUUUUU' -Pavz --delete-after --partial-dir=.partial-dir xxx.xx.xxx.xxx:/remote/path/to/repositorio /local/path/to/13.1
Maybe this will help ?

-- kjh
 
Old 06-21-2015, 07:20 PM   #11
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by ginoboy View Post
Guys, is this, I maintain some packages my synchronized with my remote server but I have a problem ... is very hard to understand, time it works, time not works. When not working the following happens:

Code:
[root@xxxx repository]# rsync -avzP --delete-after --partial-dir=.partial-dir rsync://xxxx@xxx.xx.xxx.xxx/repositorio 13.1
Password: 
receiving file list ... 
178 files to consider
rsync error: timeout in data send/receive (code 30) at io.c(137) [sender=3.0.7]
rsync: connection unexpectedly closed (6990 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
rsync: connection unexpectedly closed (6990 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [generator=3.0.6]
this happens when you have many files.... strange

I'm using slackware 13.1...

any idea?
If you had opened your web browser and used google, you would have seen the very first search result provided a serverfault.com thread discussing a very similar question.

http://serverfault.com/questions/370...s-with-timeout

To summarize, run tcpdump that listens on the rsync port and run strace on the rsync process. You will find your answer within the output of those commands.

More than likely you just have intermittent internet connectivity that is causing your rsync session to error out.

Last edited by mralk3; 06-21-2015 at 07:21 PM.
 
Old 06-23-2015, 12:28 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by mralk3 View Post
If you had opened your web browser and used google, you would have seen the very first search result provided a serverfault.com thread discussing a very similar question.

http://serverfault.com/questions/370...s-with-timeout

To summarize, run tcpdump that listens on the rsync port and run strace on the rsync process. You will find your answer within the output of those commands.

More than likely you just have intermittent internet connectivity that is causing your rsync session to error out.
plofkat necro'd the thread. You quoted the original post, which was made back in 2010, where the serverfault question was in 2012.
 
Old 06-23-2015, 06:26 PM   #13
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by bassmadrigal View Post
plofkat necro'd the thread. You quoted the original post, which was made back in 2010, where the serverfault question was in 2012.
I hate necros!

 
Old 06-24-2015, 11:45 AM   #14
rouvas
Member
 
Registered: Aug 2006
Location: Greece
Distribution: Slackware.12.2
Posts: 104
Blog Entries: 3

Rep: Reputation: 21
You are seeing this problem, because

The remote server is taking too long to respond to the rsync request, ergo the rsync from client-side drops the connection or thinks that the connection has been somehow been lost.

Monitor the load on the remote server or check for other h/w issues (maybe faulty disks, faulty NICs, etc)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync can not rsync files with include filter... xiutuo Linux - Server 2 07-23-2010 02:10 AM
need to rsync only selected files (--files-from) also need to delete files on dest. ? BrianK Linux - General 5 10-22-2009 09:52 PM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
[SOLVED] rsync works differently under tcsh than bash? Vanyel Linux - Software 2 09-01-2009 09:55 AM
rsync works in one direction, but not the other hroit Linux - Desktop 7 08-14-2007 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration