A hostname with that name already exists.



  • Hello,

    Ever since updating from FOG 1.2.0 to Trunk (v8424, SVN Revision 5837) I have been unable to register a new host via the Full Registration and Inventory option. When attempting to add a new host I get the message “A hostname with that name already exists.”

    See the attached image:
    alt text

    I’m still able to register new hosts using the quick registration option and then changing the name from the web menu. It’s just obviously not as convenient.


  • Moderator



  • @Junkhacker said in A hostname with that name already exists.:

    @svalding in that case, i would manually add that address to a host (one you’ll keep track of) and check the checkboxes that say to ignore it. i do something similar with usb network adapters.

    I did this (since I don’t have database access) and it worked. Thanks!

    Will mark issue as resolved.



  • Sorry for the delay in response. Busy time of the year.

    I had the guy with access to the database look for a Host with the ID of 0, but he didn’t get back to me, lol. Going to assume that means he didn’t find one.

    I exported the FOG inventory and there wasn’t anything listed with that Host ID.

    What I did notice, the MAC address listed in that picture is not the MAC address of the PC I was trying to register/inventory. No matter what device I attempt to full register it displays that MAC address.

    I don’t have the MAC address in the inventory, but I think it used to belong to a HP dc5100 that caused me issues in the past.

    Maybe attempt to find and delete an entry with that MAC address?


  • Developer

    @svalding in that case, i would manually add that address to a host (one you’ll keep track of) and check the checkboxes that say to ignore it. i do something similar with usb network adapters.



  • I’ve had to go into MySQL and clean up the tables before when I encountered this issue. In my case it has always been because fog adds the mac address of a bluetooth adapter to a host, and then it gets orphaned or something when I rather delete a host, or make changes to the host. I use PHPMyAdmin instead of the console, but the query is the same.


  • Senior Developer

    Unlikely. However it won’t hurt to try.

    If you can get into the mysql shell, try this:

    Of course backup the current DB in case something goes strange.

    DELETE FROM hostMAC WHERE hmHostID NOT IN (SELECT hostID from hosts);
    DELETE FROM hostMAC WHERE hmHostID=0;
    DELETE FROM hosts WHERE hostID=0;
    DELETE FROM hosts WHERE hostID NOT IN (SELECT hmHostID from hostMAC);
    

  • Moderator

    Could also be a host with ID=0.


  • Developer

    try updating to the latest build.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.