Kernel Update - Web-UI doesnt do anything
-
I was on RC9, am now on Working Branch from yesterday.
Kernels are updated with new version yes.
-
@taspharel said in Kernel Update - Web-UI doesnt do anything:
Error multiple hosts returned for list of mac
Though I don’t think this is related to your kernel update issue it’s definitely wise to check the database as it seems there is a duplicate MAC entry.
shell> mysql -u root -p ... mysql> use fog; mysql> SELECT hmMAC, COUNT(hmMAC) c from hostMAC GROUP BY hmMAC HAVING c > 1; mysql> quit shell>
Post the full output (or a picture) here so we can have a look.
-
It just says: Empty set (0.09 sec)
-
@Taspharel Do you still see those messages in the error log (currect timestamps)?
-
Most recent entires (theres many more):
/var/log/httpd/error_log
[Wed Oct 18 11:20:11.406156 2017] [:error] [pid 16145] [client 192.168.43.220:57156] PHP Fatal error: Uncaught exception 'Exception' with message 'Error multiple hosts returned for list of mac addresses' in /var/www/html/fog/lib/fog/hostmanager.class.php:209\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(559): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(47): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3002): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /v in /var/www/html/fog/lib/fog/hostmanager.class.php on line 209 [Wed Oct 18 11:20:11.406069 2017] [:error] [pid 16145] [client 192.168.43.220:57156] PHP Warning: array_map(): An error occurred while invoking the map callback in /var/www/html/fog/lib/fog/fogpagemanager.class.php on line 386 [Wed Oct 18 11:19:54.284721 2017] [:error] [pid 12225] [client 192.168.43.164:54854] PHP Fatal error: Uncaught exception 'Exception' with message 'Error multiple hosts returned for list of mac addresses' in /var/www/html/fog/lib/fog/hostmanager.class.php:209\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(559): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(47): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3002): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /v in /var/www/html/fog/lib/fog/hostmanager.class.php on line 209 [Wed Oct 18 11:19:54.284641 2017] [:error] [pid 12225] [client 192.168.43.164:54854] PHP Warning: array_map(): An error occurred while invoking the map callback in /var/www/html/fog/lib/fog/fogpagemanager.class.php on line 386 [Wed Oct 18 11:19:28.367696 2017] [:error] [pid 16145] [client 192.168.43.123:49896] PHP Fatal error: Uncaught exception 'Exception' with message 'Error multiple hosts returned for list of mac addresses' in /var/www/html/fog/lib/fog/hostmanager.class.php:209\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(559): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(47): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3002): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /v in /var/www/html/fog/lib/fog/hostmanager.class.php on line 209 [Wed Oct 18 11:19:28.367622 2017] [:error] [pid 16145] [client 192.168.43.123:49896] PHP Warning: array_map(): An error occurred while invoking the map callback in /var/www/html/fog/lib/fog/fogpagemanager.class.php on line 386 [Wed Oct 18 11:17:48.321519 2017] [:error] [pid 30435] [client 192.168.43.164:54850] PHP Fatal error: Uncaught exception 'Exception' with message 'Error multiple hosts returned for list of mac addresses' in /var/www/html/fog/lib/fog/hostmanager.class.php:209\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogbase.class.php(559): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(47): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3002): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()\n#6 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)\n#8 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()\n#9 [internal function]: FOGPageManager->__construct()\n#10 /v in /var/www/html/fog/lib/fog/hostmanager.class.php on line 209 [Wed Oct 18 11:17:48.321416 2017] [:error] [pid 30435] [client 192.168.43.164:54850] PHP Warning: array_map(): An error occurred while invoking the map callback in /var/www/html/fog/lib/fog/fogpagemanager.class.php on line 386
-
@Taspharel Here is another try to possibly find those entries:
shell> mysql -u root -p ... mysql> use fog; mysql> SELECT hmHostID,hmMAC,hmPrimary,COUNT(hmHostID) c FROM hostMAC GROUP BY hmHostID,hmPrimary HAVING c > 1; mysql> quit shell>
-
+----------+-------------------+-----------+----+ | hmHostID | hmMAC | hmPrimary | c | +----------+-------------------+-----------+----+ | 2 | e4:a7:a0:20:43:32 | 0 | 3 | | 4 | e4:a7:a0:20:44:6e | 0 | 9 | | 8 | e0:9d:31:2d:c1:a4 | 0 | 2 | | 14 | de:53:60:8e:6b:89 | 0 | 3 | | 18 | e4:a4:71:9d:9c:61 | 0 | 6 | | 25 | 96:65:9c:91:b2:08 | 0 | 3 | | 27 | 96:65:9c:91:b2:7a | 0 | 16 | | 34 | 0a:00:27:00:00:10 | 0 | 6 | | 36 | 74:e5:0b:1e:c9:7c | 0 | 2 | | 37 | 00:24:81:62:3b:93 | 0 | 2 | | 40 | 08:d4:0c:12:d1:a3 | 0 | 3 | | 42 | 4e:34:88:17:c2:45 | 0 | 4 | | 50 | 48:5a:b6:68:c9:5f | 0 | 2 | | 54 | 96:65:9c:4e:2d:62 | 0 | 4 | | 55 | e4:a7:a0:20:43:37 | 0 | 6 | | 61 | 00:50:b6:1c:d8:f5 | 0 | 4 | | 62 | 00:50:b6:1c:d8:7b | 0 | 3 | | 69 | 74:29:af:60:60:47 | 0 | 2 | | 79 | 00:28:f8:88:88:5d | 0 | 3 | | 80 | 00:28:f8:5a:13:4b | 0 | 4 | | 81 | 00:28:f8:88:87:c1 | 0 | 3 | | 83 | 00:28:f8:d4:0c:47 | 0 | 3 | | 84 | e4:a7:a0:8e:47:8d | 0 | 5 | | 85 | c8:5b:76:d7:fb:47 | 0 | 5 | | 87 | 0c:ee:e6:d7:ef:c1 | 0 | 2 | | 89 | e4:a7:a0:8e:47:76 | 0 | 4 | | 96 | 96:65:9c:91:b2:71 | 0 | 3 | | 98 | 7c:e9:d3:de:47:2b | 0 | 4 | | 99 | 00:28:f8:fa:27:1a | 0 | 5 | | 100 | 28:b2:bd:53:1b:bd | 0 | 3 | | 104 | 4c:34:88:53:e8:55 | 0 | 5 | | 105 | e0:9d:31:2d:d8:d0 | 0 | 3 | | 106 | e0:9d:31:0d:72:50 | 0 | 3 | | 107 | 8c:70:5a:c4:ec:38 | 0 | 3 | | 108 | 8c:a9:82:4c:23:bc | 0 | 2 | | 110 | e0:9d:31:2d:f5:14 | 0 | 3 | | 111 | 00:1c:bf:6e:db:75 | 0 | 2 | | 112 | 4c:34:88:62:d6:ed | 0 | 4 | | 113 | 28:b2:bd:92:1a:98 | 0 | 3 | | 117 | e4:a4:71:6f:c0:38 | 0 | 5 | | 119 | e4:a4:71:6f:c0:24 | 0 | 13 | | 121 | 74:e5:0b:c3:33:22 | 0 | 2 | | 122 | 44:85:00:c3:9c:d1 | 0 | 3 | +----------+-------------------+-----------+----+ 43 rows in set (0.05 sec)
-
Do I read this correctly in that one of the MAC adresses is assigned to 16 (!!) of our hosts?
How did I make that happen?
-
@taspharel No, it just means that for those hosts (grouped by the hosts’ IDs) you have several MAC addresses in the DB. This is all fine. What I expected to see was at least one entry with hmPrimary set to 1!
Though this query is not perfect because of the grouping. It might not show the entry I expected to find.
Please do some DB maintainence. Search the wiki on this.
-
Doing the maintenance from the mysql section in the wiki gets most queries with 0 rows affected.
MariaDB [fog]> DELETE FROM `hosts` WHERE `hostID` = '0'; Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0'; Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0'; Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0'; Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0'; Query OK, 3 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1'); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `tasks` WHERE `taskStateID` IN ("1","2","3"); Query OK, 0 rows affected (0.00 sec) MariaDB [fog]> DELETE FROM `snapinTasks` WHERE `stState` in ("1","2","3"); Query OK, 2 rows affected (0.00 sec)
-
@Taspharel I must have overlooked what is really causing this in your case. Sorry for that. Now I found the time to dive deeper and replicate the error message. Though it took a lot of fiddling with the DB. Let me explain:
- In the logs you see different client IPs. From that and the code I think this is happening when fog-clients want to talk to the FOG server - so this has nothing to do with your initial request of kernel updates (hope we get to that at some point as well!!)
- What you see in the logs can only happen if you have a client (or in your case several clients) report(s) a MAC address to the FOG server on check-in which is registered for another client as primary MAC.
- This is why I couldn’t figure out a mysql query to find the entry causing this. It’s not just in the DB but also the clients reporting a MAC that is used by another machine.
I am still wondering how this can happen. Possibly this has something to do with virtual machines running on those clients? Not sure though.
Please go ahead and take a closer look at the
fog.log
on those clients (192.168.43.220, 192.168.43.164, 192.168.43.123, 192.168.43.187 and possibly more). Find the lines that look like this:10/19/2017 10:34 PM Middleware::Communication URL: http://x.x.x.x/fog/management/index.php?sub=requestClientInfo&mac=E6:FF:3C:83:40:15|E6:2B:28:65:84:12&newService&json
See if you can figure out if there is an identical MAC address reported by all those clients.
-
And now let’s get back to the initial question…
@Taspharel said:
I can open the page to install the kernel just fine, but clicking on “install” doesnt do anything.
There is no “install” button there. Please take a screenshot of what you see when things go wrong. Just want to make sure we talk about the same thing. Have you tried in Firefox yet? Are you behind a proxy server by any chance?
-
@Sebastian-Roth
Thanks for your help.So, something that has troubled us in the past (auto renames of hosts to names that are assigned to other hosts) was that we use usb3-docking-stations on a lot of our setups. So I assume that a computer that was attached to a docking station when registering with FOG via the client took the Docking Stations MAC Adress and registered it. This may have happened with several clients. Attaching a new computer to a docking station with force reboot hostname change active then changed the new computer to the old computers settings.
I have been trying to figure out a way to get all the docking stations mac adresses and have fog ignore them, but there seems to be little similarity in the docking stations mac adresses … So for the moment I am struggling with finding out which host uses a docking stations mac as primary mac to make them ignore it.
I was even considering deleting all the hosts for our rollout today to make sure that they get registered with their correct mac’s - since we have to connect them directly to the lan port for fog to do its thing anyways … but I am worried it might throw more problems than its worth …Regarding the Kernel:
With the working branch fog that I installed a few days ago the problem with the install button (Screenshot: https://drive.google.com/open?id=0B_yYSiicYNIARjQ2eHJXTS1RV28) - it now is clickable.But when I clicked on the button I get an error now: https://drive.google.com/open?id=0B_yYSiicYNIAX3Qyek0wZVNMNDQ
EDIT: Same kernel update error for this user here - https://forums.fogproject.org/topic/10978/uefi-lenovo-miix-320-and-usb-ethernet/2
-
@Taspharel Please run
ls -al /var/www/fog/service/ipxe
on your FOG server and post results here. -
Results in this:
total 53756
drwxr-xr-x. 2 fogadmin apache 243 Oct 16 12:20 .
drwxr-xr-x. 3 apache apache 4096 Oct 16 12:20 …
-rw-r–r–. 1 fogadmin apache 1966 Oct 16 12:20 advanced.php
-rw-r–r–. 1 fogadmin apache 16272 Oct 16 12:20 bgdark.png
-rw-r–r–. 1 fogadmin apache 21280 Oct 16 12:20 bg.png
-rw-r–r–. 1 fogadmin apache 1139 Oct 16 12:20 boot.php
-rw-r–r–. 1 fogadmin apache 8069680 Oct 16 12:20 bzImage
-rw-r–r–. 1 fogadmin apache 7853680 Oct 16 12:20 bzImage32
-rw-r–r–. 1 fogadmin apache 234697 Oct 16 12:20 grub.exe
-rw-r–r–. 1 fogadmin apache 592 Oct 16 12:20 index.php
-rw-r–r–. 1 fogadmin apache 18721596 Oct 16 12:20 init_32.xz
-rw-r–r–. 1 fogadmin apache 19553652 Oct 16 12:20 init.xz
-rw-r–r–. 1 fogadmin apache 25340 Oct 16 12:20 memdisk
-rw-r–r–. 1 fogadmin apache 1839104 Oct 16 12:20 memtest.bin
-rw-r–r–. 1 fogadmin apache 20976 Oct 16 12:20 refind.conf
-rw-r–r–. 1 fogadmin apache 205192 Oct 16 12:20 refind.efi -
@Taspharel This hopefully helps:
chmod 777 /var/www/fog/service/ipxe chmod 666 /var/www/fog/service/ipxe/bzImage*
Then try kernel update again.