Node registration failed in 1.3.0-RC30
-
He means a host.
-
@Wayne-Workman How do you know that?
-
@Tom-Elliott because of the error he quoted, “Attempting to send inventory…failed”
-
@Wayne-Workman How do we know what the OP is trying to do?
You know for a fact that they’re trying to register a host? I don’t know that based on the information.
Maybe they’re trying to create a new FOG Storage Node thinking they need to “register it” like a normal host?
We don’t know what the OP is trying to do, which is why I asked the question of the OP.
-
I meant to register a host to fog… I tried again, same result, but syslog had no error messages.
I can find the host in management GUI, but except MAC address, all other fields are empty, not sure if this is right.
-
@Maorui2k These are some DB cleanup commands, run them and share their output with us, and after you run them try to register the host again. Run these via terminal on your server.
sudo -i mysql -D fog DELETE FROM `hosts` WHERE `hostID` = '0'; DELETE FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0'; DELETE FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0'; DELETE FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0'; DELETE from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0'; DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`); DELETE FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`); DELETE FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`); DELETE FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`); quit
-
Here is the output, seems no hostID=0 record. I de-registered and re-registered, same error message. I also reinstalled the Ubuntu & fog server, the result is same.
mysql> select * from hosts; +--------+--------------+--------------------------------------------------+--------+-----------+--------------+---------------------+---------------------+--------------+-----------+--------------+----------+------------+------------+------------------+----------------+------------------+----------------+------------+------------+----------+-------------+------------+--------------+---------------------+--------------+--------------+-------------+-------------+ | hostID | hostName | hostDesc | hostIP | hostImage | hostBuilding | hostCreateDate | hostLastDeploy | hostCreateBy | hostUseAD | hostADDomain | hostADOU | hostADUser | hostADPass | hostADPassLegacy | hostProductKey | hostPrinterLevel | hostKernelArgs | hostKernel | hostDevice | hostInit | hostPending | hostPubKey | hostSecToken | hostSecTime | hostPingCode | hostExitBios | hostExitEfi | hostEnforce | +--------+--------------+--------------------------------------------------+--------+-----------+--------------+---------------------+---------------------+--------------+-----------+--------------+----------+------------+------------+------------------+----------------+------------------+----------------+------------+------------+----------+-------------+------------+--------------+---------------------+--------------+--------------+-------------+-------------+ | 1 | 00e04c6939cd | Created by FOG Reg on December 13, 2016, 5:00 am | | 0 | 0 | 2016-12-13 05:00:40 | 0000-00-00 00:00:00 | fog | | | | | | | | | | | | | | | | 0000-00-00 00:00:00 | | | | | +--------+--------------+--------------------------------------------------+--------+-----------+--------------+---------------------+---------------------+--------------+-----------+--------------+----------+------------+------------+------------------+----------------+------------------+----------------+------------+------------+----------+-------------+------------+--------------+---------------------+--------------+--------------+-------------+-------------+ 1 row in set (0.00 sec) mysql> mysql> DELETE FROM `hosts` WHERE `hostID` = '0'; Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0'; Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0'; Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0'; Query OK, 0 rows affected (0.00 sec) mysql> DELETE from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0'; Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`); Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`); Query OK, 0 rows affected (0.00 sec) mysql> quit Bye
-
I found some error messages in Apache logs.
==> /var/log/apache2/other_vhosts_access.log <== 192.168.1.2:80 192.168.1.100 - - [13/Dec/2016:13:38:07 +0800] "GET /fog/service/getversion.php HTTP/1.1" 200 517 "-" "Wget/1.17.1 (linux-gnu)" 192.168.1.2:80 192.168.1.100 - - [13/Dec/2016:13:38:07 +0800] "POST /fog/service/auto.register.php HTTP/1.1" 200 509 "-" "Wget/1.17.1 (linux-gnu)" ==> /var/log/apache2/error.log <== [Tue Dec 13 13:38:19.421859 2016] [php7:error] [pid 15341] [client 192.168.1.100:47434] PHP Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /var/www/fog/service/inventory.php:30\nStack trace:\n#0 {main}\n thrown in /var/www/fog/service/inventory.php on line 30 ==> /var/log/apache2/other_vhosts_access.log <== 192.168.1.2:80 192.168.1.100 - - [13/Dec/2016:13:38:19 +0800] "POST /fog/service/inventory.php HTTP/1.1" 500 524 "-" "Wget/1.17.1 (linux-gnu)" ==> /var/log/apache2/error.log <== [Tue Dec 13 13:38:21.622073 2016] [php7:error] [pid 15342] [client 192.168.1.100:47436] PHP Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /var/www/fog/service/inventory.php:30\nStack trace:\n#0 {main}\n thrown in /var/www/fog/service/inventory.php on line 30 ==> /var/log/apache2/other_vhosts_access.log <== 192.168.1.2:80 192.168.1.100 - - [13/Dec/2016:13:38:21 +0800] "POST /fog/service/inventory.php HTTP/1.1" 500 524 "-" "Wget/1.17.1 (linux-gnu)"
-
There were some issues with registration recently (like this one) that have been fixed, can you please update to the latest RC and try again?
-
Updated to RC36, and both full & quick registration worked as expected!