Unable to rename/join - Error multiple hosts returned for list of mac addresses
-
10/13/2020 9:35 AM Client-Info Version: 0.11.16 10/13/2020 9:35 AM Client-Info OS: Windows 10/13/2020 9:35 AM Middleware::Authentication Waiting for authentication timeout to pass 10/13/2020 9:37 AM Middleware::Communication Download: http://fogserver/fog/management/other/ssl/srvpublic.crt 10/13/2020 9:37 AM Data::RSA FOG Server CA cert found 10/13/2020 9:37 AM Middleware::Authentication Cert OK 10/13/2020 9:37 AM Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before 10/13/2020 9:37 AM Middleware::Authentication ERROR: Could not get security token 10/13/2020 9:37 AM Middleware::Authentication ERROR: Could not find file ‘C:\Program Files (x86)\FOG\token.dat’. 10/13/2020 9:37 AM Middleware::Communication POST URL: http://fogserver/fog/management/index.php?sub=requestClientInfo&authorize&newService 10/13/2020 9:37 AM Middleware::Response Error multiple hosts returned for list of mac addresses ... --------------------------------HostnameChanger------------------------------- 10/13/2020 9:31 AM Client-Info Client Version: 0.11.16 10/13/2020 9:31 AM Client-Info Client OS: Windows 10/13/2020 9:31 AM Client-Info Server Version: 1.5.9 10/13/2020 9:31 AM Middleware::Response ERROR: Unable to get subsection 10/13/2020 9:31 AM Middleware::Response ERROR: Object reference not set to an instance of an object
-
@darkxeno said in Same issue:
Error multiple hosts returned for list of mac addresses
Please run the following commands on the console to query the database for the duplicated MAC used:
shell> mysql -u fogmaster -p Password: ... mysql> use fog; ... mysql> SELECT * FROM hostMAC WHERE hmMAC IN (SELECT hmMAC FROM hostMAC GROUP BY hmMAC HAVING COUNT(hmMAC) > 1); ... mysql> SELECT * FROM hosts WHERE hostID IN (SELECT hmHostID FROM hostMAC GROUP BY hmMAC HAVING COUNT(hmMAC) > 1); ... mysql> quit
The password for the
fogmaster
database user is found in/var/www/html/fog/lib/fog/config.class.php
. Post output of the commands here in the forum if you need further help. -
@Sebastian-Roth here is the output
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 -ADatabase changed
MariaDB [fog]> SELECT * FROM hostMAC WHERE hmMAC IN (SELECT hmMAC FROM hostMAC GROUP BY hmMAC HAVING COUNT(hmMAC) > 1);
Empty set (0.02 sec)MariaDB [fog]> SELECT * FROM hosts WHERE hostID IN (SELECT hmHostID FROM hostMAC GROUP BY hmMAC HAVING COUNT(hmMAC) > 1);
Empty set (0.01 sec) -
@darkxeno Are you still seeing the same error in
fog.log
on the client. May I ask you upload the full log file here or if you think this exposes too much internal information (private range IPs and MACs are not an issue I find) then send me a private message and we can exchange things securely via PGP encrypted email. -
@Sebastian-Roth sure thingfog.log
-
@Sebastian-Roth heres the log file after updating to 0.12fog.log
-
@darkxeno Some of the MAC addresses we see in the logs are clearly virtual VPN adapter MACs - e.g. 00:09:0F:AA:00:01
Please run the following SQL query to find out which hosts might be using these and post results here:
mysql> SELECT hmHostID FROM hostMAC where hmMAC IN ('00:09:0F:AA:00:01', '4E:4D:D9:8C:1F:5B', '54:B2:03:E4:6A:D5', 'F8:AC:65:BE:26:0C', 'F8:AC:65:BE:26:0D', 'FA:AC:65:BE:26:0C', 'F8:AC:65:BE:26:10', '90:93:8B:56:52:54');
-
@Sebastian-Roth said in Unable to rename/join - Error multiple hosts returned for list of mac addresses:
mysql> SELECT hmHostID FROM hostMAC where hmMAC IN (‘00:09:0F:AA:00:01’, ‘4E:4D:D9:8C:1F:5B’, ‘54:B2:03:E4:6A:D5’, ‘F8:AC:65:BE:26:0C’, ‘F8:AC:65:BE:26:0D’, ‘FA:AC:65:BE:26:0C’, ‘F8:AC:65:BE:26:10’, ‘90:93:8B:56:52:54’);
MariaDB [(none)]> SELECT hmHostID FROM hostMAC where hmMAC IN ('00:09:0F:AA:00:01', '4E:4D:D9:8C:1F:5B', '54:B2:03:E4:6A:D5', 'F8:AC:65:BE:26:0C', 'F8:AC:65:BE:26:0D', 'FA:AC:65:BE:26:0C', 'F8:AC:65:BE:26:10', '90:93:8B:56:52:54'); ERROR 1046 (3D000): No database selected MariaDB [(none)]>
-
@darkxeno Always need to select the database first just as last time:
shell> mysql -u fogmaster -p Password: ... mysql> use fog; ... mysql> SELECT hmHostID FROM hostMAC where hmMAC IN ('00:09:0F:AA:00:01', '4E:4D:D9:8C:1F:5B', '54:B2:03:E4:6A:D5', 'F8:AC:65:BE:26:0C', 'F8:AC:65:BE:26:0D', 'FA:AC:65:BE:26:0C', 'F8:AC:65:BE:26:10', '90:93:8B:56:52:54'); ... mysql> quit
-
@Sebastian-Roth said in Unable to rename/join - Error multiple hosts returned for list of mac addresses:
use fog;
Database changed MariaDB [fog]> SELECT hmHostID FROM hostMAC where hmMAC IN ('00:09:0F:AA:00:01', '4E:4D:D9:8C:1F:5B', '54:B2:03:E4:6A:D5', 'F8:AC:65:BE:26:0C', 'F8:AC:65:BE:26:0D', 'FA:AC:65:BE:26:0C', 'F8:AC:65:BE:26:10', '90:93:8B:56:52:54'); +----------+ | hmHostID | +----------+ | 357 | | 419 | +----------+ 2 rows in set (0.00 sec)
-
@darkxeno Now get the names of these hosts:
... mysql> SELECT hostName FROM hosts where hostID IN ( 357, 419 ); ...
-
@Sebastian-Roth said in Unable to rename/join - Error multiple hosts returned for list of mac addresses:
SELECT hostName FROM hosts where hostID IN ( 357, 419 );
Got them what do I need to do with them?
-
@darkxeno said in Unable to rename/join - Error multiple hosts returned for list of mac addresses:
Got them what do I need to do with them?
Well, check those in the FOG web UI. Why do they have the same MAC addresses? Remove the MAC address from one or both of the hosts and their fog-client should be working fine again.
Often this is caused by virtual VPN adapters. For example the
00:09:0F:AA:00:01
looks like one. You can prevent the fog-client from registering those kind of MACs using this setting: FOG Configuration -> FOG Settings -> FOG Client - Host Register -> FOG_QUICKREG_PENDING_MAC_FILTER… -
@Sebastian-Roth That worked thanks man I owe you a beer!!!
-
@darkxeno You are welcome. I know it’s a bit of a hack to work through this and find that duplicate. Though it would need a lot of changes on the messages we send between FOG server and fog-client if we wanted to print out the names of those machines using the same MAC right in the fog.log…
-
@Sebastian-Roth I understand than I was racing my brain on this lol