fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
362 stars 150 forks source link

Server down with GLPI 9.4.1.1 et FI 9.4.0+1.0 #2789

Closed ppenin closed 5 years ago

ppenin commented 5 years ago

We have an issue with GLPI 9.4.1.1 and Fusion Inventory 9.4.0+1.0 Millions of lines like thoses are written in php-errors.log and the server is stucked. We had to shutdown/restart it and we have disabled Fusion Inventory plugin.

[2019-03-15 14:56:42] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 PHP Warning(2): in_array() expects parameter 2 to be array, null given Backtrace : :
inc/plugin.class.php:710 in_array() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:709 Plugin::getPlugins() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/session.class.php:616 Plugin::getPlugins() inc/includes.php:54 Session::loadLanguage() plugins/fusioninventory/b/deploy/index.php:50 include() {"user":"@s001linux02","mem_usage":"1.256\", 2.35Mio)"} [2019-03-15 14:56:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659
PHP Warning(2): in_array() expects parameter 2 to be array, null given Backtrace : :
inc/plugin.class.php:710 in_array() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:709 Plugin::getPlugins() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:709 Plugin::getPlugins() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:709 Plugin::getPlugins() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:709 Plugin::getPlugins() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/session.class.php:616 Plugin::getPlugins() inc/includes.php:54 Session::loadLanguage() plugins/fusioninventory/index.php:49 include() {"user":"@s001linux02","mem_usage":"2.135\", 2.27Mio)"}

System configuration

GLPI 9.4.1.1 (/glpi => /usr/share/glpi) Installation mode: TARBALL

Server

Operating system: Linux s001linux02 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 PHP 7.0.33-5+ubuntu16.04.1+deb.sury.org+1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bcmath, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="30" memory_limit="1024M" post_max_size="1000M" safe_mode="" session.save_handler="files" upload_max_filesize="1000M" Software: Apache/2.4.18 (Ubuntu) (Apache/2.4.18 (Ubuntu) Server at 10.100.10.18 Port 80) Mozilla/5.0 (Windows NT 6.1; WOW64; rv:65.0) Gecko/20100101 Firefox/65.0 Server Software: (Ubuntu) Server Version: 5.7.25-0ubuntu0.16.04.2 Server SQL Mode: Parameters: root@localhost/glpi Host info: Localhost via UNIX socket

mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed iconv extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed xml extension is installed ldap extension is installed imap extension is installed Zend OPcache extension is installed APCu extension is installed xmlrpc extension is installed exif extension is installed CAS extension is not present Database version seems correct (5.7.25) - Perfect!Database version seems correct (5.7.25) - Perfect! OK/usr/share/glpi/files/_log : OK OK/usr/share/glpi/config : OK OK/usr/share/glpi/files : OK OK/usr/share/glpi/files/_dumps : OK OK/usr/share/glpi/files/_sessions : OK OK/usr/share/glpi/files/_cron : OK OK/usr/share/glpi/files/_graphs : OK OK/usr/share/glpi/files/_lock : OK OK/usr/share/glpi/files/_plugins : OK OK/usr/share/glpi/files/_tmp : OK OK/usr/share/glpi/files/_cache : OK OK/usr/share/glpi/files/_rss : OK OK/usr/share/glpi/files/_uploads : OK OK/usr/share/glpi/files/_pictures : OK Web access to files directory is protectedWeb access to files directory is protected : OK

Libraries

htmLawed version 1.2.4 in (/usr/share/glpi/lib/htmlawed) phpmailer/phpmailer version 6.0.7 in (/usr/share/glpi/vendor/phpmailer/phpmailer/src) simplepie/simplepie version 1.5.2 in (/usr/share/glpi/vendor/simplepie/simplepie/library) tecnickcom/tcpdf version 6.2.26 in (/usr/share/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/usr/share/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/usr/share/glpi/vendor/true/punycode/src) iamcal/lib_autolink in (/usr/share/glpi/vendor/iamcal/lib_autolink) sabre/vobject in (/usr/share/glpi/vendor/sabre/vobject/lib) zendframework/zend-cache in (/usr/share/glpi/vendor/zendframework/zend-cache/src) zendframework/zend-i18n in (/usr/share/glpi/vendor/zendframework/zend-i18n/src) zendframework/zend-serializer in (/usr/share/glpi/vendor/zendframework/zend-serializer/src) monolog/monolog in (/usr/share/glpi/vendor/monolog/monolog/src/Monolog) sebastian/diff in (/usr/share/glpi/vendor/sebastian/diff/src) elvanto/litemoji in (/usr/share/glpi/vendor/elvanto/litemoji/src) symfony/console in (/usr/share/glpi/vendor/symfony/console) leafo/scssphp in (/usr/share/glpi/vendor/leafo/scssphp/src)

LDAP directories

Server: 'x.x.x.x', Port: '389', BaseDN: 'DC=xxxx,DC=priv', Connection filter: none, RootDN: 'CN=xxxxxx,OU=Comptes de Services,OU=xxxx,DC=xxxxx,DC=priv', Use TLS: none

SQL replicas

Not active

Notifications

Way of sending emails: SMTP (xxxxxxxx10.100.10.66)

Mails receivers

Name: 'xxxx@xxxx.fr' Active: Yes Server: '{10.100.10.87/pop/novalidate-cert/notls/debug}INBOX' Login: 'hotline-GLPI' Password: Yes Name: 'support-qgr@groupesaintsauveur.fr' Active: Yes Server: '{10.100.10.87/pop/novalidate-cert/notls/debug}INBOX' Login: 'support-QGR' Password: Yes

Plugins list

barcode              Name: Barcode                        Version: 2.4.0      State: Enabled
fields               Name: Champs supplémentaires         Version: 1.9.1      State: Enabled
timelineticket       Name: Chronologie des tickets        Version: 9.4+1.0    State: Enabled
escalade             Name: Escalades                      Version: 2.4.2      State: Enabled
fusioninventory      Name: FusionInventory                Version: 9.4.0+1.0  State: Not activated
flyvemdm             Name: Gestion d'appareil mobile Flyv Version: 2.0.0      State: To be cleaned
pdf                  Name: Impression pdf                 Version: 1.4.0      State: Not activated
datainjection        Name: Injection de fichiers          Version: 2.7.0      State: Enabled
mailanalyzer         Name: Mail Analyzer                  Version: 1.3.8      State: Enabled
ocsinventoryng       Name: OCS Inventory NG               Version: 1.6.0      State: Enabled
mreporting           Name: Plus de rapports               Version: 1.6.1      State: Enabled
reports              Name: Rapports                       Version: 1.12.0     State: Not activated
dporegister          Name: Registre DPO                   Version: 1.4        State: Not activated
dashboard            Name: Tableau de bord                Version: 0.9.6      State: Enabled

OCS Inventory NG Host: localhost Connection: Ok Use the OCSNG software dictionary: No

cedric-anne commented 5 years ago

Hi,

We made a change in GLPI 9.4.1 to prevent useless DB queries on plugins checks. To makes things simple, Plugin::isActivated() method now checks if the plugin is part of loaded plugins. The problem here is that the FI plugin check if it is active inside the plugin_fusioninventory_check_prerequisites method, which is itself called during plugins loading, so it makes a loop.

   $plugin = new Plugin();
   if ($plugin->isActivated("fusioninventory")
           && !$DB->tableExists("glpi_plugin_fusioninventory_configs")) {
      return false;
   }

Regards

ppenin commented 5 years ago

so, what part of code has to be replaced ?

cedric-anne commented 5 years ago

@ppenin

A fix could be https://github.com/glpi-project/glpi/pull/5611 . Can you check and give your feedback ?

Regards

ppenin commented 5 years ago

The fix did not the trick. Glpi is available when FI plugin is enabled. White page when browsing GLPI

PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/share/glpi/inc/plugin.class.php at line 1726

Fatal error: Uncaught Error: Class 'PluginFusioninventoryConfig' not found in /usr/share/glpi/plugins/fusioninventory/setup.php:228 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(147): plugin_init_fusioninventory() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('fusioninventory') #2 /usr/share/glpi/front/ticket.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/fusioninventory/setup.php on line 228

But php-error.log contains warnings like these below: It's very slow to navigate in GLPI. CPU is increasing image image

[2019-03-15 16:36:56] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 PHP Warning(2): Invalid argument supplied for foreach() Backtrace : inc/session.class.php:616
inc/includes.php:54 Session::loadLanguage() plugins/fusioninventory/index.php:49 include() {"user":"@s001linux02"} [2019-03-15 16:36:57] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659
PHP Warning(2): in_array() expects parameter 2 to be array, null given Backtrace : :
inc/plugin.class.php:1726 in_array() inc/autoload.function.php:295 Plugin::isPluginLoaded() : glpi_autoload() plugins/fusioninventory/setup.php:228 spl_autoload_call() inc/plugin.class.php:147 plugin_init_fusioninventory() inc/includes.php:103 Plugin::load() plugins/fusioninventory/index.php:49 include() {"user":"@s001linux02","mem_usage":"0.208\", 2.20Mio)"} [2019-03-15 16:36:57] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Warning(2): exif_imagetype(_pictures/60/8_5b4854a294560_min.jpg): failed to open stream: No such file or directory Backtrace : :
inc/document.class.php:1545 exif_imagetype() front/document.send.php:72 Document::isImage() {"user":"8@s001linux02"}

cedric-anne commented 5 years ago

I added some commits with more checks on proposed fix. Not sure but I think it can be due to either a problem of cache initialization or a cache corruption.

ppenin commented 5 years ago

I applied these fixes but white page with GLPI.

image

ppenin commented 5 years ago

I exported glpi database, restored a snapshot of the server with GLPI 9.4.0 then restored glpi database and upgraded to 9.4.1.1 The issue seems to be fixed without any fix. CPU is ok now. php-error.log after these tasks :

{"user":"@s001linux02","mem_usage":"0.029\", 2.12Mio)"} [2019-03-16 12:57:22] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Warning(2): in_array() expects parameter 2 to be array, null given Backtrace : inc/toolbox.class.php:676
: Toolbox::userErrorHandlerDebug() inc/plugin.class.php:710 in_array() plugins/fusioninventory/setup.php:549 Plugin->isActivated() inc/plugin.class.php:377 plugin_fusioninventory_check_prerequisites() inc/plugin.class.php:267 Plugin->checkPluginState() inc/plugin.class.php:106 Plugin->checkStates() inc/plugin.class.php:1704 Plugin->init() inc/plugin.class.php:1720 Plugin::getPlugins() inc/autoload.function.php:295 Plugin::isPluginLoaded() : glpi_autoload() : spl_autoload_call() plugins/fusioninventory/front/communication.php:75 class_exists() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02","mem_usage":"0.043\", 2.09Mio)"}

ppenin commented 5 years ago

After reboot, CPU increase drastically This fix works fine : glpi-project/glpi#5611 : (Fix plugin requirements check)

image

cedric-anne commented 5 years ago

Hi @ppenin ,

Just to be sure, the fix also fix runaway of CPU usage ?

Regards

ppenin commented 5 years ago

Yes it does for CPU

But new issues appear now with Fusion Inventory. A new package has been deployed with success client side but logs are incorrect. Only #action 1 is displayed instead of 7 actions

[cid:image001.png@01D4DD76.55C48950]

[cid:image002.png@01D4DD76.55C48950]

cedric-anne commented 5 years ago

Images you send by mail are not visible, can you edit your comment?

ppenin commented 5 years ago

Yes it does for CPU

But new issues appear now with Fusion Inventory. A new package has been deployed with success client side but logs are incorrect. Only #action 1 is displayed instead of 7 actions

and php-errors.log [2019-03-18 10:28:52] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' Backtrace : inc/toolbox.class.php:676
plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02"}

[2019-03-18 10:31:02] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Undefined index: id Backtrace : inc/crontask.class.php:829 PluginFusioninventoryAgentWakeup::cronWakeupAgents() front/cron.php:88 CronTask::launch() {"user":"@s001linux02","mem_usage":"0.002\", 11.10Mio)"} image

image

cedric-anne commented 5 years ago

I only reproduce this problem if plugin is deactivated.

If you are using APCu or Wincache, running a cronjob from CLI prior to applying the fix may have disable Fusin Inventory. This is one of the identified behaviours that should be fixed by #5611.

As you already applied the fix, reactivating the plugin should be sufficient.

ppenin commented 5 years ago

Yes we are using APCU extension Fusion Inventory was enabled but not reachable from Administration Menu. After having disabled/enabled FI plugin, all seems to be ok excepted errors in php-error.logs

2019-03-18 10:28:52] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02"}

[2019-03-18 10:31:02] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Undefined index: id Backtrace : inc/crontask.class.php:829 PluginFusioninventoryAgentWakeup::cronWakeupAgents() front/cron.php:88 CronTask::launch() {"user":"@s001linux02","mem_usage":"0.002", 11.10Mio)"}

cedric-anne commented 5 years ago

These errors were triggered one hour ago and may be due to some unstable state fixed by server restyart, applying https://github.com/glpi-project/glpi/pull/5611 and deactivating/reactivating the plugin.

Can you check later today if new similar log entries have been written ? If no new entry is written, then I think we could consider that the fix is OK.

ppenin commented 5 years ago

I checked php-errors.log at 14:13 and we have these errors every 2 seconds

[2019-03-18 14:12:46] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 PHP Notice(8): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' Backtrace : inc/toolbox.class.php:676
plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02"} [2019-03-18 14:12:47] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659
PHP Notice(8): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' Backtrace : inc/toolbox.class.php:676
plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02"}

cedric-anne commented 5 years ago

I think I got it.

Can you try https://github.com/glpi-project/glpi/pull/5629 ?

Regards

cedric-anne commented 5 years ago

I have another question.

Are you using APCu with multiple GLPI instances sharing the same database but not sharing their files/_cache directory ?

Regards

ppenin commented 5 years ago

We only have one instance of GLPI. regards

ppenin commented 5 years ago

Fix FS cache fallback namespace; fixes #5368 was applied.

Since 16:17 26 times this error

[2019-03-18 16:17:24] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Warning(2): in_array() expects parameter 2 to be array, null given Backtrace : :
inc/plugin.class.php:1727 in_array() inc/rulecollection.class.php:1698 Plugin::isPluginLoaded() inc/rulecollection.class.php:1528 RuleCollection->prepareInputDataForProcessWithPlugins() ...ventory/inc/inventorycomputerlib.class.php:1457 RuleCollection->processAllRules() ...ry/inc/inventorycomputerinventory.class.php:537 PluginFusioninventoryInventoryComputerLib->updateComputer() ...inventory/inc/inventoryruleimport.class.php:769 PluginFusioninventoryInventoryComputerInventory->rulepassed() inc/rule.class.php:1432 PluginFusioninventoryInventoryRuleImport->executeActions() inc/rulecollection.class.php:1539 Rule->process() ...ry/inc/inventorycomputerinventory.class.php:337 RuleCollection->processAllRules() ...ry/inc/inventorycomputerinventory.class.php:102 PluginFusioninventoryInventoryComputerInventory->sendCriteria() ...fusioninventory/inc/communication.class.php:229 PluginFusioninventoryInventoryComputerInventory->import() ...fusioninventory/inc/communication.class.php:461 PluginFusioninventoryCommunication->import() plugins/fusioninventory/front/communication.php:93 PluginFusioninventoryCommunication->handleOCSCommunication() plugins/fusioninventory/index.php:59 include_once() {"user":"4622@s001linux02"}

107 times this error

[2019-03-18 16:22:01] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Warning(2): Invalid argument supplied for foreach() Backtrace : inc/session.class.php:616
inc/includes.php:54 Session::loadLanguage() front/cron.php:38 include() {"user":"@s001linux02"}

cedric-anne commented 5 years ago

@ppenin

First, please excuse me for the inconvenience. As I do not reproduce the issue, it is hard for me to find what is the source of the problem.

I added 3 commit on https://github.com/glpi-project/glpi/pull/5611/commits:

Can you try to apply these 3 commits, then reload your php service to prune APCu cache and empty the files/_cache directory ?

Thanks a lot.

ppenin commented 5 years ago

i applied the 3 fixes and stopped apache service. Then emptied files/_cache directory. After restarting apache service, nothing in php-errors.log excepted for a specific plugin that need to be updated.

[2019-03-18 17:07:44] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Warning(2): Declaration of PluginDporegisterProcessing::showActorsPartForm($ID, $options = Array) should be compatible with CommonITILObject::showActorsPartForm($ID, array $options) Backtrace : inc/autoload.function.php:308
inc/autoload.function.php:308 include_once() : glpi_autoload() inc/html.class.php:1437 spl_autoload_call() inc/html.class.php:6232 Html::generateMenuSession() inc/html.class.php:1541 Html::displayMainMenu() plugins/fusioninventory/front/task.form.php:55 Html::header() {"user":"8@s001linux02"}

ppenin commented 5 years ago

This morning, more than 4000 events in php-errors.log like this one

[2019-03-19 06:14:40] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' Backtrace : inc/toolbox.class.php:676
plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@s001linux02"}

and 200 like this one

[2019-03-19 06:44:02] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Undefined index: id Backtrace : inc/crontask.class.php:829 PluginFusioninventoryAgentWakeup::cronWakeupAgents() front/cron.php:88 CronTask::launch() {"user":"@s001linux02","mem_usage":"0.000\", 11.06Mio)"}

ppenin commented 5 years ago

In front on /glpi/plugins/fusioninventory/front/task.php in debug mode

Fatal error: Uncaught Error: Class 'PluginFusioninventoryMenu' not found in /usr/share/glpi/plugins/fusioninventory/front/task.php:58 Stack trace: #0 {main} thrown in /usr/share/glpi/plugins/fusioninventory/front/task.php on line 58

image

FusionInventory menu disapears event if the plugin is activated. We need to disable/enable it.

Overall behavior is worse than version 9.4.0. There are delays in moving from one menu to another

fralla2 commented 5 years ago

@ppenin : Same errors here even after changing the mispelled variable name and restarting. I have to run a cronjob to delete php-errors.log every 10 minutes because it get filled really quickly by our 4000+ devices that inventory themselves every 4 hours...

*** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 08:34:27] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 08:34:28] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 08:34:32] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"}

ppenin commented 5 years ago

FusionInventory makes GLPI unstable. We need to disable/enable plugin every time a fatal error occurs. Examples below

Fatal error: Uncaught Error: Class 'PluginFusioninventoryIPRange' not found in /usr/share/glpi/plugins/fusioninventory/inc/menu.class.php:146 Stack trace: #0 /usr/share/glpi/inc/commonglpi.class.php(298): PluginFusioninventoryMenu::getAdditionalMenuOptions() #1 /usr/share/glpi/inc/html.class.php(1437): CommonGLPI::getMenuContent() #2 /usr/share/glpi/inc/html.class.php(6232): Html::generateMenuSession(true) #3 /usr/share/glpi/inc/html.class.php(1541): Html::displayMainMenu(true, Array) #4 /usr/share/glpi/plugins/fusioninventory/front/menu.php(51): Html::header('FusionInventory', '/glpi/plugins/f...', 'admin', 'pluginfusioninv...', 'menu') #5 {main} thrown in /usr/share/glpi/plugins/fusioninventory/inc/menu.class.php on line 146

Fatal error: Uncaught Error: Class 'PluginEscaladeConfig' not found in /usr/share/glpi/plugins/escalade/setup.php:54 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(148): plugin_init_escalade() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('escalade') #2 /usr/share/glpi/front/ticket.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/escalade/setup.php on line 54

Fatal error: Uncaught Error: Class 'PluginFusioninventoryConfig' not found in /usr/share/glpi/plugins/fusioninventory/setup.php:228 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(148): plugin_init_fusioninventory() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('fusioninventory') #2 /usr/share/glpi/front/itilsolution.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/fusioninventory/setup.php on line 228

Fatal error: Uncaught Error: Class 'PluginFusioninventoryMenu' not found in /usr/share/glpi/plugins/fusioninventory/front/menu.php:49 Stack trace: #0 {main} thrown in /usr/share/glpi/plugins/fusioninventory/front/menu.php on line 49

ppenin commented 5 years ago

After applying the 8 fixes from #5611, the situation seems to be back to normal. Browsing in GLPI menus gets faster et no more error message in front or in /glpi/files/_log

fralla2 commented 5 years ago

@ppenin : Did you also applied "[fixup] Handle cache corruption" ? This one is marked with a red X instead of a green checkmark...

I'll try the sames fixes this afternoon

Thanks

ppenin commented 5 years ago

yes i did

fralla2 commented 5 years ago

I changer both files (inc/plugin.class.php and inc/session.class.php) for the ones in the 5611 commit but I still get a lot of errors in php-errors.log. I tried disabling and reactivating the plugins but it didn't do the work for me.....

[2019-03-19 13:18:51] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationmailing.class.php:168 Toolbox::logInFile() inc/notification.class.php:460 NotificationMailing->sendNotification() inc/notificationeventabstract.class.php:119 Notification::send() inc/notificationevent.class.php:158 NotificationEventAbstract::raise() inc/commonitilactor.class.php:408 NotificationEvent::raiseEvent() inc/ticket_user.class.php:59 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Ticket_User->post_addItem() inc/commonitilobject.class.php:1504 CommonDBTM->add() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05"} [2019-03-19 13:18:51] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:18:52] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:18:53] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationeventmailing.class.php:302 Toolbox::logInFile() inc/queuednotification.class.php:629 NotificationEventMailing::send() inc/commondbtm.class.php:1477 QueuedNotification::forceSendFor() inc/ticket.class.php:2518 CommonDBTM->update() inc/commonitilactor.class.php:380 Ticket->updateDateMod() inc/ticket_user.class.php:59 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Ticket_User->post_addItem() inc/commonitilobject.class.php:1588 CommonDBTM->add() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"1.461\", 4.80Mio)"} [2019-03-19 13:18:53] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationmailing.class.php:168 Toolbox::logInFile() inc/notification.class.php:460 NotificationMailing->sendNotification() inc/notificationeventabstract.class.php:119 Notification::send() inc/notificationevent.class.php:158 NotificationEventAbstract::raise() inc/commonitilactor.class.php:408 NotificationEvent::raiseEvent() inc/ticket_user.class.php:59 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Ticket_User->post_addItem() inc/commonitilobject.class.php:1588 CommonDBTM->add() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"0.461\", 5.12Mio)"} [2019-03-19 13:18:53] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationmailing.class.php:168 Toolbox::logInFile() inc/notification.class.php:460 NotificationMailing->sendNotification() inc/notificationeventabstract.class.php:119 Notification::send() inc/notificationevent.class.php:158 NotificationEventAbstract::raise() inc/commonitilactor.class.php:408 NotificationEvent::raiseEvent() inc/group_ticket.class.php:66 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Group_Ticket->post_addItem() inc/commonitilobject.class.php:1620 CommonDBTM->add() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"0.251\", 5.13Mio)"} [2019-03-19 13:18:54] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationmailing.class.php:168 Toolbox::logInFile() inc/notification.class.php:460 NotificationMailing->sendNotification() inc/notificationeventabstract.class.php:119 Notification::send() inc/notificationevent.class.php:158 NotificationEventAbstract::raise() inc/commonitilactor.class.php:408 NotificationEvent::raiseEvent() inc/group_ticket.class.php:66 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Group_Ticket->post_addItem() inc/commonitilobject.class.php:1764 CommonDBTM->add() inc/commonitilobject.class.php:1691 CommonITILObject->addAdditionalActors() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"0.292\", 5.14Mio)"} [2019-03-19 13:18:54] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationmailing.class.php:168 Toolbox::logInFile() inc/notification.class.php:460 NotificationMailing->sendNotification() inc/notificationeventabstract.class.php:119 Notification::send() inc/notificationevent.class.php:158 NotificationEventAbstract::raise() inc/commonitilactor.class.php:408 NotificationEvent::raiseEvent() inc/group_ticket.class.php:66 CommonITILActor->post_addItem() inc/commondbtm.class.php:1141 Group_Ticket->post_addItem() inc/commonitilobject.class.php:1764 CommonDBTM->add() inc/commonitilobject.class.php:1691 CommonITILObject->addAdditionalActors() inc/ticket.class.php:2151 CommonITILObject->post_addItem() inc/commondbtm.class.php:1141 Ticket->post_addItem() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"0.117\", 5.14Mio)"} [2019-03-19 13:18:54] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): error_log(/var/www/html/glpi-9.4.1.1/files/_log/mail.log): failed to open stream: Permission denied Backtrace : : inc/toolbox.class.php:588 error_log() inc/notificationeventmailing.class.php:302 Toolbox::logInFile() inc/queuednotification.class.php:629 NotificationEventMailing::send() inc/commondbtm.class.php:1182 QueuedNotification::forceSendFor() front/ticket.form.php:63 CommonDBTM->add() {"user":"141@glpi05","mem_usage":"0.384\", 4.81Mio)"} [2019-03-19 13:18:57] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:18:59] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:05] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:07] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:16] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:17] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:23] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:26] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:27] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:35] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:39] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:45] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:47] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-19 13:19:49] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 *** PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"}

ppenin commented 5 years ago

Did you apply this fix db945f3 ? It fixes a typo problem on a variable.

fralla2 commented 5 years ago

@ppenin I just double-checked the file and yes, I did this fix too this morning

ppenin commented 5 years ago

Even if the situation seems back to normal thank to the last fixes applied, we encounter this kind of error in front Fatal error: Uncaught Error: Class 'PluginFusioninventoryUnmanaged' not found in /usr/share/glpi/inc/html.class.php:1437 Stack trace: #0 /usr/share/glpi/inc/html.class.php(6232): Html::generateMenuSession(true) #1 /usr/share/glpi/inc/html.class.php(1541): Html::displayMainMenu(true, Array) #2 /usr/share/glpi/front/ticket.form.php(204): Html::header('Tickets', '', 'helpdesk', 'ticket') #3 {main} thrown in /usr/share/glpi/inc/html.class.php on line 1437

php-errors.log indicates

019-03-20 08:56:03] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 PHP User Warning(512): Cache footprint file "/usr/share/glpi/files/_cache/glpi_cache_db_9.4.1.1e6c9e72f63e2ff2eb817327ea4df352e.json" contents was invalid, it has been cleaned. Backtrace : :
inc/cache/simplecache.class.php:247 trigger_error() inc/cache/simplecache.class.php:267 Glpi\Cache\SimpleCache->checkFootprintFileIntegrity() inc/cache/simplecache.class.php:178 Glpi\Cache\SimpleCache->getAllCachedFootprints() inc/cache/simplecache.class.php:156 Glpi\Cache\SimpleCache->getCachedFootprint() inc/commondbtm.class.php:172 Glpi\Cache\SimpleCache->has() inc/commondbtm.class.php:197 CommonDBTM::getTablesOf() inc/rule.class.php:97 CommonDBTM::getTable() inc/rulecollection.class.php:190 Rule::getTable() ...inc/inventoryruleimportcollection.class.php:196 RuleCollection->getRuleListCriteria() inc/rulecollection.class.php:1527 PluginFusioninventoryInventoryRuleImportCollection->getCollectionDatas() ...ventory/inc/inventorycomputerlib.class.php:1550 RuleCollection->processAllRules() ...ry/inc/inventorycomputerinventory.class.php:537 PluginFusioninventoryInventoryComputerLib->updateComputer() ...inventory/inc/inventoryruleimport.class.php:769 PluginFusioninventoryInventoryComputerInventory->rulepassed() inc/rule.class.php:1432 PluginFusioninventoryInventoryRuleImport->executeActions() inc/rulecollection.class.php:1539 Rule->process() ...ry/inc/inventorycomputerinventory.class.php:337 RuleCollection->processAllRules() ...ry/inc/inventorycomputerinventory.class.php:102 PluginFusioninventoryInventoryComputerInventory->sendCriteria() ...fusioninventory/inc/communication.class.php:229 PluginFusioninventoryInventoryComputerInventory->import() ...fusioninventory/inc/communication.class.php:461 PluginFusioninventoryCommunication->import() plugins/fusioninventory/front/communication.php:93 PluginFusioninventoryCommunication->handleOCSCommunication() plugins/fusioninventory/index.php:59 include_once() {"user":"4622@s001linux02"} [2019-03-20 09:05:21] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659
PHP Notice(8): Undefined index: metacriteria Backtrace : ...s/fusioninventory/front/deploygroup.form.php:72 {"user":"8@s001linux02"} [2019-03-20 09:19:34] glpiphplog.DEBUG: Html::compileScss() in /usr/share/glpi/inc/html.class.php line 6733 css/styles is new, loading {"user":"8@s001linux02"} [2019-03-20 09:19:34] glpiphplog.DEBUG: Html::compileScss() in /usr/share/glpi/inc/html.class.php line 6733 css/palettes/auror is new, loading {"user":"8@s001linux02","mem_usage":"0.000\", 1.72Mio)"} [2019-03-20 09:20:03] glpiphplog.DEBUG: Html::compileScss() in /usr/share/glpi/inc/html.class.php line 6733 css/styles is new, loading {"user":"8@s001linux02"} [2019-03-20 09:20:03] glpiphplog.DEBUG: Html::compileScss() in /usr/share/glpi/inc/html.class.php line 6733 css/palettes/auror is new, loading {"user":"8@s001linux02","mem_usage":"0.000\", 1.72Mio)"}

fralla2 commented 5 years ago

The "Fix CS" commit from 19 hours ago in https://github.com/glpi-project/glpi/pull/5611 did the trick for me. No more endless errors in logs

fralla2 commented 5 years ago

I was a little too quick to celebrate... I don't get fusioninventory errors in the php-errors.log but the plugins' page still get HTTP ERROR 500 every few seconds.... just like before when the plugins got disabled and re-enabled constantly by GLPI...

fralla2 commented 5 years ago

Had to disable temporarily the fusioninventory plugins and now I get the same errors again in php-errors.log

fralla2 commented 5 years ago

Not sure if it's related but I also get this error when the plugins is activated (and user 928 is Plugin_FusionInventory) :

glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"46.813\", 5.99Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.001\", 6.00Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.002\", 6.00Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.001\", 6.00Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.001\", 6.00Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.210\", 6.02Mio)"} [2019-03-20 12:08:35] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.001\", 6.02Mio)"} [2019-03-20 12:08:36] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.200\", 6.03Mio)"} [2019-03-20 12:08:36] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.588\", 6.09Mio)"} [2019-03-20 12:08:36] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.001\", 6.09Mio)"} [2019-03-20 12:08:36] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.270\", 6.16Mio)"} [2019-03-20 12:08:36] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.052\", 6.16Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.403\", 6.10Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.313\", 6.07Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 5 found! {"user":"928@glpi05","mem_usage":"0.003\", 6.08Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.143\", 6.09Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.003\", 6.09Mio)"} [2019-03-20 12:08:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.218\", 6.09Mio)"} [2019-03-20 12:08:38] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 4 found! {"user":"928@glpi05","mem_usage":"0.003\", 6.09Mio)"} [2019-03-20 12:08:38] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05","mem_usage":"0.235\", 6.09Mio)"} [2019-03-20 12:08:38] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05","mem_usage":"0.003\", 6.09Mio)"} [2019-03-20 12:08:40] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05","mem_usage":"2.754\", 6.10Mio)"} [2019-03-20 12:08:41] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05","mem_usage":"0.011\", 6.10Mio)"}

ppenin commented 5 years ago

i disabled APCu extension and CAS extension and restarted apache service. For an hour, i don't have any error in php-errors.log excepted this one [2019-03-20 17:51:29] glpiphplog.DEBUG: Html::compileScss() in /usr/share/glpi/inc/html.class.php line 6733 css/palettes/auror is new, loading {"user":"8@s001linux02","mem_usage":"0.001\", 6.70Mio)"} [2019-03-20 17:51:40] glpiphplog.WARNING: Test logger

ppenin commented 5 years ago

With APCu and Zend OPcache extensions disabled we still have fatal error like these below. It seems to be linked with high CPU. GLPI hangs a lot.

Fatal error: Uncaught Error: Class 'PluginFusioninventoryIPRange' not found in /usr/share/glpi/plugins/fusioninventory/inc/menu.class.php:146 Stack trace: #0 /usr/share/glpi/inc/commonglpi.class.php(298): PluginFusioninventoryMenu::getAdditionalMenuOptions() #1 /usr/share/glpi/inc/html.class.php(1437): CommonGLPI::getMenuContent() #2 /usr/share/glpi/inc/html.class.php(6232): Html::generateMenuSession(true) #3 /usr/share/glpi/inc/html.class.php(1541): Html::displayMainMenu(true, Array) #4 /usr/share/glpi/plugins/fusioninventory/front/menu.php(51): Html::header('FusionInventory', '/glpi/plugins/f...', 'admin', 'pluginfusioninv...', 'menu') #5 {main} thrown in /usr/share/glpi/plugins/fusioninventory/inc/menu.class.php on line 146

Fatal error: Uncaught Error: Class 'PluginEscaladeConfig' not found in /usr/share/glpi/plugins/escalade/setup.php:54 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(148): plugin_init_escalade() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('escalade') #2 /usr/share/glpi/front/ticket.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/escalade/setup.php on line 54

Fatal error: Uncaught Error: Class 'PluginFusioninventoryConfig' not found in /usr/share/glpi/plugins/fusioninventory/setup.php:228 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(148): plugin_init_fusioninventory() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('fusioninventory') #2 /usr/share/glpi/front/itilsolution.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/fusioninventory/setup.php on line 228

Fatal error: Uncaught Error: Class 'PluginFusioninventoryMenu' not found in /usr/share/glpi/plugins/fusioninventory/front/menu.php:49 Stack trace: #0 {main} thrown in /usr/share/glpi/plugins/fusioninventory/front/menu.php on line 49

Fatal error: Uncaught Error: Class 'PluginFusioninventoryConfig' not found in /usr/share/glpi/plugins/fusioninventory/setup.php:228 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(148): plugin_init_fusioninventory() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('fusioninventory') #2 /usr/share/glpi/front/itilfollowup.form.php(35): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/fusioninventory/setup.php on line 228

Fatal error: Uncaught Error: Class 'PluginFieldsContainer' not found in /usr/share/glpi/plugins/fields/setup.php:112 Stack trace: #0 /usr/share/glpi/inc/plugin.class.php(157): plugin_init_fields() #1 /usr/share/glpi/inc/includes.php(103): Plugin::load('fields') #2 /usr/share/glpi/plugins/fusioninventory/front/task.form.php(47): include('/usr/share/glpi...') #3 {main} thrown in /usr/share/glpi/plugins/fields/setup.php on line 112

Fatal error: Uncaught Error: Class 'PluginOcsinventoryngMenu' not found in /usr/share/glpi/inc/html.class.php:1437 Stack trace: #0 /usr/share/glpi/inc/html.class.php(6232): Html::generateMenuSession(true) #1 /usr/share/glpi/inc/html.class.php(1541): Html::displayMainMenu(true, Array) #2 /usr/share/glpi/plugins/fusioninventory/front/task.form.php(55): Html::header('FusionInventory', '/glpi/plugins/f...', 'admin', 'pluginfusioninv...', 'task') #3 {main} thrown in /usr/share/glpi/inc/html.class.php on line 1437

Fatal error: Uncaught Error: Class 'PluginOcsinventoryngMonitor' not found in /usr/share/glpi/plugins/ocsinventoryng/inc/ocsprocess.class.php:1252 Stack trace: #0 /usr/share/glpi/plugins/ocsinventoryng/front/ocsng.sync.php(52): PluginOcsinventoryngOcsProcess::synchronizeComputer(Array) #1 {main} thrown in /usr/share/glpi/plugins/ocsinventoryng/inc/ocsprocess.class.php on line 1252

Fatal error: Uncaught Error: Class 'PluginOcsinventoryngMenu' not found in /usr/share/glpi/inc/html.class.php:1437 Stack trace: #0 /usr/share/glpi/inc/html.class.php(6232): Html::generateMenuSession(true) #1 /usr/share/glpi/inc/html.class.php(1541): Html::displayMainMenu(true, Array) #2 /usr/share/glpi/plugins/fusioninventory/front/task.php(54): Html::header('FusionInventory', '/glpi/plugins/f...', 'admin', 'pluginfusioninv...', 'task') #3 {main} thrown in /usr/share/glpi/inc/html.class.php on line 1437

fralla2 commented 5 years ago

Even with the addon disabled in the interface, the FusionInventory errors in the php-errors.log keep happening many times a second and just like @ppenin that causes GLPI to hang a lot (sometimes 20-30 seconds before a page load) because of high cpu usage...

[2019-03-21 08:36:40] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-21 08:36:46] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-21 08:36:51] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"} [2019-03-21 08:36:57] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi-9.4.1.1/inc/toolbox.class.php line 659 PHP Warning(2): Use of undefined constant PLUGIN_FUSIONINVENTORY_VERSION - assumed 'PLUGIN_FUSIONINVENTORY_VERSION' (this will throw an Error in a future version of PHP) Backtrace : inc/toolbox.class.php:676 plugins/fusioninventory/front/communication.php:73 Toolbox::userErrorHandlerDebug() plugins/fusioninventory/index.php:59 include_once() {"user":"@glpi05"}

ppenin commented 5 years ago

GLPI 9.4.1.1 and Fusioninventory 9.4.0+1.0 don't match obviously with or without cache enabled. No idea what to do to solve this issue. Maybe restore a backup in 9.4.0. But time has passed and lots of tickets too...

cedric-anne commented 5 years ago

Hi,

Sorry for the late. I was not able to access a real testing environment to test my fixes.

So it looks like you had many problems at the same time, each one affecting a different element.

What I can propose to you is:

  1. put back initial state of 9.4.1.1 code (for GLPI only, do not touch your plugins)
  2. apply https://github.com/glpi-project/glpi/commit/6f4e34f55e21b107b35816476ac079a5d944e44c
  3. apply https://github.com/glpi-project/glpi/commit/86954b8dec809ae42a32378160546717af5ad13b
  4. apply https://github.com/glpi-project/glpi/pull/5611/commits/47948b850af372eb445524601f32ec4299cb8710
  5. apply https://github.com/glpi-project/glpi/pull/5645/commits/6e02b6e8cd6709e8ccfd8bf19f9d52e3a89c3b70
  6. clear cache directory (and clear APCu cache is active)

I really hope it will fix this plugin state instability.

Regards

EDIT: Applying patch may fail on test/* files, it is not important, thoose files are only for automatic testing purpose.

fralla2 commented 5 years ago

@cedric-anne I will try the different fixes at the beginning of the afternoon today. For APCu cache, how do I clear it and should I keep it active or disable it? If so, how?

Thanks

ppenin commented 5 years ago

Thank you for those fixes. I will try my side too and will give you a feedback

cedric-anne commented 5 years ago

For APCu, just restart PHP service (or Apache if you run PHP as Apache module).

You should keep it active, the fixes should work with it.

fralla2 commented 5 years ago

Just applied the fixes and restarted httpd services. Now the php-errors.log only shows these kind of errors (about 1 every 2 seconds or so) for the moment but GLPI is barely responsive and shows this message quite often :

Could it be that all the computers in our network that didn't get inventoried since a day or 2 now all tries to pool fusioninventory to do the update at the same time???

getFromDBByCrit expects to get one result, 2 found! {"user":"928@glpi05"} [2019-03-21 12:46:27] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 3 found! {"user":"928@glpi05"} [2019-03-21 12:46:34] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378 getFromDBByCrit expects to get one result, 2 found! {"user":"928@glpi05"} [2019-03-21 12:46:37] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi-9.4.1.1/inc/commondbtm.class.php line 378

**A link to the SQL server could not be established. Please check your configuration.

Le serveur Mysql est inaccessible. Vérifiez votre configuration GLPI 9.4.1.1 Copyright (C) 2015-2019 Teclib' and contributors**

top - 12:43:21 up 14 days, 2:43, 2 users, load average: 68.11, 45.90, 20.75 Tasks: 196 total, 1 running, 195 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.0 us, 5.1 sy, 0.0 ni, 87.6 id, 6.3 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 8388608 total, 4909552 free, 2033400 used, 1445656 buff/cache KiB Swap: 8388608 total, 8168624 free, 219984 used. 6074629 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 472 mysql 20 0 9206540 641660 8156 S 4.7 7.6 786:37.59 mysqld 14958 apache 20 0 785216 38568 23668 D 1.0 0.5 0:03.71 httpd 14978 apache 20 0 784012 32544 17720 S 1.0 0.4 0:14.91 httpd 15020 apache 20 0 784068 24928 12160 D 1.0 0.3 0:02.62 httpd 15043 apache 20 0 784052 27408 13036 D 1.0 0.3 0:02.80 httpd 15068 apache 20 0 784036 26604 13080 D 1.0 0.3 0:02.67 httpd 15097 apache 20 0 784040 24976 12156 D 1.0 0.3 0:02.68 httpd 15101 apache 20 0 784084 25084 12224 D 1.0 0.3 0:02.74 httpd 15129 apache 20 0 783952 25516 12480 D 1.0 0.3 0:02.60 httpd 15134 apache 20 0 784032 26224 12596 D 1.0 0.3 0:02.68 httpd 15183 apache 20 0 784156 26536 12688 S 1.0 0.3 0:02.71 httpd 15232 apache 20 0 783920 27940 13536 S 1.0 0.3 0:02.77 httpd 15242 apache 20 0 781752 24676 12284 D 1.0 0.3 0:02.54 httpd 15244 apache 20 0 781988 23980 11612 S 1.0 0.3 0:02.31 httpd 15272 apache 20 0 782016 24288 11876 D 1.0 0.3 0:01.85 httpd 15273 apache 20 0 785136 27372 11808 D 1.0 0.3 0:01.92 httpd 15282 apache 20 0 784032 24364 11572 D 1.0 0.3 0:01.80 httpd 15317 apache 20 0 781976 23928 11392 S 1.0 0.3 0:01.51 httpd 15318 apache 20 0 781844 23972 11568 S 1.0 0.3 0:01.56 httpd 15322 apache 20 0 782004 23728 11344 D 1.0 0.3 0:01.49 httpd 15354 apache 20 0 782004 23772 11308 D 1.0 0.3 0:01.36 httpd 15448 apache 20 0 780844 19352 9560 S 1.0 0.2 0:00.08 httpd 14956 apache 20 0 781988 35784 23716 D 0.7 0.4 0:04.69 httpd 14959 apache 20 0 784144 32948 19492 D 0.7 0.4 0:03.60 httpd 14960 apache 20 0 785992 44620 29312 S 0.7 0.5 0:05.44 httpd 14979 apache 20 0 786136 30624 15152 D 0.7 0.4 0:03.75 httpd 15000 apache 20 0 780976 21764 11596 D 0.7 0.3 0:02.29 httpd 15003 apache 20 0 784040 26620 13076 D 0.7 0.3 0:02.78 httpd 15008 apache 20 0 783892 28120 13748 S 0.7 0.3 0:02.93 httpd

ppenin commented 5 years ago

After applying the fixes and delete the cache, GLPI responds faster even without Apcu and Zend OPcache extensions. I have errors in php-errors.log but it has nothing to do with the previous problem. I continue the tests

[2019-03-21 18:00:25] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /usr/share/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Undefined index: samaccountname Backtrace : inc/authldap.class.php:3712
inc/authldap.class.php:1677 AuthLDAP::getFieldValue() inc/authldap.class.php:1797 AuthLDAP::searchForUsers() inc/authldap.class.php:3826 AuthLDAP::getAllUsers() inc/authldap.class.php:1501 AuthLDAP::getUsers() inc/authldap.class.php:3379 AuthLDAP::showLdapUsers() front/ldap.import.php:66 AuthLDAP::searchUser() {"user":"8@s001linux02","mem_usage":"0.000\", 18.33Mio)"}

fralla2 commented 5 years ago

I will restart the plugins after we're close and let it go all night to see if it finally catches-up..... For the moment it just hang the httpd.service and mysqld and GLPI becomes unresponsive....

Looks like too many connexions from the fusioninventory clients on all our network computers...

Thanks

ppenin commented 5 years ago

Apcu and Zend OPcache extensions enabled. No more errors in php-errors.log. Glpi is fast again. Thank's for all the fixes.

cedric-anne commented 5 years ago

Thanks for the feedback and apologies for this mess.

For MySQL overload, I cannot help as it depends a lot on your configuration and the complexity of your network infrastructure.

My fixes are for GLPI core and are only related to plugins and cache problems. You should open new issues for other problems you may encounter, as it may have nothing to do with this.