Easyapache failing on CentOS server

Had an issue with one on our CentOS cPanel servers running 64 bit and cPanels easyapache upgrade. The folks at cPanel helped out with their usual professional response

The cause of the EasyApache failure, according to the log, was a failure of the package manager, in this case yum.  This was caused by a problem with domain name resolution, which was preventing yum from accessing its mirrors.  Here is what I found:

[root@server ~]# yum check-update
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was
[Errno 4] IOError: <urlopen error (-2, ‘Name or service not known’)>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@server ~]# host mirrorlist.centos.org
[root@server ~]#

Note that no result was returned for mirrorlist.centos.org.  To correct this, I added the following to the top of the /etc/resolv.conf file:


This is one of the root nameservers.  After I made this change, mirrorlist.centos.org was resolvable, and yum worked correctly:

[root@server ~]# host mirrorlist.centos.org
mirrorlist.centos.org has address
[root@server ~]# yum check-update
base                      100% |=========================| 1.1 kB    00:00    
updates                   100% |=========================|  951 B    00:00    
addons                    100% |=========================|  951 B    00:00    
extras                    100% |=========================| 1.1 kB    00:00    
Excluding Packages in global exclude list

wget.x86_64                              1.10.2-7.el5           base           
[root@server ~]#

Adding a root nameserver to /etc/resolv.conf is meant to be a temporary measure, so you will need to take a look at the other nameservers listed in the file and make sure they are valid recursive nameservers that will do host look-ups for domains that they do not host.

EasyApache should work properly now.

Facebook Comments

More Stuff

Securing your Joomla Website In addition to understanding the threats, and implementing general defensive strategies, it is important to know more specific details about security ...
The Quick and Dirty Legal Guide on the SEC’s New Guidance on ICOs... Since the SEC began taking sporadic action against “unregistered” ICOs earlier this year, the entire industry has been stopped dead in its tracks...
12 Useful PHP Commandline Usage Every Linux User Must Know In my last post “How to Use and Execute PHP Codes in Linux Command – line”, I emphasized on running PHP codes directly in Linux Command-line as well a...
Using WHM remote authentication One thing that I have noticed while working with other people developing software that interacts with WHM’s XML API is that they always use basic HTTP...
Spread the love

Posted by News Monkey