0

I'm trying to get my yum configuration to work again but it stops at the following:

  yum update--verbose
  Config time:0.091
  Yum Version: 3.2.22
  Setting up Package Sacks
  Loading mirror speeds from cached hostfile

At the last line yum just hangs indefinitely. I noticed that there the http_proxy variable was not set and there is nothing in /etc/yum.conf that indicates a proxy but if I do set http_proxy using the following commands:

  export http_proxy=http://localhost:8080/

and then in /etc/yum.conf I set:

  proxy=http://localhost:8080/

I get the following error when running the same command above:

  yum update--verbose
  Config time:0.091
  Yum Version: 3.2.22
  Setting up Package Sacks
  Loading mirror speeds from cached hostfile
  Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
  [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
  Error: Cannot find a valid baseurl for repo: addons

The contents of the directory /etc/yum.repos.d is

  CentOS-Base.repo CentOS-Base.repo.rpmnew CentOS-Media.repo trixboxaddons.repo trixboxbeta.repo trixboxdevel.repo trixbox.repo

I also made sure that each of those repo files don't have https. How can I fix yum to update?

EDIT: It seems that I did not have a proxy running at a local machine. I removed the proxy information and yum gets stuck at loading mirror speeds from cached hostfile.

If I run the following command:

  yum update --verbose --noplugins
  Config time: 0.085
  Yum Version: 3.2.22
  Setting up Package Sacks

and yum just hangs at setting up package sacks. I did an nslookup for google.com and it returns IP addresses which means my DNS should be fine. What else could cause it to hang?

2

Odds are if you're asking about yum proxies, you don't have one running on your local machine. Don't set yum to use your local machine as a proxy.

Try doing a yum clean all, then attempting your update. It's possible you have bad local metadata and you need to start fresh. Disable all yum plugins as well, keep the config as simple as possible. If that doesn't work, make sure your gateway and DNS resolution work. Yum is dead simple, if HTTP isn't working then yum won't work either.

  • Totally agree, usually it's the problem of DNS. – GioMac Aug 15 '13 at 2:07
1

This post has become a little confusing and I am not sure why you set the proxy in the first place. however: -

in your yum.conf leave the proxy statement black

http_proxy=

If there is a real proxy server in your network test it by setting

export http_proxy=http://networkproxyserver:8080/

if no real proxy server exists on the network log out and back in or use

export http_proxy=

and try again

If you are still having issues post your yum.conf and post the results of

echo $HTTP_PROXY ; echo $HTTPS_PROXY ; echo $FTP_PROXY

If you have some how installed a local proxy, it may not be listening on localhost 172.0.0.1.

0

There's no proxy server running at the address you provided. Use the correct URL for the proxy server, or start the proxy server.

  • If I don't set a proxy, since, originally it wasn't configured to have a proxy. Why does yum hang at loading mirror speeds? – user1766888 Aug 14 '13 at 23:35
  • As a workaround, is there a way I can install postfix without using yum? – user1766888 Aug 15 '13 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.