fusioninventory-for-glpi
fusioninventory-for-glpi copied to clipboard
GLPI 10.0 + FI 10.0+1.0 / PHP 7.4 - Error on deploy task
Hi, I've recently migrated from GLPI 9.5.5 to 10.0 and FI 1.0 on a Centos Stream 8 server using PHP 7.4. I've created a deploy task that everytime got stuck in "Preapeared" status.
Taking a look to the agent logs (debug=2) I found this issue [error] [http client] Got empty response
below are the lines of that part of the log
[Wed May 18 12:03:33 2022][info] running task Deploy
[Wed May 18 12:03:33 2022][debug2] https://my.server.com/plugins/fusioninventory/?action=getConfig&machineid=CS-NB-PF255ALM-2022-05-17-12-08-42&task[Deploy]=2.8
[Wed May 18 12:03:34 2022][debug2] https://my.server.com/plugins/fusioninventory/b/deploy/?action=getJobs&machineid=CS-NB-PF255ALM-2022-05-17-12-08-42&version=2.8
[Wed May 18 12:03:35 2022][error] [http client] Got empty response
[Wed May 18 12:03:35 2022][debug] bad JSON: No answer from server.
[Wed May 18 12:03:35 2022][info] No Deploy job found in server jobs list.
I did a lot of troubleshooting over the FI configuration and PHP versions (I tried with 7.4 - 8.0 - 8.1) with the same issue. Any help would be really appreciated!
Do you have errors in glpi/files/_log/php-errors.log ?
Nope, no errors in </php-errors.log>. Also, when there is no job assigned, the query b/deploy/?action=getJobs&machineid=CS-NB-PF255ALM-2022-05-17-12-08-42&version=2.8
returns a valid JSON {}
but when there is a job assigned to the device, it does not return anything.
I have the same error with this in php-errors.log:
[2022-05-25 18:33:39] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::decodeHtmlSpecialCharsRecursive() must be of the type array, string given, called in /var/www/html/glpi/src/Toolbox.php on line 299 in /var/www/html/glpi/src/Toolbox/Sanitizer.php at line 334 Backtrace : src/Toolbox.php:299 Glpi\Toolbox\Sanitizer::decodeHtmlSpecialCharsRecursive() .../fusioninventory/inc/deploycommon.class.php:392 Toolbox::unclean_cross_side_scripting_deep() plugins/fusioninventory/b/deploy/index.php:111 PluginFusioninventoryDeployCommon->run()
It seems that the deploycommon.class.php file refers on line 392 to the Toolbox function unclean_cross_side_scripting_deep() Currently this function is deprecated and replaced by decodeHtmlSpecialCharsRecursive() which is where it fails. I've tried using the "Sanitizer::unsanitize" function in the unclean_cross_side_scripting_deep() function by modifying the ToolBox.php and it seems to be working then but the commands sent to execute try to escape the quotes and backslashes and don't work. Sorry but I have no idea about PHP.... This feature is very important to us. :'(
Error "PHP message: PHP Deprecated: Use "Glpi\Toolbox\Sanitizer::decodeHtmlSpecialCharsRecursive()" in /var/www/glpi/src/Toolbox.php on line 543" while reading response header from upstream, client: 5.39.237.121, server: glpi, request: "GET //plugins/fusioninventory/b/deploy/?action=getJobs&version=2.8&machineid=GLWP0014-2022-05-05-12-39-38 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "glpi"
I am facing the same issue, none of > 150 systems is getting any new software deployed.
glpi 10.0.0 + fusioninventory 10.0.0+1.0 with PHP 7.4 on Debian 11
From php-errors.log
on the server:
[2022-07-05 19:32:17] glpiphplog.WARNING: *** PHP Warning (2): gzuncompress(): data error in /var/www/html/glpi-10.0.0/plugins/fusioninventory/inc/lock.class.php at line 824
Backtrace :
plugins/fusioninventory/inc/lock.class.php:824 gzuncompress()
plugins/fusioninventory/inc/lock.class.php:235 PluginFusioninventoryLock->getSerializedInventoryArray()
plugins/fusioninventory/inc/lock.class.php:169 PluginFusioninventoryLock->showLockForm()
src/CommonGLPI.php:687 PluginFusioninventoryLock::displayTabContentForItem()
src/CommonGLPI.php:632 CommonGLPI::displayStandardTab()
ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()
[2022-07-05 23:00:06] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::decodeHtmlSpecialCharsRecursive() must be of the type array, string given, called in /var/www/html/glpi-10.0.0/src/Toolbox.php on line 299 in /var/www/html/glpi-10.0.0/src/Toolbox/Sanitizer.php at line 334
Backtrace :
src/Toolbox.php:299 Glpi\Toolbox\Sanitizer::decodeHtmlSpecialCharsRecursive()
.../fusioninventory/inc/deploycommon.class.php:392 Toolbox::unclean_cross_side_scripting_deep()
plugins/fusioninventory/b/deploy/index.php:111 PluginFusioninventoryDeployCommon->run(