glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.18k stars 1.28k forks source link

GLPI goes blank after long time use #11637

Closed Serpher1 closed 2 years ago

Serpher1 commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.0

Bug description

If a user won't log out for a long time he will get the blank page. Clearing all cache and cookies helps but only temporarily. After clearing there's an error message saying: "Invalid use of Session ID"

Relevant log output

php-errors.log

[2022-05-19 12:05:09] glpiphplog.WARNING:   *** PHP User Warning (512): Nieudane połączenie. Jeśli używasz proxy to sprawdź jego konfiguracje. (Resolving timed out after 5000 milliseconds) in /var/www/html/src/Toolbox.php at line 1424
  Backtrace :
  src/Toolbox.php:1424                               trigger_error()
  src/GLPINetwork.php:221                            Toolbox::callCurl()
  src/GLPINetwork.php:265                            GLPINetwork::getRegistrationInformations()
  src/Marketplace/Controller.php:330                 GLPINetwork::isRegistered()
  src/CronTask.php:1016                              Glpi\Marketplace\Controller::cronCheckAllUpdates()
  front/cron.php:82                                  CronTask::launch()

[2022-05-19 12:05:09] glpiphplog.WARNING:   *** PHP User Warning (512): Unable to fetch registration information.
Error message:Nieudane połączenie. Jeśli używasz proxy to sprawdź jego konfiguracje. (Resolving timed out after 5000 milliseconds)
Response:
 in /var/www/html/src/GLPINetwork.php at line 235
  Backtrace :
  src/GLPINetwork.php:235                            trigger_error()
  src/GLPINetwork.php:265                            GLPINetwork::getRegistrationInformations()
  src/Marketplace/Controller.php:330                 GLPINetwork::isRegistered()
  src/CronTask.php:1016                              Glpi\Marketplace\Controller::cronCheckAllUpdates()
  front/cron.php:82                                  CronTask::launch()

[2022-05-20 05:00:01] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/5c/74bdc87ecd51463fa4771dc00667fea7ba18c3.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()

[2022-05-20 05:00:01] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/d5/f67ea1ec92f703a6643551b6563c823e29e631.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()

Page URL

No response

Steps To reproduce

Don't log out

Your GLPI setup information

Informacje o instalacji i konfiguracji systemu
GLPI 10.0.0 ( => /var/www/html)
Installation mode: TARBALL
Current language:pl_PL

Server
 
Operating system: Linux helpdesk 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
PHP 7.4.28 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bz2,
    calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap, libxml, mbstring,
    mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem,
    sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="2M" 
Software: Apache/2.4.53 (Debian) (Apache/2.4.53 (Debian) Server at helpdesk.domain.pl Port 443
)
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Server Software: Debian 11
    Server Version: 10.5.15-MariaDB-0+deb11u1
    Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Parameters: glpi@localhost/helpdesk
    Host info: Localhost via UNIX socket

PHP version (7.4.28) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, json, simplexml.
curl extension is installed.
gd extension is installed.
intl extension is installed.
libxml extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.5.15) is supported.
The log file could not be created in /var/www/html/files/_log.
Write access to /var/www/html/files/_cache has been validated.
Write access to /var/www/html/config has been validated.
Write access to /var/www/html/files/_cron has been validated.
Write access to /var/www/html/files has been validated.
Write access to /var/www/html/files/_dumps has been validated.
Write access to /var/www/html/files/_graphs has been validated.
Write access to /var/www/html/files/_lock has been validated.
Write access to /var/www/html/files/_pictures has been validated.
Write access to /var/www/html/files/_plugins has been validated.
Write access to /var/www/html/files/_rss has been validated.
Write access to /var/www/html/files/_sessions has been validated.
Write access to /var/www/html/files/_tmp has been validated.
Write access to /var/www/html/files/_uploads has been validated.
Web access to the files directory should not be allowed
Check the .htaccess file and the web server configuration.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
zip extension is installed.
bz2 extension is installed.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/html/marketplace has been validated.
Access to timezone database (mysql) is not allowed.

GLPI constants
 
GLPI_ROOT: /var/www/html
GLPI_CONFIG_DIR: /var/www/html/config
GLPI_VAR_DIR: /var/www/html/files
GLPI_MARKETPLACE_DIR: /var/www/html/marketplace
GLPI_USE_CSRF_CHECK: 1
GLPI_CSRF_EXPIRES: 7200
GLPI_CSRF_MAX_TOKENS: 100
GLPI_USE_IDOR_CHECK: 1
GLPI_IDOR_EXPIRES: 7200
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: 
GLPI_TELEMETRY_URI: https://telemetry.glpi-project.org
GLPI_INSTALL_MODE: TARBALL
GLPI_NETWORK_MAIL: glpi@teclib.com
GLPI_NETWORK_SERVICES: https://services.glpi-network.com
GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1
GLPI_USER_AGENT_EXTRA_COMMENTS: 
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: 1
GLPI_AJAX_DASHBOARD: 1
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: 0
GLPI_CENTRAL_WARNINGS: 1
GLPI_DOC_DIR: /var/www/html/files
GLPI_CACHE_DIR: /var/www/html/files/_cache
GLPI_CRON_DIR: /var/www/html/files/_cron
GLPI_DUMP_DIR: /var/www/html/files/_dumps
GLPI_GRAPH_DIR: /var/www/html/files/_graphs
GLPI_LOCAL_I18N_DIR: /var/www/html/files/_locales
GLPI_LOCK_DIR: /var/www/html/files/_lock
GLPI_LOG_DIR: /var/www/html/files/_log
GLPI_PICTURE_DIR: /var/www/html/files/_pictures
GLPI_PLUGIN_DOC_DIR: /var/www/html/files/_plugins
GLPI_RSS_DIR: /var/www/html/files/_rss
GLPI_SESSION_DIR: /var/www/html/files/_sessions
GLPI_TMP_DIR: /var/www/html/files/_tmp
GLPI_UPLOAD_DIR: /var/www/html/files/_uploads
GLPI_INVENTORY_DIR: /var/www/html/files/_inventories
GLPI_NETWORK_REGISTRATION_API_URL: https://services.glpi-network.com/api/registration/
GLPI_MARKETPLACE_PLUGINS_API_URI: https://services.glpi-network.com/api/glpi-plugins/
GLPI_I18N_DIR: /var/www/html/locales
GLPI_VERSION: 10.0.0
GLPI_SCHEMA_VERSION: 10.0.0@9eb698d8fd49f9256d7bd63a6d747587e0effaff
GLPI_MARKETPLACE_PRERELEASES: 
GLPI_MIN_PHP: 7.4.0
GLPI_MAX_PHP: 8.2.0
GLPI_YEAR: 2022

Libraries
 
htmlawed/htmlawed version 1.2.6 in (/var/www/html/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.6.0 in (/var/www/html/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.8 in (/var/www/html/vendor/simplepie/simplepie/library)
mpdf/mpdf in (/var/www/html/vendor/mpdf/mpdf/src)
michelf/php-markdown in (/var/www/html/vendor/michelf/php-markdown/Michelf)
true/punycode in (/var/www/html/vendor/true/punycode/src)
iamcal/lib_autolink in (/var/www/html/vendor/iamcal/lib_autolink)
sabre/dav in (/var/www/html/vendor/sabre/dav/lib/DAV)
sabre/http in (/var/www/html/vendor/sabre/http/lib)
sabre/uri in (/var/www/html/vendor/sabre/uri/lib)
sabre/vobject in (/var/www/html/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/var/www/html/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/var/www/html/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/var/www/html/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/var/www/html/vendor/sebastian/diff/src)
donatj/phpuseragentparser in (/var/www/html/vendor/donatj/phpuseragentparser/src/UserAgent)
elvanto/litemoji in (/var/www/html/vendor/elvanto/litemoji/src)
symfony/console in (/var/www/html/vendor/symfony/console)
scssphp/scssphp in (/var/www/html/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/var/www/html/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/var/www/html/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/var/www/html/vendor/rlanvin/php-rrule/src)
blueimp/jquery-file-upload in (/var/www/html/vendor/blueimp/jquery-file-upload/server/php)
ramsey/uuid in (/var/www/html/vendor/ramsey/uuid/src)
psr/log in (/var/www/html/vendor/psr/log/Psr/Log)
psr/simple-cache in (/var/www/html/vendor/psr/simple-cache/src)
psr/cache in (/var/www/html/vendor/psr/cache/src)
league/csv in (/var/www/html/vendor/league/csv/src)
mexitek/phpcolors in (/var/www/html/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/var/www/html/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/var/www/html/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/var/www/html/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/var/www/html/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/var/www/html/vendor/paragonie/sodium_compat/src)
symfony/cache in (/var/www/html/vendor/symfony/cache)
html2text/html2text in (/var/www/html/vendor/html2text/html2text/src)
symfony/dom-crawler in (/var/www/html/vendor/symfony/dom-crawler)
twig/twig in (/var/www/html/vendor/twig/twig/src)
twig/string-extra in (/var/www/html/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 in (/var/www/html/vendor/symfony/polyfill-php80)
symfony/polyfill-php81 in (/var/www/html/vendor/symfony/polyfill-php81)

LDAP directories
 

SQL replicas
 
Not active

Notifications
 
Way of sending emails: SMTP (helpdesk@domain.pl@domain.pl)

Plugins list
 
    addressing           Name: Adresowanie IP                 Version: 3.0.0      State: Enabled
    glpiinventory        Name: GLPI Inventory                 Version: 1.0.0      State: Enabled
    ocsinventoryng       Name: OCS Inventory NG               Version: 2.0.0      State: Enabled

Anything else?

No response

DeltatecAS commented 2 years ago

I have the same problem.

I know is the plugin Notifications.

Serpher1 commented 2 years ago

An external plugin called Notification? Or built-in notifications?

DeltatecAS commented 2 years ago

The plugin called Notification.

I delete the plugin and all is ok.

The plugin is not create for GLPI V10

Serpher1 commented 2 years ago

Well I don't have an external plugin called like that and I can't remove the built-in one.

DeltatecAS commented 2 years ago

Ok, excuse me.

Your right is not good on : /var/www/html/src

Serpher1 commented 2 years ago

Another after blank page - php-errors.log

[2022-05-24 12:05:09] glpiphplog.CRITICAL:   *** Uncaught Exception GuzzleHttp\Exception\ConnectException: cURL error 28: Resolving timed out after 5000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://services.glpi-network.com/api/glpi-plugins/plugins in /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php at line 210
  Backtrace :
  ...zzlehttp/guzzle/src/Handler/CurlFactory.php:158 GuzzleHttp\Handler\CurlFactory::createRejection()
  ...zzlehttp/guzzle/src/Handler/CurlFactory.php:110 GuzzleHttp\Handler\CurlFactory::finishError()
  ...uzzlehttp/guzzle/src/Handler/CurlHandler.php:47 GuzzleHttp\Handler\CurlFactory::finish()
  vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:28  GuzzleHttp\Handler\CurlHandler->__invoke()
  vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:48  GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
  ...zlehttp/guzzle/src/PrepareBodyMiddleware.php:35 GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
  vendor/guzzlehttp/guzzle/src/Middleware.php:31     GuzzleHttp\PrepareBodyMiddleware->__invoke()
  ...guzzlehttp/guzzle/src/RedirectMiddleware.php:71 GuzzleHttp\Middleware::GuzzleHttp\{closure}()
  vendor/guzzlehttp/guzzle/src/Middleware.php:63     GuzzleHttp\RedirectMiddleware->__invoke()
  vendor/guzzlehttp/guzzle/src/HandlerStack.php:75   GuzzleHttp\Middleware::GuzzleHttp\{closure}()
  vendor/guzzlehttp/guzzle/src/Client.php:331        GuzzleHttp\HandlerStack->__invoke()
  vendor/guzzlehttp/guzzle/src/Client.php:168        GuzzleHttp\Client->transfer()
  vendor/guzzlehttp/guzzle/src/Client.php:187        GuzzleHttp\Client->requestAsync()
  src/Marketplace/Api/Plugins.php:121                GuzzleHttp\Client->request()
  src/Marketplace/Api/Plugins.php:166                Glpi\Marketplace\Api\Plugins->request()
  src/Marketplace/Api/Plugins.php:211                Glpi\Marketplace\Api\Plugins->getPaginatedCollection()
  src/Marketplace/Api/Plugins.php:346                Glpi\Marketplace\Api\Plugins->getAllPlugins()
  src/Marketplace/Controller.php:269                 Glpi\Marketplace\Api\Plugins->getPlugin()
  src/Marketplace/Controller.php:302                 Glpi\Marketplace\Controller->checkUpdate()
  src/Marketplace/Controller.php:334                 Glpi\Marketplace\Controller::getAllUpdates()
  src/CronTask.php:1016                              Glpi\Marketplace\Controller::cronCheckAllUpdates()
  front/cron.php:82                                  CronTask::launch()

[2022-05-25 05:00:02] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/5c/74bdc87ecd51463fa4771dc00667fea7ba18c3.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()

[2022-05-25 05:00:02] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/d5/f67ea1ec92f703a6643551b6563c823e29e631.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()
Serpher1 commented 2 years ago

after last blank screen php-errors.log

[2022-05-25 12:05:08] glpiphplog.WARNING:   *** PHP User Warning (512): Nieudane połączenie. Jeśli używasz proxy to sprawdź jego konfiguracje. (Resolving timed out after 5000 milliseconds) in /var/www/html/src/Toolbox.php at line 1424
  Backtrace :
  src/Toolbox.php:1424                               trigger_error()
  src/GLPINetwork.php:221                            Toolbox::callCurl()
  src/GLPINetwork.php:265                            GLPINetwork::getRegistrationInformations()
  src/Marketplace/Controller.php:330                 GLPINetwork::isRegistered()
  src/CronTask.php:1016                              Glpi\Marketplace\Controller::cronCheckAllUpdates()
  front/cron.php:82                                  CronTask::launch()

[2022-05-25 12:05:08] glpiphplog.WARNING:   *** PHP User Warning (512): Unable to fetch registration information.
Error message:Nieudane połączenie. Jeśli używasz proxy to sprawdź jego konfiguracje. (Resolving timed out after 5000 milliseconds)
Response:
 in /var/www/html/src/GLPINetwork.php at line 235
  Backtrace :
  src/GLPINetwork.php:235                            trigger_error()
  src/GLPINetwork.php:265                            GLPINetwork::getRegistrationInformations()
  src/Marketplace/Controller.php:330                 GLPINetwork::isRegistered()
  src/CronTask.php:1016                              Glpi\Marketplace\Controller::cronCheckAllUpdates()
  front/cron.php:82                                  CronTask::launch()

[2022-05-26 05:00:02] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/5c/74bdc87ecd51463fa4771dc00667fea7ba18c3.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()

[2022-05-26 05:00:02] glpiphplog.WARNING:   *** PHP Warning (2): getimagesize(/var/www/html/files/PNG/d5/f67ea1ec92f703a6643551b6563c823e29e631.PNG): failed to open stream: No such file or directory in /var/www/html/src/Document.php at line 1766
  Backtrace :
  src/Document.php:1766                              getimagesize()
  src/NotificationEventMailing.php:282               Document::getImage()
  src/QueuedNotification.php:600                     NotificationEventMailing::send()
  src/CronTask.php:1016                              QueuedNotification::cronQueuedNotification()
  front/cron.php:82                                  CronTask::launch()

FYI server has Internet connection, I can ping websites.

cedric-anne commented 2 years ago

Hi,

All your issues are related to GLPI automated actions. Have you configured a server side crontab, or are you using the GLPI mode for your GLPI automated actions ?

When using the GLPI mode, tasks are ran periodically when users are using GLPI, and it may cause slowness during navigation. You should try to configure a server-side crontask and use CLI mode for all your automatic actions.

Serpher1 commented 2 years ago

@cedric-anne Automated actions are set to CLI and crontab looks like this:

* * * * * /usr/bin/php7.4 /var/www/html/front/cron.php &> /dev/null

cedric-anne commented 2 years ago

If all your automated tasks are executed in CLI mode, then I have no idea what could be causing slowness.

Serpher1 commented 2 years ago

@cedric-anne It isn't slowness. It's just when people are not logging out, then after some time GLPI will go blank and only clearing cookies helps.

Recent apache error.log

[Wed Jun 01 00:00:02.507979 2022] [mpm_prefork:notice] [pid 65868] AH00163: Apache/2.4.53 (Debian) OpenSSL/1.1.1n mod_perl/2.0.11 Perl/v5.32.1 configured -- resuming normal operations
[Wed Jun 01 00:00:02.508003 2022] [core:notice] [pid 65868] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jun 01 05:34:11.087136 2022] [php7:notice] [pid 71169] [client 192.168.1.50:50168] PHP Notice:  Undefined index: ocsservers_id in /var/www/html/marketplace/ocsinventoryng/hook.php on line 1348
[Wed Jun 01 05:34:11.087226 2022] [php7:notice] [pid 71169] [client 192.168.1.50:50168] PHP Notice:  Undefined index: id in /var/www/html/marketplace/ocsinventoryng/hook.php on line 1360
[Wed Jun 01 05:34:11.100167 2022] [php7:error] [pid 71169] [client 192.168.1.50:50168] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception Error: Call to a member function getOcsComputer() on null in /var/www/html/marketplace/ocsinventoryng/hook.php at line 1369\n  Backtrace :\n  src/Plugin.php:1530                                plugin_ocsinventoryng_ruleCollectionPrepareInputDataForProcess()\n  src/RuleCollection.php:1770                        Plugin::doOneHook()\n  src/RuleCollection.php:1577                        RuleCollection->prepareInputDataForProcessWithPlugins()\n  src/Inventory/Asset/MainAsset.php:499              RuleCollection->processAllRules()\n  src/Inventory/Inventory.php:678                    Glpi\\Inventory\\Asset\\MainAsset->handle()\n  src/Inventory/Inventory.php:316                    Glpi\\Inventory\\Inventory->handleItem()\n  src/Inventory/Request.php:364                      Glpi\\Inventory in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146
[Wed Jun 01 05:34:11.100283 2022] [php7:error] [pid 71169] [client 192.168.1.50:50168] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP Error (1): Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception Error: Call to a member function getOcsComputer() on null in /var/www/html/marketplace/ocsinventoryng/hook.php at line 1369\n  Backtrace :\n  src/Plugin.php:1530                                plugin_ocsinventoryng_ruleCollectionPrepareInputDataForProcess()\n  src/RuleCollection.php:1770                        Plugin::doOneHook()\n  src/RuleCollection.php:1577                        RuleCollection->prepareInputDataForProcessWithPlugins()\n  src/Inventory/Asset/MainAsset.php:499              RuleCollection->processAllRules()\n  src/Inven in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146
[Wed Jun 01 06:51:33.205026 2022] [php7:error] [pid 71168] [client 192.168.1.22:9379] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP User Warning (512): Unable to decrypt string. It may have been crypted with another key. in /var/www/html/src/GLPIKey.php at line 426\n  Backtrace :\n  src/GLPIKey.php:426                                trigger_error()\n  src/Auth.php:795                                   GLPIKey->decrypt()\n  front/login.php:86                                 Auth->login()\n in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php at line 146\n  Backtrace :\n  ...onolog/Handler/AbstractProcessingHandler.php:48 Monolog\\Handler\\StreamHandler->write()\n  v in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146, referer: https://helpdesk.mydomain.com/front/computer.php
[Wed Jun 01 06:51:33.205132 2022] [php7:error] [pid 71168] [client 192.168.1.22:9379] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP Error (1): Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP User Warning (512): Unable to decrypt string. It may have been crypted with another key. in /var/www/html/src/GLPIKey.php at line 426\n  Backtrace :\n  src/GLPIKey.php:426                                trigger_error()\n  src/Auth.php:795                                   GLPIKey->decrypt()\n  front/login.php:86      in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146, referer: https://helpdesk.mydomain.com/front/computer.php
[Wed Jun 01 07:04:27.601166 2022] [php7:error] [pid 71170] [client 192.168.1.22:11321] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP User Warning (512): Unable to decrypt string. It may have been crypted with another key. in /var/www/html/src/GLPIKey.php at line 426\n  Backtrace :\n  src/GLPIKey.php:426                                trigger_error()\n  src/Auth.php:795                                   GLPIKey->decrypt()\n  front/login.php:86                                 Auth->login()\n in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php at line 146\n  Backtrace :\n  ...onolog/Handler/AbstractProcessingHandler.php:48 Monolog\\Handler\\StreamHandler->write()\n  v in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146, referer: https://helpdesk.mydomain.com/front/computer.php
[Wed Jun 01 07:04:27.601300 2022] [php7:error] [pid 71170] [client 192.168.1.22:11321] PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP Error (1): Uncaught UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** Uncaught Exception UnexpectedValueException: The stream or file "/var/www/html/files/_log/php-errors.log" could not be opened in append mode: failed to open stream: Permission denied\nThe exception occurred while attempting to log:   *** PHP User Warning (512): Unable to decrypt string. It may have been crypted with another key. in /var/www/html/src/GLPIKey.php at line 426\n  Backtrace :\n  src/GLPIKey.php:426                                trigger_error()\n  src/Auth.php:795                                   GLPIKey->decrypt()\n  front/login.php:86      in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 146, referer: https://helpdesk.mydomain.com/front/computer.php
trasher commented 2 years ago

GLPI logs files ACLs are not correct. PHP must be able to write to those files.

Serpher1 commented 2 years ago

@trasher Yeah after that I changed it to 0664 rw-rw-r-- Should be enough.

trasher commented 2 years ago

So you have to provide errors in GLPI logs... Sounds like there are some; since it was trying to write into it.

By the way, having a properly configured GLPI instance is a prerequisite before reporting any issue.

cedric-anne commented 2 years ago

In your logs, there is a Unable to decrypt string. It may have been crypted with another key. error.

This error usally happens when you process the GLPI update without previously restoring the encryption key. During update process, when this key is missing, a form with message The key file "/var/www/glpi/config/glpicrypt.key" used to encrypt/decrypt sensitive data is missing. You should retrieve it from your previous installation or encrypted data will be unreadable. should be shown with both ignore and retry buttons.

Unless I am wrong, it seems that you have a configured LDAP server with a rootdn_passwd value that can be decrypt. It tries to generate a log entry, and, due to ACL issue on files, failed with a fatal error.

Serpher1 commented 2 years ago

@cedric-anne "/var/www/glpi/config/glpicrypt.key" is under /var/www/html/config/ Where can I change the path?

Unless I am wrong, it seems that you have a configured LDAP server with a rootdn_passwd value that can be decrypt. It tries to generate a log entry, and, due to ACL issue on files, failed with a fatal error.

Yes, we used to have LDAP but switched back to internal DB. I switched that server off now after you mentioned it.

cedric-anne commented 2 years ago

Where can I change the path?

I was just mentionning the kind of message you should have seen.

However, as now you may have some data that uses the new generated encryption key, the best way to fix this is to type the rootdn password again and save the form, so it will en encrypted with the new encryption key.

Serpher1 commented 2 years ago

Ok I think enough time has passed. I cleared /var/www/html/files/_cache completely and since then haven't had any calls about GLPI's blank screen. So it was probably that.

Thanks for the help!