Ipcheck email - cpanel changing my hosts file

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
I've been getting an email every day shortly after midnight... the subject is:
Code:
[ipcheck] Problems with dns setup on servername.mydomain.com
The body is:

Code:
IMPORTANT: Do not ignore this email.
The hostname (servername.mydomain.com) resolves to *.*.*.174.  It should resolve to *.*.*.170.  Please be sure to correct /etc/hosts as well as the 'A' entry in zone file for the domain.

Some are all of these problems can be caused by 
/etc/resolv.conf being setup incorrectly.  Please check this file if you 
believe everything else is correct.


You may be able to 
		automaticly correct this problem by using the ' Add an A entry for your 
		hostname ' under ' Dns Functions ' in your Web Host Manager
I believe this may be a cpanel bug, in one of their scripts or related programs. I am sure that my setup is correct, and it's been working for nearly a year, however it just started sending me this notice recently, and it changes my corrections back to the incorrect setting.

My /etc/hosts looks like this:

Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
*.*.*.170           servername
*.*.*.174           servername.domain.com servername
127.0.0.1               localhost
It should look like this:

Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
*.*.*.170           servername.domain.com servername
127.0.0.1               localhost
That is the way I have always had it setup and the correct way... but when I make the changes, it automatically changes them back and then notifies me about it.

My dns is correct... I have servername.mydomain.com resolving to the main server ip which is *.*.*.170... and I have mydomain.com resolving to *.*.*.174 which is my shared ip for shared sites.

Anyone have any ideas?
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
I should note that I think my resolv.conf is setup correctly... but I suppose it could be incorrect. It's worked for nearly a year though and I've had no dns trouble.

Code:
domain mydomain.com
nameserver *.*.*.170
nameserver [isp's ns]
nameserver [isps's ns]
Is it wanting me to use 'domain servername.mydomain.com' instead?

Well, some docs I found online are rather vague on just what 'domain' includes, but i see it could possibly be the full servername. But then another doc I found explicitly states that it's not the full servername but just the domain name.

I went ahead and changed 'domain mydomain.com' to be 'domain servername.mydomain.com' - it shouldn't hurt and since it won't accept my version of the config and keeps changing it.
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
Yep... and it sent me the same email and did the same auto changes when being upgraded to the latest cpanel stable... when I had the /etc/resolv.conf as 'domain servername.mydomain.com' - so that was no fix.

Anyone file a bug report yet?
 

xnull

Well-Known Member
Sep 9, 2001
156
0
316
My server is doing this now. Everything is fine in hosts, resolv.conf, and DNS zones. However, Cpanel emails me every day, saying my hostname resolves to a different IP address than what it should.
 

chae

Well-Known Member
Apr 19, 2003
145
0
166
Auckland, New Zealand
Yep same here I'm afraid, all config files are set-up properly and have been working hunky dory till this new check script came along and we now get the annoying email every night ;)
 

Earendil

Well-Known Member
Jun 10, 2004
102
0
166
It seems to change it to the main shared IP in WHM...
I've done a chattr +i hosts now, seems to be the only resolution.
 

DaveT

Active Member
Aug 20, 2004
29
0
151
Unfortunately, a chattr +i hosts isn't an option for those of us on a VPS solution :( ... so for some of us a fix for this is more urgent than others...
 

shopcentar

Well-Known Member
PartnerNOC
Jul 10, 2004
55
1
158
Ip

Hello,

we have the same problem on our new box:
- when we restart box or make update ONE dummy IP gets into
/etc/nameserverips

we must make comment on them (#) and
service named stop
service named start

Also if we click in WHM >>> Manage Nameserver IPs this IP get into resolv.conf and all EMAIL on server is DOWN.
(at the moment we dont have on this box Clients BUT....)

How to fix this dummy IP.

I can write bash script to COMMENT this IP and put script into CRON....

But this is BUG in cpanel!

by, SC
PS. this IP have last six numbers of my server IP and if marked like "PRIVATE IP" in dnsstuff.com
 
Last edited:

shopcentar

Well-Known Member
PartnerNOC
Jul 10, 2004
55
1
158
Hello,

we send TT and my DATACENTER fix this issue (this is master IP for server and they must remove from free IPs.

so this is the fastes way....

UFF, now can we sell.....

by, SC
 

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
Problem here too... its been going on for a long time.
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
As of last time I looked, I don't believe anyone's gotten around to creating a bugzilla report for this bug. I was going to do it myself for lack of anyone else stepping up... but I have been a bit too busy to get all the info together coherently. And because I just did chattr +i on /etc/hosts, so it's a much more minor annoyance now.
 

LBJ

Well-Known Member
Nov 1, 2003
117
24
168
cPanel Access Level
DataCenter Provider
Okidokie. The bugzilla reply is pretty clear that the current behaviour is intended.

Does that make sense to anyone else?

Maybe it will become clearer when they add the additional comments to whm setup.

Best Regards,

LBJ
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
It does make sense, but it is annoying that they didn't fix the front-end first and explain in the error message that this is a new requirement where the front-end clearly states that the field is only if you use an alternative device to the default, which most are not. Sloppy programming.
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
I haven't been able to figure it out... I think I'm just confused by what WHM says and apparent conflicts with other things that were said. Maybe I need to keep looking at it longer.

The only answer I can come up with is that I need to put 'eth0' (for my main ip) in the 'alternative' section there in WHM? It doesn't seem to make sense to me though.
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
heh.

With what cpanel is saying, it's not completely clear on whether their original 'fix' should still be followed and the changes made to the 'Alternate Main Ethernet Device" setting in WHM, or if one should wait until their fix to fixetchosts will resolve the underlying issue and make the alternate ethernet device setting change redundant/unnecessary.