NXRM mirror public yum repositories (instead of proxy)

Hello Nexus community,

I’m looking to find a way to mirror entire, large yum repositories (i.e. http://mirror.centos.org ) as NXRM yum repos.

I know the preferred way is to have “proxy” repos (which I’m currently using), but I’m curious to see if it’s possible to also create full mirrors? If anyone is already doing this (or has an idea) I would really value your advise.

Thanks in advance,
Chris

no ideas/opinions on that? :frowning:

There is no way to do this natively from NXRM but a way to achieve it might be to write a script to fetch the repomd.xml and then use that to fetch the primary.xml.gz file and then run through it fetching each package. You could run such a script periodically with CRON.

I’m curious, why the need to mirror the whole repository?

hi @jstephens,

thanks a lot for your response.

might be to write a script to fetch the repomd.xml and
then use that to fetch the primary.xml.gz file and then
run through it fetching each package

thanks, that’s what I thought, but just wanted to be sure that I didn’t miss any existing feature for mirroring

I’m curious, why the need to mirror the whole repository?

I’m trying to use NXRM yum proxy repos to serve the official centos repos to machines that don’t have Internet access, but I’m seeing a lot of timeouts with the yum client.

yum update
[...]
kernel-debuginfo-3.10.0-957.12 FAILED
http://nexus/repository/proxy-centos-debuginfo/7/x86_64/kernel-debuginfo-3.10.0-957.12.2.el7.x86_64.rpm: [Errno 12] Timeout on http://nexus/repository/proxy-centos-debuginfo/7/x86_64/kernel-debuginfo-3.10.0-957.12.2.el7.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
kernel-debuginfo-3.10.0-957.12 FAILED
http://nexus/repository/proxy-centos-debuginfo/7/x86_64/kernel-debuginfo-3.10.0-957.12.2.el7.x86_64.rpm: [Errno 12] Timeout on http://nexus/repository/proxy-centos-debuginfo/7/x86_64/kernel-debuginfo-3.10.0-957.12.2.el7.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.

it usually works after a couple of retries, so I guess that’s caused by the time the NXRM server needs to fetch data from the source repo. So I guess a mirror repo might be a better fit for this usecase?

If the files you are downloading are especially large or you are on a slow connection then likely you’ll want to increase the timeout in /etc/yum.conf (it defaults to 1 minute). The reason for this is that NXRM can’t start returning content until it is fully cached in the repository but the YUM client expects a constant stream of bytes and timeout when it hasn’t seen anything past the configured timeout.

you’ll want to increase the timeout in /etc/yum.conf (it defaults to 1 minute)

thanks for the hint!