Help - localhost did not have any working mirrors. installing cpanel

magzik

Registered
Jan 11, 2013
3
0
1
cPanel Access Level
Root Administrator
[[email protected] ~]# cat /etc/hosts
# Auto-generated hostname. Please do not remove this comment.
173.245.6.133 server1.coocoomamapapa.com localhost server1 localhost.localdomain
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

ERROR

2013-01-11 03:32:16 782 (DEBUG): -- End test 'Pre-test htaccess check' --
2013-01-11 03:32:16 782 (DEBUG): -- Begin test 'Basic HTTP Request for static content' --
2013-01-11 03:32:16 782 (DEBUG): localhost did not have any working mirrors. Please check your internet connection or dns server. at /usr/local/cpanel/Cpanel/HttpRequest.pm line 603.


I tried to install my first cpanel via ssh, and i got this error.
 

magzik

Registered
Jan 11, 2013
3
0
1
cPanel Access Level
Root Administrator
hello infopro,

Im very clueless about cpanel and the provider wont install it for me, he just gave me steps on how to install it via ssh. I did what i saw in the wiki and I got that error. Sorry.

Thanks for your help though, ill check the steps.
 
Last edited:

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
Make sure you have working resolvers. See if this command returns IP addresses:

Code:
# host cpanel.net
cpanel.net has address 208.74.121.57
cpanel.net has address 208.74.123.93
cpanel.net has address 208.74.125.13
cpanel.net mail is handled by 10 mx2.cpanel.net.
cpanel.net mail is handled by 0 mx1.cpanel.net.
If that command returns an error, you may not have working resolvers in /etc/resolv.conf. You can try adding this to the top of /etc/resolv.conf, before anything else in the file:

Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
Those are Google's public nameservers, free for use by anyone. They are often useful for troubleshooting purposes.

Also, your host probably provides resolvers. Ask your host which resolvers should be listed in /etc/resolv.conf.
 

magzik

Registered
Jan 11, 2013
3
0
1
cPanel Access Level
Root Administrator
Hello Jared,

I tried host cpanel.net command line and it returned this.

Code:
# host cpanel.net
cpanel.net has address 208.74.125.13
cpanel.net has address 208.74.121.57
cpanel.net has address 208.74.123.93
cpanel.net mail is handled by 0 mx1.cpanel.net.
cpanel.net mail is handled by 10 mx2.cpanel.net.
so i guess my problem isnt about resolvers.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

This can happen when the /etc/hosts file includes a localhost entry for a public IP address. Here is an example:

Code:
[email protected] [~]# cat /etc/hosts
::1      localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1      localhost.localdomain localhost localhost4.localdomain4 localhost4
# Auto-generated hostname. Please do not remove this comment.
208.74.000.99      vps.server.com vps [COLOR="#FF0000"]localhost localhost.localdomain[/COLOR]
Notice the "localhost" entry on the line with 208.74.000.99. This will cause EasyApache to fail. The solution is to remove the invalid localhost entries. The /etc/hosts file above would be edited to:

Code:
[email protected] [~]# cat /etc/hosts
::1      localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1      localhost.localdomain localhost localhost4.localdomain4 localhost4
# Auto-generated hostname. Please do not remove this comment.
208.74.000.99    vps.server.com vps
Thank you.
 

IRBiddlecombe

Registered
Nov 2, 2013
2
0
1
cPanel Access Level
DataCenter Provider
I also had this problem on running easyapache.

I changed the DNS to googles (to be safe, as the host cpanel.net gave a response) and then in /etc/hosts I found the issue. My template that I deployed had an additional record for localhost pointing to another IP and I had a record for my template name that was pointing to another IP. Hence the reference to .localhost in my error ;)

My error:
... ... ... .localhost did not have any working mirrors. Please check your internet connection or dns server. at /usr/local/cpanel/Cpanel/HttpRequest.pm line 610.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
That was exactly my problem. What I don't understand is how I managed to get that line, because I don't remember doing that by hand. It's already solved, anyways.
Is this a VPS? It's possible the template used by the VPS adds this entry.

Thank you.