Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

yum: ignore errors

279 views
Skip to first unread message

Teo

unread,
May 2, 2007, 5:23:37 AM5/2/07
to
Hi,

I would like to know if there is a way to tell yum to ignore a
repository if there is network error. I do regular updates but when a
repository has a problem, e.g.,

Could not retrieve mirrorlist http://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable
error was
[Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Error: Cannot find a valid baseurl for repo: kde

yum stops.

What I would like is to ignore the repository with a problem (in this
case kde) and continue with the others (something similar to
automatically setting --disablerepo if the repository is not
reachable).

Many thanks,

Matteo

eamsy...@gmail.com

unread,
May 2, 2007, 11:00:55 AM5/2/07
to
On May 2, 4:23 am, Teo <matteo.co...@gmail.com> wrote:
> Hi,
>
> I would like to know if there is a way to tell yum to ignore a
> repository if there is network error. I do regular updates but when a
> repository has a problem, e.g.,
>
> Could not retrieve mirrorlisthttp://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable

> error was
> [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
> Error: Cannot find a valid baseurl for repo: kde
>
> yum stops.
>
> What I would like is to ignore the repository with a problem (in this
> case kde) and continue with the others (something similar to
> automatically setting --disablerepo if the repository is not
> reachable).
>
> Many thanks,
>
> Matteo

Try yum -disablerepo= <reponame> so

yum -y -disablerepo=[dries] install httpd

to install apache webserver - not exactly sure about the syntax but
you ca run yum without any parameters and it will tell you how to do
it.


eamsy...@gmail.com

unread,
May 2, 2007, 11:04:18 AM5/2/07
to
On May 2, 4:23 am, Teo <matteo.co...@gmail.com> wrote:
> Hi,
>
> I would like to know if there is a way to tell yum to ignore a
> repository if there is network error. I do regular updates but when a
> repository has a problem, e.g.,
>
> Could not retrieve mirrorlisthttp://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable

> error was
> [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
> Error: Cannot find a valid baseurl for repo: kde
>
> yum stops.
>
> What I would like is to ignore the repository with a problem (in this
> case kde) and continue with the others (something similar to
> automatically setting --disablerepo if the repository is not
> reachable).
>
> Many thanks,
>
> Matteo

within /etc/yum.repo/kde.redhat.repo there should be a line like so

enable=1 set this to 0 to disable the repo

Teo

unread,
May 2, 2007, 11:08:11 AM5/2/07
to
On May 2, 5:00 pm, "eamsysad...@gmail.com" <eamsysad...@gmail.com>
wrote:

Thanks eamsysadmin,

the problem is that this has to be done manually (I cannot for example
exclude problematic repos automatically). I am looking for a way to
ignore repos with connection errors automatically.

Matteo

eamsy...@gmail.com

unread,
May 2, 2007, 11:50:19 AM5/2/07
to

Doesn't yum automatically ignore errors? I believe it continues on to
the next repo if it fails. I use Fedora Core 6 and Centos

Ken

unread,
May 2, 2007, 7:12:38 PM5/2/07
to

By default, it won't select a repo with a problem. However, if what you
are looking for is to continue with the installs/updates skipping a
package that it cannot get a prereq for, that would be yum-skip-broken.

You might want to also have yum-protectbase and yum-fastestmirror.

Ken

Teo

unread,
May 4, 2007, 3:30:11 AM5/4/07
to
On May 2, 5:50 pm, "eamsysad...@gmail.com" <eamsysad...@gmail.com>

I'm using FC6 and in my case it stops as soon as one repository is not
reachable. Maybe there is a setting to make it ignore errors but I
didn't find it...

Matteo

Teo

unread,
May 4, 2007, 3:32:01 AM5/4/07
to
On May 3, 1:12 am, Ken <nob...@nowhere.com> wrote:
> Teo wrote:
> > Hi,
>
> > I would like to know if there is a way to tell yum to ignore a
> > repository if there is network error. I do regular updates but when a
> > repository has a problem, e.g.,
>
> > Could not retrieve mirrorlisthttp://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable

> > error was
> > [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
> > Error: Cannot find a valid baseurl for repo: kde
>
> > yum stops.
>
> > What I would like is to ignore the repository with a problem (in this
> > case kde) and continue with the others (something similar to
> > automatically setting --disablerepo if the repository is not
> > reachable).
>
> > Many thanks,
>
> > Matteo
>
> By default, it won't select a repo with a problem. However, if what you
> are looking for is to continue with the installs/updates skipping a
> package that it cannot get a prereq for, that would be yum-skip-broken.
>
> You might want to also have yum-protectbase and yum-fastestmirror.
>
> Ken

Dear Ken,

I want to ingore a whole repository not just a single package. If one
of the repositories is not reachable at all I cannot even do a yum
list or you search: it stops when contacting the problematic server.

Matteo

Ken

unread,
May 4, 2007, 6:54:36 PM5/4/07
to

It might help to say what repo and what package and the reason it gives
for the failure. There can be conflicts that will terminate the updates.
They have to be resolved, manually.

Ken

Teo

unread,
May 9, 2007, 2:47:40 AM5/9/07
to

Dear Ken,

mine is a much simpler problem: I'm using a fair amount of repository
(atrpms, dries, macromedia, livna, core, unl-stable, updates,
freshrpms, dribble and extras) and some of them have just one site (no
mirrors). If a repository is not reachable (network or server problem)
yum stops. I would like it to continue with the others. I have no
problems with packages or dependencies.

Matteo

Teo

unread,
May 9, 2007, 4:10:14 AM5/9/07
to

Here I have an example with a dummy erroneous server:

[root@matteo yum.repos.d]# yum list *somerepo*
Loading "priorities" plugin
Loading "kmdl" plugin
Loading "presto" plugin
Loading "dellsysidplugin" plugin
Loading "installonlyn" plugin
Loading "downloadonly" plugin
Loading "skip-broken" plugin
Loading "fastestmirror" plugin
Loading "protectbase" plugin
Setting up repositories
http://example.com/someurl/repodata/repomd.xml: [Errno 14] HTTP Error
404: Date: Wed, 09 May 2007 08:07:14 GMT
Server: Apache/2.0.54 (Fedora)
Content-Length: 302
Connection: close
Content-Type: text/html; charset=iso-8859-1

Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: test

In this case yum stops since it cannot connect to the URL of the
"test" repository (example.com). What I am looking for is a way to
ignore the error and continue with the other repositories. If I want
to install something from the extras repository and as an exampke the
macromedia server is down I don't care I would like to automatically
ignore macromedia without having to specify --disablerepo=macromedia.

Matteo

0 new messages