Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: 4first on March 15, 2007, 01:48:38 AM

Title: Changing Hostname of Server results in duplicate hostnames
Post by: 4first on March 15, 2007, 01:48:38 AM
I am currently in the processing of upgrading the hardware for a SME 7.1.2 server installation. I want to retain the old hardware to use as a backup (via rsync) and test box.

For this I simply wanted to rename to current box to say "B2" and the new box to the current box name (Say "B1"). The problem i am experiencing on the current box is when I proceed through the rename process in the configuration screen and reboot, both hostnames appear in the "Hostname and Addresses" panel (i.e. B1 and B2).

The problem with this is that I cannot add the new box into the hostname and addresses as it already exists.

I have searched the bugs and posts and have not found a similar issue.

anyone with any ideas?

thanks
Title: Re: Changing Hostname of Server results in duplicate hostnam
Post by: raem on March 15, 2007, 07:27:08 AM
4first

At the command prompt type
signal-event post-upgrade
reboot

If that doesn't fix it then report it as a bug.
Title: Re: Changing Hostname of Server results in duplicate hostnam
Post by: CharlieBrady on March 15, 2007, 02:47:12 PM
Quote from: "4first"

For this I simply wanted to rename to current box to say "B2" and the new box to the current box name (Say "B1"). The problem i am experiencing on the current box is when I proceed through the rename process in the configuration screen and reboot, both hostnames appear in the "Hostname and Addresses" panel (i.e. B1 and B2).


1. Modify B2.

or

2. Delete B2 and then re-add it.
Title: Changing Hostname of Server results in duplicate hostnames
Post by: aaron on March 15, 2007, 06:40:08 PM
4First, I can confirm your situation. My own renaming of a 712 host resulted in both names listed in the Hostnames panel.

Charlie, the old name cannot be modified nor deleted via the web panel as there is no Modify or Remove link for either displayed names (rows).

FYI, I did a "post-upgrade"/reboot as suggested but both names remain.
Title: Changing Hostname of Server results in duplicate hostnames
Post by: CharlieBrady on March 15, 2007, 07:01:20 PM
Quote from: "aaron"
4First, I can confirm your situation. My own renaming of a 712 host resulted in both names listed in the Hostnames panel.

Charlie, the old name cannot be modified nor deleted via the web panel as there is no Modify or Remove link for either displayed names (rows).


Please report anything which doesn't "Just work" via the Bug Tracker. Thanks.
Title: Changing Hostname of Server results in duplicate hostnames
Post by: aaron on March 15, 2007, 07:25:28 PM
Now in Bug Tracker:

http://bugs.contribs.org/show_bug.cgi?id=2699
Title: Changing Hostname of Server results in duplicate hostnames
Post by: 4first on March 16, 2007, 12:03:49 AM
thanks for the responses aaron and CahrlieBrady
Title: Is there a manual db edit to fix this?
Post by: ianhobson on March 18, 2007, 09:56:44 PM
Is there a manual edit to the database that will fix this?

I have a problem of which this is part and I would like to correct the two names part before sorting out my DNS problems under VMWare!

(I'm trying to run SME Server in a VM to protect the host and the rest of the network. Its all working except that some machines resolve only with the domain name and some only without it. And this appears to change depending on where the ping comes from - a VM or real machine.

Digging about it appears that the database contains some/all of this information, but I can't see how to edit it. The files are in /etc/e-smith/db/hosts/migrate.

Regards
Ian
Title: Re: Is there a manual db edit to fix this?
Post by: raem on March 18, 2007, 10:36:35 PM
ianhobson

The servers configuration database files are in /home/e-smith/db/...

db hosts show

to edit this directly type
db
to show usage syntax

be careful changing this file directly as you could interfere with the correct configuration of your server
to lock in any changes you make do
signal-event post-upgrade
reboot
Title: Thanks
Post by: ianhobson on March 19, 2007, 07:02:15 PM
Thanks Ray. Particularly for the instructions on how to include the changes into the config. The wrong name is now removed!

Now my DNS problem is much simpler than before.

One machine gets the DNS of the firewall wrong (as 192.168.0.2) when it is resolved without the local domain, but right (192.168.0.1) when it is resolved with the local domain.

The faulty machine has a fixed IP and has to be booted before the firewall because it is the host. The firewall runs under VMware.

All other machines (real and Virtual) appear to get things 100% correct for all hosts including the firewall! Conclusion - the DNS server has the right contents.

The obvious place to check is the hosts file on the faulty machine and the DNS server used.  The server used is correct. The hosts file has no entry for the firewall so the DNS server should be used to do the resolving.

I've run ipconfig /flushdns and it does not help.

Ideas anyone? I'm baffled.

Ian
Title: Cracked it
Post by: ianhobson on March 19, 2007, 09:10:35 PM
Found WINS was on on the machine giving the faulty results.

Turned it off and all is peachy.

firewall can be found as internal or external name (with or without internal domain).

other machines - real and virtual - can be found by internal name (no domain), only - which is correct behaviour.

Hope this helps someone in the future.

Regards

Ian