Host name already exists


  • Testers

    I am trying to register a host when it boots it says unregistered but when I attempt to register it I get a host name already exists on the boot menu and the web admin. When I search my hosts by name and by mac address I am unable to locate the record. I believe I have a corrupt record in my database but I am not comfortable with editing it directly. Anyone able to suggest some step by step commands to remove the offending record the host name should be lap7p96302 and the mac address D0:67:E5:2E:1E:AD.


  • Senior Developer

    Can you hit me up on Google


  • Testers

    2952 that you loaded its been stable for me so far.


  • Senior Developer

    What revision are you running


  • Testers

    When I locate that record it showed two records and wouldnt allow me to insert the mac address so I deleted both and tried to recreate it in the fog ui but when i added host it went to a blank screen and the record is still not visible in the fog ui. I went back into mysql and tried your commands again and got this result.
    mysql> select hostID from hosts WHERE hostName like ‘%lap7p96302%’ \G
    *************************** 1. row ***************************
    hostID: 6223
    1 row in set (0.01 sec)

    mysql> INSERT INTO hostMAC SET hmHostID=‘hostIDreturnedbefore’,hmMAC=‘d0:67:e5:2e:1e:ad’,hmPrimary=‘1’;
    ERROR 1062 (23000): Duplicate entry ‘d0:67:e5:2e:1e:ad’ for key 'hmHostID’
    mysql>


  • Senior Developer

    Well you could get the hostID of the host named lap7p96302 in the hosts table of the database:

    select hostID from hosts WHERE hostName like '%lap7p96302%' \G
    

    Then insert the mac address from the returned hostid into the hostMAC table:

    INSERT INTO hostMAC SET hmHostID='hostIDreturnedbefore',hmMAC='d0:67:e5:2e:1e:ad',hmPrimary='1';
    

Log in to reply
 

319
Online

38727
Users

10554
Topics

99920
Posts

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