Want more timely Centmin Mod News Updates?
Become a Member

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Discussion in 'System Administration' started by pamamolf, Dec 31, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Hi

    When i run yum clean all and then yum update i get this:

    Code:
    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
    Searching on the net i found that i have to update my SSL certificates and that https is teh problem but i don't want to run any command and then had problems with Centminmod so can anyone help please on what to run?

    I found also this:

    The Most Popular Problem occured when your Centos Operation System CLOCK not be correct
    so https keys ( certificates ) goes down due to invalid time and date:

    so i run date:

    [root@server ~]# date
    Tue Dec 30 20:45:39 EET 2014

    It seems ok or i must dig deeper?


    Thanks
     
    Last edited: Dec 31, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    post contents of /etc/yum.repos.d/epel.repo in [CODE][/CODE] tags

    you might need to switch between uncommenting the #baseurl line and commenting out the mirrorlist= line for first [epel] group and if that fixes it, it might be temporarily and later need reversing the change back to previous settings if there's similar errors down the track

    Doesn't hurt to do a yum -y update too
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Code:
    [root@server ~]# cat /etc/yum.repos.d/epel.repo
    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
    failovermethod=priority
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    priority=3
    exclude=varnish
    
    [epel-debuginfo]
    name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
    #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    gpgcheck=1
    
    [epel-source]
    name=Extra Packages for Enterprise Linux 6 - $basearch - Source
    #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    gpgcheck=1

    I think the problem is not here as on my second server is working fine and i think it is the system clock and the https issue....

    i try also this:
    Code:
    [root@server ~]# hwclock --show
    Tue 30 Dec 2014 08:53:19 PM EET  -0.172121 seconds
    And this it seems wrong as it should be now 20:53 instead of 08:53

    Like this one as it seems ok:

    Code:
    [root@server ~]# date
    Tue Dec 30 20:45:39 EET 2014
    I am on Athens so i think the above is ok (not so sure for EET) but i think it is ok....

    This one is giving me also the error can't resolve github.com when i try to wget the cenminmod zip but if i exclude certificates it works...

    That's why i think the clock is the problem for the certificates....

    Maybe that's why Korean nameserver is working as it is on another timezone?

    Thanks for your help George !!!

    Thanks
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Well that's how i fixed in a few weeks back - then have to reverse the fix a few days later

    so change from

    Code:
    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
    to
    Code:
    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
    #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
    that works for me, then had epel errors a few days later and reversed it and now no problems

    if it's timezone, then see FAQ item 8 on how to change it Centmin Mod FAQ - Menu based Nginx installer

    FYI, that is same time 20:53 = 8:53 PM as first is 24hr notation
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ok i did it:

    Code:
    [root@server ~]# yum clean all
    Loaded plugins: downloadonly, fastestmirror, priorities
    Cleaning repos: base epel extras mariadb rpmforge updates
    Cleaning up Everything
    Cleaning up list of fastest mirrors
    [root@server ~]# yum update
    Loaded plugins: downloadonly, fastestmirror, priorities
    Setting up Update Process
    Determining fastest mirrors
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
    14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
    Error: Cannot find a valid baseurl for repo: base
    Also this is what i get for wget the centminmod zip:

    Code:
    [root@server ~]# wget https://github.com/centminmod/centminmod/archive/123.08centos7beta01.zip
    --2014-12-30 21:05:39--  https://github.com/centminmod/centminmod/archive/123.08centos7beta01.zip
    Resolving github.com... failed: Temporary failure in name resolution.
    wget: unable to resolve host address “github.com”
    It has to do something with https and certificates and time.... :(

    I follow the tzselect tutorial and the time using date is fine:

    Code:
    [root@server ~]# date
    Tue Dec 30 20:45:39 EET 2014
    it looks not ok using:

    Code:
    [root@server ~]# hwclock --show
    Tue 30 Dec 2014 08:53:19 PM EET  -0.172121 seconds
    as it should be 20:53 and not 08:53 or not?
     
    Last edited: Dec 31, 2014
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Can i run something like this without breaking Centminmod? :

    Code:
    yum upgrade ca-certificates --disablerepo=epel
    or

    Code:
    yum update ca-certificates
    Searching for a solution....
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    either won't break anything in Centmin Mod as yum works with Centmin Mod and anything that conflicts is excluded by default by yum priorities plugin
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I run the second command but nothing :(

    Code:
    [root@server ~]# yum update ca-certificates
    Loaded plugins: downloadonly, fastestmirror, priorities
    Setting up Update Process
    Loading mirror speeds from cached hostfile
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
    14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
    Error: Cannot find a valid baseurl for repo: base
     
  9. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    One last question as i don't know how but now it works.

    If i use this:

    [root@server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE="eth0"
    BOOTPROTO="static"
    DNS1="8.8.8.8"
    DNS1="8.8.4.4"
    GATEWAY="37.187.xxx.xxx"
    HWADDR="0C:C4:7A:02:xx:xx"
    IPADDR="37.187.xxx.xxx"
    NETMASK="255.255.255.0"
    NM_CONTROLLED="no"
    ONBOOT="yes"
    TYPE="Ethernet"
    UUID="cb7ea12f-2ab7-45a1-896f-8ff948d7xxxx"
    PEERDNS=no


    Does the PEERDNS=no means that it will use the dns above DNS1="8.8.8.8" and DNS1="8.8.4.4" and not any from the /etc/resolv.conf ?
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you still have underlying DNS issues so you can not resolve centos mirrors either

    PEERDNS=no prevents DHCP server from modifying /etc/resolv.conf so you can use whatever is set in /etc/resolv.conf

    with your above config, PEERDNS=no is redundant as you specified DNS1/2 in ifcfg-eth0 which auto adds it to /etc/resolv.conf. Btw, you have an error it should be DNS1=8.8.8.8 and DNS2=8.8.4.4 not 2 instances of DNS1
     
  11. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ok well now it works without any issues with the above eth0 config (DNS typo also fixed) :)

    All working great but i notice that after restarting network i am getting the OVH nameserver to my resolv.conf automatically and i can't test the Google's one :O
     
  12. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try setting PEERDNS=yes when you specify DNS1 and DNS2
     
  13. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:45 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ok thanks George :)

    How can i allow always and never got blocked csf/iptables for any reason the new ovh nameserver ip: 213.186.33.99 ?
     
    Last edited: Dec 31, 2014
  14. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+