I am working on CentOS 6.4. I have setup a local repository using apache server. The path of the local repository is /var/www/html.

The etc/yum.conf file has a proxy server mentioned through "proxy=xxx.xxx.xxx.xxx:8080"

when I execute the command "yum update all". I get the following error:

http://local.repo.com/HDP/centos6/2.x/updates/ [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 503 Service Unavailable"

I am able to browse to this .xml file from other machines in the network. I am not sure what I am missing.

  • Looks like a permission issue on your local repo. Can you post the permissions of files/directories under /var/www/html ?
    – Sreeraj
    Nov 20, 2015 at 5:32
  • There are huge number of folders and files under various directories under /var/www/html. Following is the result on repomd.xml -rw-r--r-- 1 ambari-qa users 2997 Oct 1 05:29 repomd.xml
    – KurioZ7
    Nov 20, 2015 at 5:38
  • Is the network/IP of that machine authorised to make requests to that proxy? Nov 20, 2015 at 8:26
  • I can confirm that the this machine is authorized to access the proxy. I think YUM is trying to access local.repo.com through proxy and it doesn't find it. But I am not sure.
    – KurioZ7
    Nov 20, 2015 at 8:34
  • I think your repo file is not correct. Please post this one also
    – cristi
    Nov 21, 2015 at 19:25

1 Answer 1


I have resolved this issue. The problem was with the Apache Server, which was set up to serve as local repository. Even though I was able to ping the Fully Qualified Domain Name (FQDN)(local.repo.com) of the server, it seems that Yum was not able to reach the server server through (http://local.repo.com) "http" protocol. What I observed was this:

1) The etc/host file had an IP-FQDN mapping for local.repo.com

2) The Apache server had the following entry in /etc/httpd/conf/httpd.conf

<VirtualHost local.repo.com:80>
        ServerName local.repo.com
        <Directory /var/www/html/>
                Options Indexes FollowSymLinks
        </Directory> </VirtualHost>

Since I could not figure out why Yum couldn't access the local repo through HTTP protocol i.e.; (http://local.repo.com), I did the following:

1) removed the above lines from httpd.conf file

2) In all the .repo files, mentioned the IP address instead of FQDN.

3) I did not remove IP-FQDN mapping for local.repo.com from the /etc/hosts file

4) In the /etc/yum.conf file, I mentioned the following



(Please note that the above steps, fixed the issue I was failing. There could be more proper answer to this problem).

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.