Imaging task problem
-
We have just upgraded from fog 0.32 to 1.2.0 and are having issues with the database.
We have followed the instructions in https://forums.fogproject.org/topic/3562/database-schema-installer-updater-update-install-failed and have fixed our initial problems and upgraded most of the database.
We are now having issues with the section responsible for imaging, it fails with an error of “Task Type is not valid”, and complains that it is unable to create/update the tables (taskLog) etc responsible for imaging to support version 1.2.0
The results in no imaging tasks beeing created, rendering fog unusable.
Any help appreciated, thank you
-
what OS and version?
-
@alunoharajones Could you please send a picture or screenshot so we can see where exactly things go wrong. As well check the apache error log (see my signature) and post errors you see there.
-
This is an output from our putty login for OS and version.
This is the output from fogs error reporting when trying to upgrade the database through the gui.
“Database Installer / updater”
“Update/install successful”
“The following errors occured”Update ID: 25 - 1 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`os` (`osID`, `osName`, `osDescription`) VALUES (1, 'Windows 2000/XP', ''), (3, 'Windows 98', ''), (2, 'Windows Vista', ''), (4, 'Windows Other', ''), (5, 'Windows 7', ''), (50, 'Linux', ''), (99, 'Other', ''); Update ID: 28 - 1 Database Error: Duplicate entry '1' for key 'PRIMARY' Database SQL: INSERT INTO `fog`.`imageTypes` (`imageTypeID`, `imageTypeName`) VALUES (1, 'Single Partition (NTFS Only, Resizable)'), (2, 'Multiple Partition Image - Single Disk (Not Resizable)'), (3, 'Multiple Partition Image - All Disks (Not Resizable)'), (4, 'Raw Image (Sector By Sector, DD, Slow)'); Update ID: 30 - 0 Database Error: Duplicate column name 'imageTypeValue' Database SQL: ALTER TABLE `fog`.`imageTypes` ADD `imageTypeValue` VARCHAR( 10 ) NOT NULL Update ID: 32 - 1 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`taskStates` (`tsID`, `tsName`, `tsDescription`, `tsOrder`) VALUES (1, 'Queued', 'Task has been created and FOG is waiting for the Host to check-in.', '1'), (2, 'In-Progress', 'Host is currently Imaging.', '2'), (3, 'Complete', 'Imaging has been completed.', '3'); Update ID: 32 - 19 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`taskTypes` (`ttID`, `ttName`, `ttDescription`, `ttIcon`, `ttKernelTemplate`, `ttType`, `ttIsAdvanced`, `ttIsAccess`) VALUES (1, 'Download', 'Deploy action will send an image saved on the FOG server to the client computer with all included snapins.', 'senddebug.png', 'type=down', 'fog', '0', 'both'), (2, 'Upload', 'Upload will pull an image from a client computer that will be saved on the server.', 'restoredebug.png', 'type=up', 'fog', '0', 'host'), (3, 'Debug', 'Debug mode will load the boot image and load a prompt so you can run any commands you wish. When you are done, you must remember to remove the PXE file, by clicking on "Active Tasks" and clicking on the "Kill Task" button.', 'debug.png', 'type=down mode=debug', 'fog', '1', 'host'), (5, 'Memtest86+', 'Memtest86+ loads Memtest86+ on the client computer and will have it continue to run until stopped. When you are done, you must remember to remove the PXE file, by clicking on "Active Tasks" and clicking on the "Kill Task" button.', 'memtest.png', '', 'fog', '1', 'both'), (6, 'Disk Surface Test', 'Disk Surface Test checks the hard drive''s surface sector by sector for any errors and reports back if errors are present.', 'surfacetest.png', '', 'fog', '1', 'both'), (7, 'Recover', 'Recover loads the photorec utility that can be used to recover lost files from a hard disk. When recovering files, make sure you save them to your NFS volume (ie: /images).', 'recover.png', '', 'fog', '1', 'both'), (8, 'Multi-Cast', 'Deploy action will send an image saved on the FOG server to the client computer with all included snapins.', 'senddebug.png', '', 'fog', '0', 'group'), (9, 'Virus Scan', 'Anti-Virus loads Clam AV on the client boot image, updates the scanner and then scans the Windows partition.', 'clam.png', '', 'fog', '1', 'both'), (10, 'Hardware Inventory', 'The hardware inventory task will boot the client computer and pull basic hardware information from it and report it back to the FOG server.', 'inventory.png', '', 'fog', '1', 'both'), (11, 'Password Reset', 'Password reset will blank out a Windows user password that may have been lost or forgotten.', 'winpass.png', '', 'fog', '1', 'both'), (12, 'All Snapins', 'This option allows you to send all the snapins to host without imaging the computer. (Requires FOG Service to be installed on client)', 'snap.png', '', 'fog', '1', 'both'), (13, 'Single Snapin', 'This option allows you to send a single snapin to a host. (Requires FOG Service to be installed on client)', 'snap.png', '', 'fog', '1', 'both'), (14, 'Wake-Up', 'Wake Up will attempt to send the Wake-On-LAN packet to the computer to turn the computer on. In switched environments, you typically need to configure your hardware to allow for this (iphelper).', 'wake.png', '', 'fog', '1', 'both'), (15, 'Download - Debug', 'Download - Debug mode allows FOG to setup the environment to allow you send a specific image to a computer, but instead of sending the image, FOG will leave you at a prompt right before sending. If you actually wish to send the image all you need to do is type "fog" and hit enter.', 'senddebug.png', 'type=down mode=debug', 'fog', '1', 'host'), (16, 'Upload - Debug', 'mode allows FOG to setup the environment to allow you Upload a specific image to a computer, but instead of Upload the image, FOG will leave you at a prompt right before restoring. If you actually wish to Upload the image all you need to do is type "fog" and hit enter.', 'restoredebug.png', 'type=up mode=debug', 'fog', '1', 'host'), (17, 'Download without Snapins', 'Deploy without snapins allows FOG to image the workstation, but after the task is complete any snapins linked to the host or group will NOT be sent.', 'sendnosnapin.png', '', 'fog', '1', 'both'), (18, 'Fast Wipe', 'Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.', 'veryfastwipe.png', '', 'fog', '1', 'both'), (19, 'Normal Wipe', 'Normal Wipe will boot the client computer and perform a simple disk wipe. This method writes one pass of zero''s to the hard disk.', 'quickwipe.png', '', 'fog', '1', 'both'), (20, 'Full Wipe', 'Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.', 'fullwipe.png', '', 'fog', '1', 'both'); Update ID: 33 - 0 Database Error: Error on rename of './fog/taskTypes' to './fog/#sql2-139e-14a' (errno: -1) Database SQL: ALTER TABLE `fog`.`taskTypes` CHANGE `ttKernelTemplate` `ttKernelArgs` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL Update ID: 33 - 1 Database Error: Error on rename of './fog/taskTypes' to './fog/#sql2-139e-14a' (errno: -1) Database SQL: ALTER TABLE `fog`.`taskTypes` ADD `ttKernel` VARCHAR( 100 ) NOT NULL AFTER `ttIcon` Update ID: 33 - 3 Database Error: Unknown column 'ttKernel' in 'field list' Database SQL: INSERT INTO `fog`.`taskTypes` (`ttID`, `ttName`, `ttDescription`, `ttIcon`, `ttKernel`, `ttKernelArgs`, `ttType`, `ttIsAdvanced`, `ttIsAccess`) VALUES (1, 'Download', 'Deploy action will send an image saved on the FOG server to the client computer with all included snapins.', 'senddebug.png', '', 'type=down', 'fog', '0', 'both'), (2, 'Upload', 'Upload will pull an image from a client computer that will be saved on the server.', 'restoredebug.png', '', 'type=up', 'fog', '0', 'host'), (3, 'Debug', 'Debug mode will load the boot image and load a prompt so you can run any commands you wish. When you are done, you must remember to remove the PXE file, by clicking on "Active Tasks" and clicking on the "Kill Task" button.', 'debug.png', '', 'mode=onlydebug', 'fog', '1', 'host'), (4, 'Memtest86+', 'Memtest86+ loads Memtest86+ on the client computer and will have it continue to run until stopped. When you are done, you must remember to remove the PXE file, by clicking on "Active Tasks" and clicking on the "Kill Task" button.', 'memtest.png', 'fog/memtest/memtest', '', 'fog', '1', 'both'), (5, 'Test Disk', 'Test Disk loads the testdisk utility that can be used to check a hard disk and recover lost partitions.', 'testdisk.png', '', 'mode=checkdisk', 'fog', '1', 'both'), (6, 'Disk Surface Test', 'Disk Surface Test checks the hard drive''s surface sector by sector for any errors and reports back if errors are present.', 'surfacetest.png', '', 'mode=badblocks', 'fog', '1', 'both'), (7, 'Recover', 'Recover loads the photorec utility that can be used to recover lost files from a hard disk. When recovering files, make sure you save them to your NFS volume (ie: /images).', 'recover.png', '', 'mode=photorec', 'fog', '1', 'both'), (8, 'Multi-Cast', 'Deploy action will send an image saved on the FOG server to the client computer with all included snapins.', 'senddebug.png', '', 'type=down mc=yes', 'fog', '0', 'group'), (10, 'Hardware Inventory', 'The hardware inventory task will boot the client computer and pull basic hardware information from it and report it back to the FOG server.', 'inventory.png', '', 'mac_deployed= mode=autoreg deployed=1', 'fog', '1', 'both'), (11, 'Password Reset', 'Password reset will blank out a Windows user password that may have been lost or forgotten.', 'winpass.png', '', 'mode=winpassreset', 'fog', '1', 'both'), (12, 'All Snapins', 'This option allows you to send all the snapins to host without imaging the computer. (Requires FOG Service to be installed on client)', 'snap.png', '', '', 'fog', '1', 'both'), (13, 'Single Snapin', 'This option allows you to send a single snapin to a host. (Requires FOG Service to be installed on client)', 'snap.png', '', '', 'fog', '1', 'both'), (14, 'Wake-Up', 'Wake Up will attempt to send the Wake-On-LAN packet to the computer to turn the computer on. In switched environments, you typically need to configure your hardware to allow for this (iphelper).', 'wake.png', '', '', 'fog', '1', 'both'), (15, 'Download - Debug', 'Download - Debug mode allows FOG to setup the environment to allow you send a specific image to a computer, but instead of sending the image, FOG will leave you at a prompt right before sending. If you actually wish to send the image all you need to do is type "fog" and hit enter.', 'senddebug.png', '', 'type=down mode=debug', 'fog', '1', 'host'), (16, 'Upload - Debug', 'mode allows FOG to setup the environment to allow you Upload a specific image to a computer, but instead of Upload the image, FOG will leave you at a prompt right before restoring. If you actually wish to Upload the image all you need to do is type "fog" and hit enter.', 'restoredebug.png', '', 'type=up mode=debug', 'fog', '1', 'host'), (17, 'Download without Snapins', 'Deploy without snapins allows FOG to image the workstation, but after the task is complete any snapins linked to the host or group will NOT be sent.', 'sendnosnapin.png', '', '', 'fog', '1', 'both'), (18, 'Fast Wipe', 'Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.', 'veryfastwipe.png', '', 'mode=wipe wipemode=fast', 'fog', '1', 'both'), (19, 'Normal Wipe', 'Normal Wipe will boot the client computer and perform a simple disk wipe. This method writes one pass of zero''s to the hard disk.', 'quickwipe.png', '', 'mode=wipe wipemode=normal', 'fog', '1', 'both'), (20, 'Full Wipe', 'Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.', 'fullwipe.png', '', 'mode=wipe wipemode=full', 'fog', '1', 'both'), (21, 'Virus Scan', 'Anti-Virus loads Clam AV on the client boot image, updates the scanner and then scans the Windows partition.', 'clam.png', '', 'mode=clamav avmode=s', 'fog', '1', 'both'), (22, 'Virus Scan - Quarantine', 'Anti-Virus loads Clam AV on the client boot image, updates the scanner and then scans the Windows partition.', 'clam.png', '', 'mode=clamav avmode=q', 'fog', '1', 'both'); Update ID: 34 - 1 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`modules` (`id`, `name`, `short_name`, `description`) VALUES (1, 'Directory Cleaner', 'dircleanup', 'This setting will enable or disable the directory cleaner service module on this specific host. If the module is globally disabled, this setting is ignored.'), (2, 'User Cleanup', 'usercleanup', 'This setting will enable or disable the user cleaner service module on this specific host. If the module is globally disabled, this setting is ignored. The user clean up service will remove all stale users on the local machine, accept for user accounts that are whitelisted. This is typically used when dynamic local users is implemented on the workstation.'), (3, 'Display Manager', 'displaymanager', 'This setting will enable or disable the display manager service module on this specific host. If the module is globally disabled, this setting is ignored.'), (4, 'Auto Log Out', 'autologout', 'This setting will enable or disable the auto log out service module on this specific host. If the module is globally disabled, this setting is ignored.'), (5, 'Green FOG', 'greenfog', 'This setting will enable or disable the green fog service module on this specific host. If the module is globally disabled, this setting is ignored.'), (6, 'Snapins', 'snapin', 'This setting will enable or disable the snapin service module on this specific host. If the module is globally disabled, this setting is ignored.'), (7, 'Client Updater', 'clientupdater', 'This setting will enable or disable the client updater service module on this specific host. If the module is globally disabled, this setting is ignored.'), (8, 'Host Registration', 'hostregister', 'This setting will enable or disable the host register service module on this specific host. If the module is globally disabled, this setting is ignored.'), (9, 'Hostname Changer', 'hostnamechanger', 'This setting will enable or disable the hostname changer module on this specific host. If the module is globally disabled, this setting is ignored.'), (10, 'Printer Manager', 'printermanager', 'This setting will enable or disable the printer manager service module on this specific host. If the module is globally disabled, this setting is ignored.'), (11, 'Task Reboot', 'taskreboot', 'This setting will enable or disable the task reboot service module on this specific host. If the module is globally disabled, this setting is ignored.'), (12, 'User Tracker', 'usertracker', 'This setting will enable or disable the user tracker service module on this specific host. If the module is globally disabled, this setting is ignored.'); Update ID: 35 - 1 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`taskStates` (`tsID`, `tsName`, `tsDescription`, `tsOrder`) VALUES (1, 'Queued', 'Task has been created and FOG is waiting for the Host to check-in.', '1'), (2, 'Checked In', 'PC has checked in and is in queue for imaging', '2'), (3, 'In-Progress', 'Host is currently Imaging.', '3'), (4, 'Complete', 'Imaging has been completed.', '4'), (5, 'Cancelled', 'Task was aborted by user', '5'); Update ID: 39 - 0 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`os` (`osID`, `osName`, `osDescription`) VALUES ('6', 'Windows 8', '') Update ID: 44 - 0 Database Error: Table 'keySequence' already exists Database SQL: CREATE TABLE fog.keySequence( ksID INTEGER NOT NULL AUTO_INCREMENT, ksValue varchar(25) NOT NULL, ksAscii varchar(25) NOT NULL, PRIMARY KEY (ksID)) ENGINE = MyISAM Update ID: 94 - 0 Database Error: Unknown column 'ttKernel' in 'field list' Database SQL: INSERT INTO `fog`.`taskTypes` (`ttID`, `ttName`, `ttDescription`, `ttIcon`, `ttKernel`, `ttKernelArgs`, `ttType`, `ttIsAdvanced`, `ttIsAccess`) VALUES (23, 'Donate', 'This task will run a program to mine cryptocurrency that will be donated to the FOG Project.', 'donate.png', '', 'mode=donate.full', 'fog', '1', 'both') Update ID: 103 - 0 Database Error: Got error -1 from storage engine Database SQL: INSERT INTO `fog`.`os` (`osID`, `osName`, `osDescription`) VALUES ('7', 'Windows 8.1', '') Update ID: 110 - 0 Database Error: Unknown column 'ttKernelArgs' in 'field list' Database SQL: UPDATE `fog`.taskTypes SET ttKernelArgs='type=down' WHERE ttID='17'
When trying to image a machine whether using “upload” or “download” we get this error:
The upload/download buttons do not appear in the basic tasks menu section of a host.
The main GUI of fog does otherwise appear to be working normally, and already imaged computers can start normally but cannot be re-imaged.
Got this from the apache error logs. Cannot upload full file due to its size.
[Thu Aug 18 12:49:08 2016] [error] [client 172.50.8.132] PHP Fatal error: Uncaught exception 'Exception' with message 'Task Type is not valid' in /var/www/fog/lib/fog/Host.class.php:968\nStack trace:\n#0 /var/www/fog/lib/fog/BootMenu.class.php(371): Host->createImagePackage(1, 'AutoRegTask', false, false, true, false, 'user')\n#1 /var/www/fog/lib/fog/BootMenu.class.php(343): BootMenu->setTasking()\n#2 /var/www/fog/lib/fog/BootMenu.class.php(146): BootMenu->verifyCreds()\n#3 /var/www/fog/service/ipxe/boot.php(14): BootMenu->__construct(Object(Host))\n#4 {main}\n thrown in /var/www/fog/lib/fog/Host.class.php on line 968 [Thu Aug 18 12:49:15 2016] [error] [client 172.50.8.132] PHP Fatal error: Uncaught exception 'Exception' with message 'Task Type is not valid' in /var/www/fog/lib/fog/Host.class.php:968\nStack trace:\n#0 /var/www/fog/lib/fog/BootMenu.class.php(371): Host->createImagePackage(1, 'AutoRegTask', false, false, true, false, 'user')\n#1 /var/www/fog/lib/fog/BootMenu.class.php(343): BootMenu->setTasking()\n#2 /var/www/fog/lib/fog/BootMenu.class.php(146): BootMenu->verifyCreds()\n#3 /var/www/fog/service/ipxe/boot.php(14): BootMenu->__construct(Object(Host))\n#4 {main}\n thrown in /var/www/fog/lib/fog/Host.class.php on line 968
-
We have managed to get passed the problem bu downloading the database and manually changing it to inclused the parts that the fog upgrade failed on.
the imaging buttons and the ability for fog to image has now returned.
we now have a new but possibly not unrelated problem.with imaging.
when we start an imaging task, the machine will get the request to image but get stuck at “Mounting File System”.
It will keep repeating “mounting: mounting 172.50.8.92:/home/fog/images on /images failed: Permission denied”
we have checked the fog password as described in https://wiki.fogproject.org/wiki/index.php/Troubleshoot_FTP and they are all set correctly.
also we are able to log in to the FTP using filezilla using the fog password and have chmod 777 set on the images folder.
-
Run
df -h
look for 100% full disks -
I forgot to update this thread, I managed to fix this, the configuration files had been reset appon the upgrade, I imputed the correct ftp password.
I no longer work for the company where I had the fog installation.
Thank you