"hostname is set up improperly"

duncan

Verified User
Joined
Jan 19, 2005
Messages
93
Location
Halifax, NS, Canada
My server is running fine, and has been for months - but I get this warning every night and it's a bit annoying.

When I first set up the server I used one host name, but later changed it. Everything that I can see contains the correct hostname, but obviously the system is finding a discrepancy somewhere.

I have run the hostname.sh script, but that does not seem to solve the problem.

So where should I be looking that might still have the old name?
 
Just a guess... first change back to the original hostname the way you did it previously. Then run the hostname.sh script, to see if that resolves the problem.

Otherwise contact DA support.

Jeff
 
The hostname.sh script was still not updating it properly.

However, I manually edited the etc/hosts file - which had an array of incorrect host names (4 to be exact). Once that was corrected, the error prompts disappeared - all is well again.

Hopefully this helps someone else.
 
I've seen this happen a lot on VPS's especially with Virtuozzo. Make sure that your provider changes things on their end so the proper hostname is changed otherwise it will revert back most likely on the next reboot. This is for virtuozzo only I haven't tried Xen yet but doubt there will be any issues.
 
Senad said:
I've seen this happen a lot on VPS's especially with Virtuozzo. Make sure that your provider changes things on their end so the proper hostname is changed otherwise it will revert back most likely on the next reboot. This is for virtuozzo only I haven't tried Xen yet but doubt there will be any issues.

That is correct, you have to reflect the hostname change in virtuozzo as well as the hostname.sh. It is in virtuozzo to also keep track of hostnames.
 
Very interesting observations. I did a reboot to see what would happen.

/etc/hosts before reboot:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
216.187.96.XX vps.correct-domain.com

/etc/hosts after reboot:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 [COLOR=red]vps.wrong-domain.com vps[/COLOR] localhost localhost.localdomain
216.187.96.XX vps.correct-domain.com
Why does it do that? And will this effect my server if I do not correct it? Argh...
 
duncan said:
Very interesting observations. I did a reboot to see what would happen.

/etc/hosts before reboot:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
216.187.96.XX vps.correct-domain.com

/etc/hosts after reboot:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 [COLOR=red]vps.wrong-domain.com vps[/COLOR] localhost localhost.localdomain
216.187.96.XX vps.correct-domain.com
Why does it do that? And will this effect my server if I do not correct it? Argh...

Best thing is to have your provider adjust the settings in your VPS.
 
The setting in /etc/hosts overrides the use of external DNS in your resolver in most default setups. But in this case it shouldn't affect anything since 127.0.0.1 is only used for localhost, so it's only used for lookups on your server.

Jeff
 
Back
Top