Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

installing ambari with local repository and no internet access

avatar
Super Collaborator

I am following Hortonworks document for this and they are mentioning and have setup the ambari.repo file but install is failing , please see what I am doing wrong, also attaching the screenshot showing that the repository directory is accessable from web.

getting following error:

http://hadoop1/AMBARI-2.4.2.0/centos6/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 504 Gateway Timeout"
Trying other mirror.


the repond.xml file is there and accessable

[root@hadoop1 yum.repos.d]#
[root@hadoop1 yum.repos.d]# ls /var/www/html/AMBARI-2.4.2.0/centos6/2.4.2.0-136/repodata/repomd.xml
/var/www/html/AMBARI-2.4.2.0/centos6/2.4.2.0-136/repodata/repomd.xml
[root@hadoop1 yum.repos.d]#


though the document is saying to set the base url as "http://<web.server>/Ambari-2.4.2.0/<OS> " but the respomd.xml file is the <OS><RELEASE> directory , I tried both but no luck.

the ambari.repo file is shown below:

[root@hadoop1 yum.repos.d]# more ambari.repo
#VERSION_NUMBER=2.4.2.0-22
[Updates-ambari-2screenshot.jpg.4.2.0]
name=ambari-2.4.2.0 - Updates
baseurl=http://hadoop1/AMBARI-2.4.2.0/centos6/2.4.2.0-136
gpgcheck=0
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Sami Ahmad

Looks like you have another repo file present inside your "/etc/yum.repos.d" directory which has the following Host entry in it:

http://hadoop1.tolls.dot.state.fl.us

.

Can you please try to grep that host name from where is it coming from?

# cd /etc/yum.repos.d
# grep 'hadoop1.tolls.dot.state.fl.us' *.repo

(OR)

# find . -name "*.repo" | xargs grep -i "hadoop1.tolls.dot.state.fl.us"

.

In the output of the above command if you find any such hostname then move that repo file somewhere else. Because that seems to be pointing to an Incorrect Ambari repo.

View solution in original post

12 REPLIES 12

avatar
Super Collaborator

I disabled the proxy on the server but now though its still tries to access proxy first , it follows through and finds the repository but then the status is 0 ? I removed all repo files from the /etc/yum.repos.d folder

[root@hadoop1 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, priorities, protectbase, refresh-packagekit, security
Loading mirror speeds from cached hostfile
http://hadoop1.tolls.dot.state.fl.us/AMBARI-2.4.2.0/centos6/2.4.2.0-136/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 504 Gateway Timeout"
Trying other mirror.
http://hadoop1.tolls.dot.state.fl.us/AMBARI-2.4.2.0/centos6/2.4.2.0-136/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 504 Gateway Timeout"
Trying other mirror.
repo id                                                      repo name                                                    status
ambari-2.4.2.0                                               ambari-2.4.2.0                                               0
repolist: 0
[root@hadoop1 yum.repos.d]#
[root@hadoop1 yum.repos.d]#
[root@hadoop1 yum.repos.d]# pwd
/etc/yum.repos.d
[root@hadoop1 yum.repos.d]# ls
ambari.repo
[root@hadoop1 yum.repos.d]#

avatar
Super Collaborator

hi Jay

issue is fixed now , I did not need the proxy for the local repository and after removing the proxy access from the /etc/yum.conf I could install the Ambari repository

avatar
Expert Contributor

I had the same problem due to proxy. I fixed it by adding

proxy=_none_

in repo files in /etc/yum.repos.d/ambari.repo and hdf.repo.