Koozali.org: home of the SME Server

Changing Hostname of Server results in duplicate hostnames

Offline 4first

  • **
  • 25
  • +0/-0
    • http://robtho01.cust.internode.on.net/
Changing Hostname of Server results in duplicate hostnames
« 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

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Changing Hostname of Server results in duplicate hostnam
« Reply #1 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.
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Changing Hostname of Server results in duplicate hostnam
« Reply #2 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.

aaron

Changing Hostname of Server results in duplicate hostnames
« Reply #3 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.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Changing Hostname of Server results in duplicate hostnames
« Reply #4 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.

aaron

Changing Hostname of Server results in duplicate hostnames
« Reply #5 on: March 15, 2007, 07:25:28 PM »

Offline 4first

  • **
  • 25
  • +0/-0
    • http://robtho01.cust.internode.on.net/
Changing Hostname of Server results in duplicate hostnames
« Reply #6 on: March 16, 2007, 12:03:49 AM »
thanks for the responses aaron and CahrlieBrady

Offline ianhobson

  • **
  • 28
  • +0/-0
Is there a manual db edit to fix this?
« Reply #7 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

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Is there a manual db edit to fix this?
« Reply #8 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
...

Offline ianhobson

  • **
  • 28
  • +0/-0
Thanks
« Reply #9 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

Offline ianhobson

  • **
  • 28
  • +0/-0
Cracked it
« Reply #10 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