FOG Client Authentication after cloning Windows
-
Cloned a VM through ESXi and can’t get the FOG service to register the new clone. I reset the authentication token on the original VM, uninstalled/reinstalled the client on the clone, but get this in the fog.log:
------------------------------------------------------------------------------ --------------------------------Authentication-------------------------------- ------------------------------------------------------------------------------ 4/1/2021 7:59:14 AM Client-Info Version: 0.12.0 4/1/2021 7:59:14 AM Client-Info OS: Windows 4/1/2021 7:59:14 AM Middleware::Authentication Waiting for authentication timeout to pass 4/1/2021 8:01:14 AM Middleware::Communication Download: https://fogserver.my-domain.com/fog/management/other/ssl/srvpublic.crt 4/1/2021 8:01:14 AM Data::RSA FOG Server CA cert found 4/1/2021 8:01:14 AM Middleware::Authentication Cert OK 4/1/2021 8:01:14 AM Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before 4/1/2021 8:01:14 AM Middleware::Authentication ERROR: Could not get security token 4/1/2021 8:01:14 AM Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'. 4/1/2021 8:01:14 AM Middleware::Communication POST URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&authorize&newService 4/1/2021 8:01:14 AM Middleware::Response Invalid host 4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/register.php?hostname=hostname&mac=00:50:56:xx:xx:xx|54:31:FA:xx:xx:xx&newService&json 4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&configure&newService&json 4/1/2021 8:01:14 AM Middleware::Response Success 4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&mac=00:50:56:xx:xx:xx|54:31:FA:xx:xx:xx&newService&json 4/1/2021 8:01:14 AM Middleware::Response Invalid host 4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/getversion.php?clientver&newService&json 4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/getversion.php?newService&json 4/1/2021 8:01:14 AM Service Creating user agent cache 4/1/2021 8:01:14 AM Middleware::Response Module is disabled on the host 4/1/2021 8:01:14 AM Middleware::Response Module is disabled on the host 4/1/2021 8:01:14 AM Middleware::Response Module is disabled globally on the FOG server 4/1/2021 8:01:14 AM Service Initializing modules ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 4/1/2021 8:01:15 AM Client-Info Client Version: 0.12.0 4/1/2021 8:01:15 AM Client-Info Client OS: Windows 4/1/2021 8:01:15 AM Client-Info Server Version: 1.5.9.63 4/1/2021 8:01:15 AM Middleware::Response Success ------------------------------------------------------------------------------
-
I followed the steps here to reset encryption data for all clients:
https://wiki.fogproject.org/wiki/index.php?title=FOG_Client#Reset_encryption_data[Cent-7:root@fog ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 184497 Server version: 10.5.9-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 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]> UPDATE hosts SET hostPubKey="", hostSecToken="", hostSecTime="0000-00-00 00:00:00"; Query OK, 61 rows affected (0.001 sec) Rows matched: 66 Changed: 61 Warnings: 0 MariaDB [fog]> quit Bye
and waited a couple hours but still don’t see the client under pending.
-
@altitudehack Probably a duplicate MAC issue. Search the forums for this to find instructions in how to dig into this.
-
@sebastian-roth I searched the forums for duplicate MAC and found this thread that pointed to the database maintenance commands, which I ran. I replaced
DELETE
withSELECT *
to get some idea of what would change, however all results wereEmpty set
:MariaDB [fog]> select * FROM `hosts` WHERE `hostID` = '0'; Empty set (0.000 sec) MariaDB [fog]> select * FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0'; Empty set (0.000 sec) MariaDB [fog]> select * FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0'; Empty set (0.000 sec) MariaDB [fog]> SELECT * FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0'; Empty set (0.001 sec) MariaDB [fog]> SELECT * from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0'; Empty set (0.015 sec) MariaDB [fog]> SELECT * FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1'); Empty set (0.001 sec) MariaDB [fog]> SELECT * FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`); Empty set (0.000 sec) MariaDB [fog]> SELECT * FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`); Empty set (0.000 sec) MariaDB [fog]> SELECT * FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`); Empty set (0.000 sec) MariaDB [fog]> SELECT * FROM `tasks` WHERE `taskStateID` IN ("1","2","3"); Empty set (0.000 sec) MariaDB [fog]> SELECT * FROM `snapinTasks` WHERE `stState` in ("1","2","3"); Empty set (0.000 sec) MariaDB [fog]> TRUNCATE TABLE multicastSessions; Query OK, 0 rows affected (0.011 sec) MariaDB [fog]> TRUNCATE TABLE multicastSessionsAssoc; Query OK, 0 rows affected (0.020 sec) MariaDB [fog]> SELECT * FROM tasks WHERE taskTypeId=8; Empty set (0.000 sec) MariaDB [fog]> TRUNCATE TABLE history; Query OK, 0 rows affected (0.025 sec) MariaDB [fog]> TRUNCATE TABLE userTracking; Query OK, 0 rows affected (0.016 sec)
I also found my old thread on adding exclusions to the MAC table and added an entry for the VPN software, however the newly cloned host is still not showing up.
-
-
@sebastian-roth Yes, you’re absolutely right! The original had a secondary MAC matching the clone. I deleted it and expect the clone to show up shortly. Thanks for your patience!