Fog will not register hosts. At all...
-
I have a fog server that stays powered off when not in use, when needed I power it up through the iRMC. It was working perfectly until I powered it off the last time, now it will not register new hosts, and I have tried both quick and full, as well as manually adding them through the web interface.
Server is running Centos 6.9 and FOG 1.5.7. I am getting ready to bite the bullet and just update to the latest version of FOG, but i would like to know the underlying cause if possible. Thanks!
-
I might suggest checking if you have free space on your disk. Also check the Apache error log during the time you try to register hosts. There are other things to try but I don’t want to write a book here just yet.
-
@Mike_ To be able to tell you the root cause of e the issue we need more details. You have not told us what error exactly you see. Best if you can take a picture and post that here in the forums.
-
guys apologies, but i was in a pinch so I just upgraded to FOG 1.5.9, now I am getting an error when trying install the fog client on the VM, “unable to install CA Certificate”. I had this before and was able to install it using the fdqn, but now even that is not working.
-
@Mike_ Do you have HTTPS enabled in FOG?
Try accessing http://x.x.x.x/fog/management/other/ca.cert.pem in your browser using the IP and DNS name of your FOG server.
-
got it to install with Https uncheck and using ip. Guys thank you, I should be good from here. I will update if not.
-
@Sebastian-Roth sorry to keep running around in circles but I am back to the original issue now. I pulled the apache logs, and it it full of errors, like 12000+. The first 4000 or so are this error with various IPS:
PHP Fatal error: Uncaught Exception: 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(571): HostManager->getHostByMacAddresses(Array)\n#1 /var/www/html/fog/lib/client/registerclient.class.php(46): FOGBase::getHostItem(true, false, false, true)\n#2 /var/www/html/fog/lib/fog/fogpage.class.php(3013): RegisterClient->json()\n#3 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()\n#4 /var/www/html/fog/lib/pages/dashboardpage.class.php(76): FOGPage->__construct(‘Dashboard’)\n#5 /var/www/html/fog/lib/fog/loadglobals.class.php(67): DashboardPage->__construct()\n#6 /var/www/html/fog/lib/fog/loadglobals.class.php(81): LoadGlobals::_init()\n#7 /var/www/html/fog/commons/base.inc.php(49): LoadGlobals->__construct()\n#8 /var/www/html/fog/management/index.php(22): require(‘/var/www/html/f…’)\n#9 {main}
I removed all hosts from the web based interface last month, is there a way to delete the db and recreate it, or am I looking at something else?
-
@Mike_ Usually I’d take the way forward and solve the issue by finding the duplicated address but as you’ve removed all the hosts we might just delete all of it from the DB:
shell> mysql -u root -p Password: ... mysql> use fog; ... mysql> TRUNCATE TABLE hostMAC; ... mysql> TRUNCATE TABLE hosts; ... mysql> quit
-
@Sebastian-Roth
Database changed
mysql> TRUNCATE TABLE hostMAC;
Query OK, 0 rows affected (0.00 sec)mysql> TRUNCATE TABLE hosts;
Query OK, 0 rows affected (0.01 sec)mysql> quit
ByeIs above what I am expecting it to return?
-
@Mike_ Yes, this is expected. For more information see here: https://mariadb.com/kb/en/truncate-table/
Truncation operations do not return a meaningful value for the number of deleted rows. The usual result is “0 rows affected,” which should be interpreted as “no information.”
-
@Sebastian-Roth It is registering hosts now. Thank you Sebastian!
-
Future readers can also try this: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL#Database_Maintenance_Commands