Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

Highlighted

HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Geoffrey Shelton Okot @Shu @Matt Burgess

Hi All,

We are facing issue installing using Local Repositories as don't have internet access in our environment. This issue is pending since last 2 weeks and we are unable to crack this via any forum or community.

Error: Cannot find a valid baseurl for repo: base/7/x86_64

-------------------------------------------------

Environment:

  • VMWare - ESXI - done
  • CenOS 7 - done
  • Java 8+ - done
  • MySQL 5.7 - done
  • Files updated - done
    • /etc/hosts
    • /etc/sysconfig/network
    • /etc/hostname
    • /etc/selinux/config
    • /etc/yum/pluginconf.d/refresh-packagekit.conf
    • /etc/profile
    • .bash_profile
  • Repo Directories and rpm placement - done
    • /var/www/html/repo/ambari
    • /var/www/html/repo/HDP-UTILS
    • /var/www/html/repo/HDP
    • /var/www/html/repo/HDP-GPL
  • Repo files creation - done
    • /etc/yum.repos.d/ambari.repo
    • /etc/yum.repos.d/hdp.repo
    • /etc/yum.repos.d/hdp.gpl.repo
  • Services - done
    • systemctl stop firewalld
    • systemctl start ntpd
    • systemctl start httpd
    • systemctl status mysqld.service (all required users and databases are created along with also ran: Ambari-DDL-MySQL-CREATE.sql in DB: Ambari
  • Amabri Server: Pending
  • Ambari Agent: Pending
  • HDP 3.0: Pending

-----------------------------------------------------------------------------------

Issue: Using local repositories, whenwe run this command: yum install ambari-server following error hit us.

Error:

[root@ufm yum.repos.d]# yum install ambari-server

Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

One of the configured repositories failed (Unknown), 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=<repoid> ...

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 <repoid> or subscription-manager repos --disable=<repoid>

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=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

-----------------------------------------------------------------------------------

Note: Above whole installation was achieved on

  • Local VM enviroments but not on ESXI (this is our first time on EXSI environment)
  • Bare Metal Servers

Limitation: We do not have internal access in our environment, so have to use local repositories.

Looking forward.

Cheers

9 REPLIES 9
Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

Super Mentor

@Mustafa Ali Qizilbash

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os∈fra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error" 

The above error indicates that you still have some of the Repositories pointing to Public URL.

Please open those files "/etc/yum.repos.d/*.repo" and then disable them which are using Public base_url By setting "enabled=0"

1. Find the REPO files which are using public repos:

# grep baseurl /etc/yum.repos.d/*.repo

2. Then open the file which has public pointing repo URL (Instead of pointing to your Local repo host). and then disable it by setting "enabled=0"

3. Perform yum clean all and then continue installing ambari.

# yum clean all

.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

Super Mentor

@Mustafa Ali Qizilbash

More detailed steps on setting up a Local repo can be found here:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation/content/setting_up_a...

Also please make sure that you have the "/etc/yum.repos.d/ambari.repo" file pointing to your Local Repo.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Jay Kumar SenSharma

We moved ahead by disabling rest the repos and enabling ambari one but got stuck at cluster building.

Note: When we paste this URL: http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml it does work.

Following failed at installing this service:

Timeline Service V1.5 Install

failure: repodata/repomd.xml from HDP-3.0: [Errno 256] No more mirrors to try.

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

2018-09-18 16:05:51,775 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2018-09-18 16:05:51,805 - call returned (0, '')
2018-09-18 16:05:51,805 - The 'hadoop-yarn-timelineserver' component did not advertise a version. This may indicate a problem with the component packaging.

Command failed after 1 tries

91482-timeline-service-v15-install.png

I AM SURE, WE DO NOT NEED INTERNET as a mandatory pre-requisite?

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Jay Kumar SenSharma @Geoffrey Shelton Okot

It seems, repodata/repomd.xml is the culprit.

Please advice its uses and content with no-internet access as its content is;

<?xml version="1.0" encoding="UTF-8"?> <repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">

I feel above mentioned URLs should not go on internet.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

Super Mentor

@Mustafa Ali Qizilbash

As requested earlier that youa re getting 503 error while accessing the Local Repo Which means your WebServer where you have placed your Repo might be having some issue.

Hence can you please share your WebServer logs (httpd logs when you noticed 503 error).

http://ufm.hadoop.com/repo/HDP/centos7/3.0.0.0-1634/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable

.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Jay Kumar SenSharma

Hi,

Apologies for delay.

There you go with WebServer Log.

--------------------------------------------------------------------------------------------------------------------------------------------

[root@ufm httpd]# tail error_log [Sun Sep 23 16:18:17.112853 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53472] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path [Sun Sep 23 16:18:19.399155 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53472] AH00035: access to /repo/ambari/centos7/index.html denied (filesystem path '/var/www/html/repo/ambari/centos7/index.html') because search permissions are missing on a component of the path, referer:http://10.200.40.160/repo/ [Sun Sep 23 16:18:20.584500 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53472] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://10.200.40.160/repo/ambari/ [Sun Sep 23 16:18:22.762022 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53472] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://10.200.40.160/repo/ambari/ [Sun Sep 23 16:18:23.613018 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53472] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://10.200.40.160/repo/ambari/ [Sun Sep 23 16:18:41.563016 2018] [core:error] [pid 28765] (13)Permission denied: [client10.200.40.51:53473] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://10.200.40.160/repo/ambari/ [Sun Sep 23 18:11:29.286927 2018] [core:error] [pid 28765] (13)Permission denied: [client10.200.40.51:53653] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path [Sun Sep 23 18:13:02.298494 2018] [core:error] [pid 29345] (13)Permission denied: [client10.200.40.51:53660] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://ufm.hdp01.com/repo/HDP/ [Sun Sep 23 18:14:16.053361 2018] [core:error] [pid 1780] (13)Permission denied: [client10.200.40.51:53663] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://ufm.hdp01.com/repo/HDP-UTILS/ [Sun Sep 23 18:15:56.767202 2018] [core:error] [pid 1781] (13)Permission denied: [client10.200.40.51:53666] AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path, referer:http://ufm.hdp01.com/repo/HDP-GPL/

--------------------------------------------------------------------------------------------------------------------------------------------

Note: As this is offline line installation, we don't have index.html any where.

Please advice.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

Super Mentor

@Mustafa Ali Qizilbash

As we see that the error basically is from your webserver where you have setup the local repo:

AH00035: access to /repo/repodata/index.html denied (filesystem path '/var/www/html/repo/repodata/index.html') because search permissions are missing on a component of the path

The above kind of error mostly occurs if you have not given proper permissions to your Local repo directories. Please refer to the following doc to get more details about the webserver error "AH00035: access denied because search permissions are missing on a component of the path" : https://wiki.apache.org/httpd/13PermissionDenied

Try setting the proper permission to your Web Server repo directories.

find /var/www -type d -exec chmod 755 {} \;
find /var/www -type f -exec chmod 644 {} \;

.

Then restart your webserver and then try again.

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Jay Kumar SenSharma

Yup permissions are good.

The problem is, there is no index.html file present in/repo/repodata directory.

Highlighted

Re: HDP 3.0 Error: Cannot find a valid baseurl for repo: base/7/x86_64 (Urgent)

@Jay Kumar SenSharma

So we moved ahead and used another IP: XX.XX.XX.51 (which has internet access) to install HDP and then reverted HDP back to its original IP: XX.XX.XX.160 (which does't have internet access) and did the same to install HDF using IP: XX.XX.XX.51 (which has internet access) and then reverted HDF back to its original IP: XX.XX.XX.161 (which doesn't has internet access).

When HDP and HDF were on IP: XX.XX.XX.51, all the services were up and running and restart-able but the moment those were reverted back i.e. HDP and HDF to those original IPs, everything got hung. Now services are in start mode as were when were on IP: XX.XX.XX.51 and we can't stop & restart and other things like hive is not accessible, NiFi UI does't appear etc.

Please advice.

Don't have an account?
Coming from Hortonworks? Activate your account here