Support Questions

Find answers, ask questions, and share your expertise

Unable to install HDP with Ambari on offline repository


I am trying to install HDP with Ambari using offline repository and have Completed all prerequisites including:

  • hosts entries, hostname, firewall disabled, iptables etc
  • Java update, MySQL installation with connector, HTTP service installation.
  • Repository creation for offline HDP, HDP UTILS, AMBARI and modified .repo files properly to point local url.

After all above prerequisites I can see web folders from browser, can perform wget to copy files, but when try to install yum install ambari-server get following error.


[root@hdf03 ~]# yum install ambari-server

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base:

* extras:

* updates:

ambari- | 790 B 00:00:00 http://hdf03.ufm/repo/ambari/centos7/ [Errno -1] Error importing repomd.xml for ambari- Damaged repomd.xml file Trying other mirror. One of the configured repositories failed (ambari Version - ambari-, and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=ambari- ...

4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable ambari- or subscription-manager repos --disable=ambari- 5. Configure the failing repository to be skipped, if it is unavailable.

Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=ambari- failure: repodata/repomd.xml from ambari- [Errno 256] No more mirrors to try. http://hdf03.ufm/repo/ambari/centos7/ [Errno -1] Error importing repomd.xml for ambari- Damaged repomd.xml file


Can any body help me where I am missing something or doing wrong because in another installation when I connected to open internet it worked fine even it was also offline repository.

What I have learned from previous installations local repositories url are not resolved during installation while same url are accessible using browser.


Super Collaborator

Hi @Naeem Ullah Khan,

it's looks like an issue with proxy-server. if you are using proxy-server please add in /etc/yum.conf

Super Mentor

@Naeem Ullah Khan

Please define your Network proxy server details inside the "/etc/yum.conf" file something like following [proxy=]:

# cat /etc/yum.conf 

Then perform "yum clean all" and then try installing packages again.

# yum clean all


Also please verify if you are able to make the curl call to the same URL using proxy? If the proxy is being used then in the Output of the curl call you should see the header info if the proxy is being used or not?

# curl -iLv http://hdf03.ufm/repo/ambari/centos7/

If the above call is not working then please add the Environment variable in your "~/.bash_profile"

export http_proxy=
export https_proxy=${http_proxy}



Dear Jay,

Thank you for your reply I was already thinking you will reply as I am one of your followers. I have tried the steps you suggested but problem is still there.

Yes I am using proxy and yum install was working fine on this proxy for update, mysql server and ntp but now producing error while I have not made any change in the system except setup local repository on /var/www/htmo/repo folder and created .repo files for offline repositories.

It looks there is some url resolution issue using proxy but I am unable to find it. But as I already mentioned that when I use IP address having internet access without proxy same local urls are resolved and are accessible to yum command.

Hope you can understand my problem.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.