Task Management menu unavailable on Fog Web interface
-
Hello all,
since this morning I have a litlle problem accessing the task management menu in the web interface of my Fog Server
Fog client : 1.2.0
OS : Redhat Enterprise 6.6 (Santiago)I have 1 task in queue (imagin computer), perhaps it crashed so it’s why the menu is not available
Some month ago I saw a post on the forum wich explain how purge the mysql table for existing tasks but I can’t retrieve itCan someone help me ?
Here is a copy of my error (all others menu works)
This is a Chrome screen but the error is present on Firefox and IE
-
@Seydoo Check your apache error log with
tail -f /var/log/httpd/error_log
while accessing that page… -
here is the content of the log file :
[Fri Apr 01 15:08:30 2016] [error] [client 172.16.16.29] PHP Fatal error: Call to a member function __toString() on a non-object in /var/www/html/fog/lib/pages/TaskManagementPage.class.php on line 419, referer: http://172.27.1.1/fog/management/index.php?node=about&sub=settings
The line 419 seems to refers to a Mac Adress ( ‘host_mac’ => $Task->getHost()->get(‘mac’)->__toString(), )
I suspect my imaging task to be the cause of the problem, which is “queued” in the dashboard page since this morning : -
@Seydoo My guess is that you had an old task in the list and deleted the host object. Seams like this is not something we have checks for in FOG 1.2.0. Please connect to you DB via command line client or phpmyadmin and see what you get from this:
mysql --user=root -p Enter password: ... mysql> use fog; ... mysql> SELECT * FROM tasks WHERE NOT EXISTS (SELECT * FROM hosts WHERE hosts.hostID = tasks.taskHostID ); Empty set (0.00 sec)
On my DB the query returns an empty result set because I don’t have tasks which are not connected to any host. But I guess you will see at least one entry. Note down the
taskID
and doDELETE FROM tasks WHERE taskID = 999;
(put in the taskID you saw from the SELECT statement)PS: @Tom-Elliott I tested and it is not causing a problem in FOG trunk. Although those task entries will stay in the DB forever…
-