YUM-cannot rsync

General support questions including new installations
Post Reply
davesabath
Posts: 4
Joined: 2006/03/08 18:41:20

YUM-cannot rsync

Post by davesabath » 2006/03/08 18:58:26

Hi,

I'm having trouble getting rsync to work for centos 4.2. I created the directories /var/www/html/yum/{updates,base} . I copied the rpms from the 3 installation cd's to the base directory. I'm trying to use the stanford university rsync mirror. i imported the gpg key then i ran the following command in terminal:

rsync -avrt rsync://mirror.stanford.edu/yum/pub/centos/4.2/updates/i386/RPMS/ --exclude=debug/ /var/www/html/yum/updates

when i do that, i get the following error:

rsync: failed to connect to mirror.stanford.edu: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(94)

What am I doing wrong?? Im new at Linux and I am following documentation that I found, but I keep running into this problem. Can someone help?

Dave

K_Frye
Posts: 425
Joined: 2005/07/13 01:48:35
Location: Canada

YUM-cannot rsync

Post by K_Frye » 2006/03/09 05:39:25

[quote]
davesabath wrote:
Hi,

I'm having trouble getting rsync to work for centos 4.2. I created the directories /var/www/html/yum/{updates,base} . I copied the rpms from the 3 installation cd's to the base directory. I'm trying to use the stanford university rsync mirror. i imported the gpg key then i ran the following command in terminal:

rsync -avrt rsync://mirror.stanford.edu/yum/pub/centos/4.2/updates/i386/RPMS/ --exclude=debug/ /var/www/html/yum/updates

when i do that, i get the following error:

rsync: failed to connect to mirror.stanford.edu: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(94)

What am I doing wrong?? Im new at Linux and I am following documentation that I found, but I keep running into this problem. Can someone help?

Dave[/quote]

Use a different rsync mirror:

http://www.centos.org/modules/tinycontent/index.php?id=13

I wouldn't mirror the 4.2 subdirectory if I were you. Use the ../4/ directory structure instead.

eg:

rsync rsync://rsync.arcticnetwork.ca/centos/4/updates/

Just set up your command line switches and exclusions to match what you want to do.

davesabath
Posts: 4
Joined: 2006/03/08 18:41:20

Re: YUM-cannot rsync

Post by davesabath » 2006/03/09 16:06:25

Its still not working. I still get a timeout or connection failed. Perhaps Im not writing the correct syntax. could you give me the exact wording of the command to rsync from the mirror to the appropriate directory on my centos box. see the previous thread.

Dave

K_Frye
Posts: 425
Joined: 2005/07/13 01:48:35
Location: Canada

Re: YUM-cannot rsync

Post by K_Frye » 2006/03/09 17:44:30

[quote]
davesabath wrote:
Its still not working. I still get a timeout or connection failed. Perhaps Im not writing the correct syntax. could you give me the exact wording of the command to rsync from the mirror to the appropriate directory on my centos box. see the previous thread.

Dave[/quote]

If you're not getting a file and directory listing by typing "rsync rsync://rsync.arcticnetwork.ca/centos/4/updates/", you're probably getting blocked by a firewall or proxy server.

Verify that you've got tcp/udp port 873 open and that you don't have a proxy server interfering. Read the documentation on rsyncd.conf for how to configure rsync.

For the record, this is what my rsync lines looks like:

rsync -auv -P --delete --delay-updates --exclude 'HEADER.html' --exclude 'HEADER.images' --exclude '/isos' --exclude '*/SRPMS*' --exclude '*SRPMS*' --exclude '*/ia64*' --exclude '*/alpha*' --exclude '*/ppc*' --exclude '*/s390*' --exclude '*/x86_64*' rsync://rsync.gtlib.gatech.edu/centos/4/ /cygdrive/c/users/konrad/Centos/4

rsync -auv -P --delete --delay-updates --exclude '/RPMS.dag' --exclude '/isos' --exclude '*/SRPMS*' --exclude '*SRPMS*' --exclude '*/ia64*' --exclude '*/ppc*' --exclude '*/s390*' --exclude '*/x86_64*' rsync://apt.sw.be/pub/freshrpms/pub/dag/redhat/el4/en/i386/ /cygdrive/c/users/konrad/Centos/Dag.Wieers


[b]Notes:[/b] I'm rsync'ing to a Windows PC with cwrsync because of proxy issues but the principle is the same. My destination is just a little different than your setup will be. You'll also notice that I'm mirroring Dag Wieer's repo. If you want SRPMS or alternate processor architectures, adjust accordingly. I'd suggest doing a dry run or two with the "--dry-run" switch to make sure there aren't going to be any surprises.

User avatar
WhatsHisName
Posts: 1542
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: YUM-cannot rsync

Post by WhatsHisName » 2006/03/09 19:20:09

davesabath: Based on your first post, my first code above should work, provided the target path does exist in its entirety. You are running rsync as root, aren’t you?

[code]$ su -
# rsync -a rsync://mirror.stanford.edu::/mirrors/centos/4/updates/i386/RPMS/ /var/www/html/yum/updates/[/code]
Try something simple. Ask for the rsync directories like this:

[code]$ rsync rsync://mirror.stanford.edu::

mirrors FTP Mirrors (approx 80GB)
sulinux-all FTP/WWW/etc for SULinux (requires auth)

$ rsync rsync://mirror.stanford.edu::/mirrors/
$ rsync rsync://mirror.stanford.edu::/mirrors/centos/
$ rsync rsync://mirror.stanford.edu::/mirrors/centos/4/
$ rsync rsync://mirror.stanford.edu::/mirrors/centos/4/updates/
$ rsync rsync://mirror.stanford.edu::/mirrors/centos/4/updates/i386/[/code]
Since you can usually rsync the ftp path of a mirror, you can often simplify the rsync command by using the ftp source instead of the rsync source like this (notice the difference in syntax following “::”):

[code]$ rsync rsync://rsync.arcticnetwork.ca::
$ rsync ftp.arcticnetwork.ca::
$
$ rsync rsync://rsync.arcticnetwork.ca::/centos/
$ rsync ftp.arcticnetwork.ca::centos/[/code]
All rsync commands listed above worked for me this morning.

Post Reply