Cannot import hosts
-
I’m using trunk ver 8424
Whenever I import hosts.csv, I get the message:
Errors Row #1: Host already exists with this name: T-2443
Row #2: Host already exists with this name: T-2444
Row #3: Host already exists with this name: T-2445This is the csv file:
FC:08:4A:5F:E0:51,T-2443 FC:08:4A:5F:E3:C0,T-2444 FC:08:4A:5F:E2:DA,T-2445
There is no host T-2443, 2444 or 2445 on both host list on web GUI or on hosts table on mysql.
I also tried a different hostname, and got the same problem.
Thanks,
-
can you run these and give the output?
SELECT hostID, hostName FROM hosts WHERE hostID=0;
SELECT hmID,hmHostID,hmMAC FROM hostMAC WHERE hmID=0 OR hmHostID=0;
select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0;
-
@Wayne-Workman said in Cannot import hosts:
select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0;
Thanks!
MariaDB [(none)]> use fog Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [fog]> SELECT hostID, hostName FROM hosts WHERE hostID=0; Empty set (0.00 sec) MariaDB [fog]> SELECT hmID,hmHostID,hmMAC FROM hostMAC WHERE hmID=0 OR hmHostID=0; Empty set (0.07 sec) MariaDB [fog]> select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0; Empty set (0.02 sec)```
-
@dvchuyen Interesting. Thanks. Now these please?
SELECT hostName,hostID FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445';
-
@Wayne-Workman said in Cannot import hosts:
SELECT hostName,hostID FROM hosts WHERE hostName = ‘T-2443’ OR hostName = ‘T-2444’ OR hostName = ‘T-2445’;
Oh, look like they exist on DB,
MariaDB [fog]> SELECT hostName,hostID FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445'; +----------+--------+ | hostName | hostID | +----------+--------+ | T-2443 | 2829 | | T-2444 | 2830 | | T-2445 | 2831 | +----------+--------+ 3 rows in set (0.00 sec)
But I still unable to find them on Web
-
@dvchuyen lol. ok. I’m going to give you a pass on that one.
Delete them with:
DELETE FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445';
And then just re-register or let the new client auto-register them or however you wanna do it.EDIT
You know, I just thought of something…
@Tom-Elliott this could be a similar issue to parsing like I had here?
https://forums.fogproject.org/topic/7838/host-import-from-production-fog-system-into-another-production-fog-system -
@Wayne-Workman Working like a charm :). Thanks
-
@Wayne-Workman nope not a parsing issue more likely it was an importing issue that failed to set up the macs for the host. It has been , as far as I’m aware, been fixed for at least 5 days though.