7

I am trying to install docker in linux [Redhat] box . But its failing with below error .

Loaded plugins: product-id, search-disabled-repos, subscription-manager, susemanagerplugin, yumnotify
This system is not registered with an entitlement server. You can use subscription-manager to register.
 https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 
14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.



One of the configured repositories failed (Docker Repository),
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=dockerrepo ...

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

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

    failure: repodata/repomd.xml from dockerrepo: [Errno 256] No more mirrors to try.
   https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

I have gone through the multiple articles and tried different options but it didn't resolved the issue.

Few of the articles and thing that i have tried are as

https://access.redhat.com/articles/1320623
https://access.redhat.com/solutions/203603
vikash srivastava
  • 393
  • 2
  • 4
  • 16

5 Answers5

13

I am using RHEL 7.

I fixed it by editing /etc/yum.repos.d/docker-ce.repo. Replacing $releasever with hard-coded 7 works. The variabl $releasever = 7Server by default.

Example:

baseurl=https://download.docker.com/linux/centos/7/$basearch/stable

Eden Li
  • 179
  • 2
  • 6
4

This is because you are using a deprecated repository link. They just recently moved to download.docker.com as mentioned here. You will need to use the updated one and everything should work fine!

Nick S
  • 56
  • 1
  • 1
    Sure repomd.xml is located at https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml as for 2020-09-10 – user7568519 Sep 10 '20 at 16:47
  • I followed the instructions on that exact page and got the same error as the root poster. Eden Li's suggestion worked for me – CJ Thompson Dec 02 '20 at 21:47
4

The error I received was "One of the configured repositories failed (Docker CE Stable - x86_64)". The error gave 4 suggestions, one of them being to rerun the install command with the CE repository disabled.

sudo yum install docker --disablerepo=docker-ce-stable

That worked for me.

Mattatat-tat
  • 459
  • 1
  • 7
  • 9
2

Looks like that your yum is not configured properly for docker.

Try this

NOTE: Make sure to remove all the docker packages that are already present in your machine. Steps are included in the above link

Kapil Khandelwal
  • 1,096
  • 12
  • 19
  • Hi Kapil - I am following commands mentioned below heading "How to install Docker CE on CentOS 7 (method 2)" first command is executing successfully "$ sudo yum remove docker docker-common docker-selinux docker-engine-selinux docker-engine docker-ce" but its failing again with the same error while installing needed package command - "sudo yum remove docker docker-common docker-selinux docker-engine-selinux docker-engine docker-ce" – vikash srivastava Apr 01 '20 at 12:33
  • output of above command `NAME="Red Hat Enterprise Linux Server" VERSION="7.7 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.7" PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.7 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.7" ` – vikash srivastava Apr 01 '20 at 12:37
  • Can you try this solution: https://unix.stackexchange.com/a/527982 – Kapil Khandelwal Apr 01 '20 at 12:40
  • I am trying out the first solution :- Now i am getting some error while installing epl package `wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm 12:42PM --2020-04-01 12:42:35-- http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.25, 209.132.181.23, 209.132.181.24 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.25|:80... connected.` – vikash srivastava Apr 01 '20 at 12:46
  • `HTTP request sent, awaiting response... 404 Not Found 2020-04-01 12:42:35 ERROR 404: Not Found.` – vikash srivastava Apr 01 '20 at 12:48
  • Looks like the rpm is no longer available over there.Try this: `wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm`. **Also make sure to update the subsequent command as well**.Use this `rpm -ivh epel-release-7-12.noarch.rpm` – Kapil Khandelwal Apr 01 '20 at 12:54
  • After executing all these command successfully . Can i install docker using below command " sudo yum install docker-engine -y" . or there are some other steps i need to follow before ? – vikash srivastava Apr 01 '20 at 13:09
  • Now you can skip yum remove step as mentioned under the section - **How to install Docker CE on CentOS 7 (method 2)**. Continue with other commands. **command1:** `sudo yum install -y yum-utils device-mapper-persistent-data lvm2` **Command2:** `sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo` **Command3:** `sudo yum install docker-ce` – Kapil Khandelwal Apr 01 '20 at 13:15
  • still it's failing while installing needed package - `sudo yum install -y yum-utils device-mapper-persistent-data lvm2` with the same error – vikash srivastava Apr 01 '20 at 13:22
  • Yeah i am trying with sudo only . Or you are asking to use sudo in some other way ? – vikash srivastava Apr 01 '20 at 13:26
  • **Without** sudo. `yum install -y yum-utils device-mapper-persistent-data lvm2` – Kapil Khandelwal Apr 01 '20 at 13:29
  • yeah that's also failing - `yum install -y yum-utils device-mapper-persistent-data lvm2 1:21PM There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: libssl.so.0.9.8: cannot open shared object file: No such file or directory Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is:` – vikash srivastava Apr 01 '20 at 13:31
  • `2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq` – vikash srivastava Apr 01 '20 at 13:32
  • I would still recommend you to try this solution once that I proposed initially: https://unix.stackexchange.com/a/527982 – Kapil Khandelwal Apr 01 '20 at 13:38
  • Even after re-trying that solution again i am getting same error – vikash srivastava Apr 02 '20 at 04:41
  • Can you please add the exact commands that you are using step by step. You can edit the question above and mention these steps over there. – Kapil Khandelwal Apr 02 '20 at 06:15
  • HI Kapil - Thanks for you help . I created the new Linux box and tried the docker installation steps again and it resolved the issue. – vikash srivastava Apr 04 '20 at 12:55
0

I fixed it by running this:

yum install docker-ce docker-ce-cli containerd.io --allowerasing --nobest
Fabio Nolasco
  • 7,122
  • 6
  • 35
  • 32