Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4874 - rsync mirrors
Summary: rsync mirrors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Sascha Schwabbauer (RETIRED)
URL:
Whiteboard:
Keywords:
: 5047 5697 (view as bug list)
Depends on: 9964
Blocks: 6213
  Show dependency tree
 
Reported: 2002-07-11 11:59 UTC by Markus Krainer
Modified: 2003-02-04 19:42 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Krainer 2002-07-11 11:59:36 UTC
just made 'emerge rsync' 2 times and both didn't work:
- 1st mirror has a maximum of only 5 connections (don't think this is 
  really much)
- 2nd mirror fails with '@ERROR: chroot failed'

To avoid people switching to the "good" mirrors (and thus circumvent round-robin
balancing) I think it's important to 
a) have some minimum requirements regarding max.conn.
b) test them from time to time (maybe can be automated)

(See also the message <1026313682.4997.41.camel@belkelel.dyndns.org> from
Dar@Dar-Klajid.de on gentoo-dev)

  -Markus-


--- output of 'emerge rsync' ----

gandalf root # emerge rsync
>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
,----------------
|  Welcome to rsync1.uk.gentoo.org!
|
|  For info on Gentoo Linux, see <http://www.gentoo.org/>.
|
|  For more on this server, see <http://vegetable.org.uk/>.
|
   If you're not doing so already, please consider compressing the connection
   here by using rsync -z ; you can edit /usr/sbin/emerge (or /usr/bin/emerge
   in newer versions of portage) to assert this.


@ERROR: max connections (5) reached - try again later
rsync: connection unexpectedly closed (461 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
gandalf root # emerge rsync
>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
                 Welcome to SunSITE.dk
                 =====================

SunSITE Denmark is located at Aalborg University, Institute of
Electronic Systems, Denmark, and is running on a Sun Enterprise E3500
Server with 2 CPUs, 2 GB Memory and approximately 240 GB storage.

The server was kindly donated by Sun Microsystems. Aalborg University,
Mortens Recipe Collection, 3Com Nordic, Silcon Group and CLARiiON are
sponsoring the project.

DISCLAIMER: Neither Aalborg University nor Sun Microsystems are liable
for any use, storage or transmission of any files stored on this
archive.

Please email suggestions and questions to staff@sunsite.dk

Access our ftp area by anonymous rsync like

rsync -avz sunsite.dk::ftp/pub/<path>

Section         Content
======================================================================

@ERROR: chroot failed
rsync: connection unexpectedly closed (867 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
Comment 1 Sandy McArthur 2002-07-11 17:43:18 UTC
Thank you very much for this information. I do test all the mirrors on pretty
much a weekly basis but that is really quite limited because it doesn't always
test at peak usage hours. I'm mostly testing that they have a current mirror of
the content. Because I don't ahve root on all the boxes that host mirros I have
no way of knowing what exactly how each is set up. I'll see if I can come up
with some more tests to test things like the max connection settings.
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2002-07-14 18:24:13 UTC
Looks like they upped their number of connections, but only by two. Just
received the following:

>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
,----------------
|  Welcome to rsync1.uk.gentoo.org!
|  
|  For info on Gentoo Linux, see <http://www.gentoo.org/>.
|  
|  For more on this server, see <http://vegetable.org.uk/>.
|  
   If you're not doing so already, please consider compressing the connection
   here by using rsync -z ; you can edit /usr/sbin/emerge (or /usr/bin/emerge
   in newer versions of portage) to assert this.
   

@ERROR: max connections (7) reached - try again later
Comment 3 Brian Rozmierski 2002-07-16 19:28:58 UTC
Here's another '5 user' site..

>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
         ____  _   _ _     __  __    _
        | __ )| | | | |   |  \/  |  / \
        |  _ \| | | | |   | |\/| | / _ \
        | |_) | |_| | |___| |  | |/ ___ \
        |____/ \___/|_____|_|  |_/_/   \_\

Bienvenido a rsync1.es.gentoo.org

Este servidor esta situado en Palma de Mallorca, Espa
Comment 4 Brian Rozmierski 2002-07-16 19:28:58 UTC
Here's another '5 user' site..

>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...
         ____  _   _ _     __  __    _
        | __ )| | | | |   |  \/  |  / \
        |  _ \| | | | |   | |\/| | / _ \
        | |_) | |_| | |___| |  | |/ ___ \
        |____/ \___/|_____|_|  |_/_/   \_\

Bienvenido a rsync1.es.gentoo.org

Este servidor esta situado en Palma de Mallorca, España

Hospedado por BULMA, el LUG de las Baleares
Bisoños Usuarios de Linux de Mallorca y Alrededores
Bergantells Usuaris de Linux de Mallorca i Afegitons

http://bulmalug.net

Email: gentoo-mirror@bulma.net

@ERROR: max connections (5) reached - try again later
rsync: connection unexpectedly closed (567 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
Comment 5 Brian Rozmierski 2002-07-23 16:01:35 UTC
Here's a 10 user site. (both tried just before the bug comments were posted.)

Question: How many users is too few?

>>> starting rsync with rsync://rsync.gentoo.org/gentoo-portage...

---------------------------------------------------------------------------
                        F T P . O R S T . E D U
                        Oregon State University

       Unauthorized use is prohibited - violators will be prosecuted
---------------------------------------------------------------------------

          For more information on accessing these archives visit:
                  http://www.net.oregonstate.edu/ftp/

---------------------------------------------------------------------------

@ERROR: max connections (10) reached - try again later
Comment 6 Troy Dack 2002-07-28 18:53:16 UTC
I've encountered this a few times (the limited # of users) and it is a little
annoying, often requiring repeated rsync attempts until the round-robin dns
spits out a different server.

Perhaps the rsync functionality of portage/emerge could be modified to allow
users to specify a number of retries if there is an rsync failure eg: an env var
RSYNC_RETRIES=3

Then when a mirror returns an error portage could attempt connection again.

I don't think portage should allow unlimited retries though, the user setting
should be checked to ensure it is within sane limits (say 5-10 retries max). 
There is no point in having all the gentoo users performing the equivelant of a
DDoS because they have set their retries to 100000.

-- 
     Troy Dack.
Comment 7 SpanKY gentoo-dev 2002-08-02 23:17:48 UTC
*** Bug 5697 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2002-08-03 23:30:07 UTC
*** Bug 5047 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2002-08-08 14:02:00 UTC
*** Bug 6213 has been marked as a duplicate of this bug. ***
Comment 10 Tom Ribbens 2002-08-13 09:41:26 UTC
I think all mirrors should decide for themselves how many users they want max, 
but to reduce load of the master server it should be at least 2. emerge just 
should notice errors, and try the next server. 

About retrying: maybe there could be made a difference in what kind of error: 
obviously, the max users error is very likely to be solved at the next server, 
but if it can't reach the mirror due to network probles, it doesn't solve 
itself automatically. I suggest endless retries (or a very large number) if 
it's 'cause of max users, and only a couple retries if there is some other 
kind of error.
Comment 11 SpanKY gentoo-dev 2002-08-13 10:27:56 UTC
i'd agree, that a 'good' solution would be for emege to walk the list of rsync 
mirrors until it either hits a good one or hits a repeat address
Comment 12 Brian Rozmierski 2002-08-14 13:22:33 UTC
Not being an rsync fanatic, is there a way for rsync to indicate the failure   
was due to a concurrent user limitation? There doesn't appear to be an   
apparent exit value in the man page for rsync.   
   
If it can't, while I don't think we should be turning away rsync mirrors   
(especially as Gentoo grows), I don't think we should be setting an ubsurdly   
large number of retries either.   
   
Perhaps the best balance can be struck in the 'local-balancing' DNS calls.   
Perhaps require the mirrors to, as Tom suggested (in comment 5), require >= 2 
concurrent connections, and keep the gentoo-rsync-DNS-guy apprised of the 
current value. Then use those numbers to 'tweak' how often the DNS server(s) 
spit out that IP address. I.E. A server w/ 500 connections will get hit ~10x 
more often then one with 50.   
   
Obviously this will need to be worked on as the ones with 2 connections would   
rarely see activity, while the large mirrors would get pounded.   
   
... Just a thought.   
Comment 13 Andrew Sayman 2002-08-15 17:09:20 UTC
How about this horrible message:&#013;&#013;&gt;&gt;&gt; starting rsync with rsync://rsync.gentoo.org/gentoo-portage...&#013;rsync: failed to connect to rsync.gentoo.org: Connection refused&#013;rsync error: error in socket IO (code 10) at clientserver.c(97)&#013;&#013;&gt;&gt;&gt; Updating Portage cache...  &#013;
Comment 14 SpanKY gentoo-dev 2002-08-15 17:46:09 UTC
thats not really horrible, it just timed out
ive seen it once or twice
Comment 15 Andrew Sayman 2002-08-16 03:59:30 UTC
No... it happens instantly and has been the only response I've gotten over 30-40
tries over the last few days. That's what makes it horrible.
Comment 16 Tom Ribbens 2002-08-16 04:51:52 UTC
Network problems? New firewall installed?
Comment 17 Jonathan Morton 2002-09-07 14:43:21 UTC
I'm not too concerned about number-of-user limits, although more graceful
handling of these failures would be a Good Idea.

My concern is with mirrors that simply don't work at all.  For example, there's
one server that's not responding to connections at all, and which I got on three
consecutive tries this afternoon, and a couple of times yeterday too.  It looks
like someone's set up a mirror on their own DSL line, and has simply switched
the machine off.  Other comments here suggest that misconfigured servers are
also a problem.

Back to the subject of user limits and load-balancing, proportional DNS is
actually a good idea.  Servers with high user limits will get hammered, sure,
but the high user limit is supposed to denote a server that's capable of taking
that hammering.  If it's too much, they can lower the limit and accept less
users.  Servers with low user limits won't be left in the dark - they'll get a
proportionate segment of what is now a very large userbase, which in turn works
out to be quite a good number.  If they want more users, they can again adjust
their user limit.
Comment 18 Sascha Schwabbauer (RETIRED) gentoo-dev 2003-01-25 04:06:54 UTC
We have a minimum requirement of 5 connections, so that uk server is ok..
and the sunsite.dk server is fixed and up again..

regards