impossible to create a new host



  • Hello,
    when I create a new host
    I have the following error:
    A host already exists with this name !

    I am sure that host doesn’t exist.
    it isn’t found in the export csv file
    but, I think that name has already been used and it has been deleted.
    Maybe a problem in the database…
    how to know ?
    Thanks for your help
    Eric


  • Developer

    @ricounet Ok, so you can delete that one entry from the DB:

    shell> mysql -u root -p
    Password:
    ...
    mysql> use fog;
    ...
    mysql> DELETE FROM hosts WHERE hostID = 410;
    ...
    


  • @Sebastian-Roth said in impossible to create a new host:

    Put in the host’s name where I have used yourhostname in the obove commands.

    via the web interface, I delete or add pc5101oo but can’t do it with pc5101o.
    thank you for your help

    MariaDB [fog]> SELECT * FROM hosts WHERE hostName LIKE ‘%pc5101o%’;
    ±-------±---------±---------±-------±----------±-------------±--------------------±--------------------±-------------±----------±-------------±---------------------------------------------±-----------±--------------------------±-----------------±---------------±-----------------±---------------±-----------±-----------±---------±------------±-----------±-------------±--------------------±-------------±-------------±------------±------------+
    | hostID | hostName | hostDesc | hostIP | hostImage | hostBuilding | hostCreateDate | hostLastDeploy | hostCreateBy | hostUseAD | hostADDomain | hostADOU | hostADUser | hostADPass | hostADPassLegacy | hostProductKey | hostPrinterLevel | hostKernelArgs | hostKernel | hostDevice | hostInit | hostPending | hostPubKey | hostSecToken | hostSecTime | hostPingCode | hostExitBios | hostExitEfi | hostEnforce |
    ±-------±---------±---------±-------±----------±-------------±--------------------±--------------------±-------------±----------±-------------±---------------------------------------------±-----------±--------------------------±-----------------±---------------±-----------------±---------------±-----------±-----------±---------±------------±-----------±-------------±--------------------±-------------±-------------±------------±------------+
    | 449 | pc5101oo | | | 3 | 0 | 2019-09-02 09:22:10 | 2019-10-24 07:09:44 | labos | 1 | lan.esiee.fr | ou=isys,ou=ordinateurs,dc=lan,dc=esiee,dc=fr | fog | gn | | | | | | | | | | | 0000-00-00 00:00:00 | 6 | | | |
    | 410 | pc5101o | | | 3 | 0 | 2019-08-29 14:13:19 | 0000-00-00 00:00:00 | labos | | lan.esiee.fr | ou=isys,ou=ordinateurs,dc=lan,dc=esiee,dc=fr | fog | g
    En | | | | | | | | | | | 0000-00-00 00:00:00 | 110 | | | |
    ±-------±---------±---------±-------±----------±-------------±--------------------±--------------------±-------------±----------±-------------±---------------------------------------------±-----------±--------------------------±-----------------±---------------±-----------------±---------------±-----------±-----------±---------±------------±-----------±-------------±--------------------±-------------±-------------±------------±------------+
    2 rows in set (0.001 sec)


  • Developer

    @ricounet Try conecting to the database on the command line and find the host entry there:

    shell> mysql -u root -p
    Password:
    ...
    mysql> use fog;
    ...
    mysql> SELECT * FROM hosts WHERE hostName LIKE '%yourhostname%';
    ...
    

    Put in the host’s name where I have used yourhostname in the obove commands. Be aware that this query is case sensitive. Post the output here.


Log in to reply
 

431
Online

6.3k
Users

13.7k
Topics

128.9k
Posts