You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-10-28 10:27:08

spirkaa
Member
Registered: 2018-10-28
Posts: 3

[GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

I have entity structure like this:

Root entity
Root entity > Company
Root entity > Company > Branch 1
Root entity > Company > Branch 2
Root entity > Company > Branch 3
Root entity > Company > Branch 4
Root entity > Company > Branch 5
Root entity > Company > Branch 6
Root entity > Company > Branch 7
Root entity > Company > Branch 8
Root entity > Company > Branch 9
Root entity > Company > Branch 10
Root entity > Company > Branch 11
Root entity > Company > Branch 12
Root entity > Company > Branch 13
Root entity > Company > Branch 14

Screenshot (pay attention to IDs) - imgur.com/a/7Qzs9La

My profile have Super-Admin (R) authorization on Root entity and Root entity > Company, so i can browse GLPI items like Company (tree structure)

If i try to filter any page by Location or Category or Requester or many other fields, i got "The results could not be loaded." in GUI and errors like this in apache logs:

PHP Fatal error:  Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_1|2|3|4|5|6|7|8|9|10|11|12|13|14|15" provided; key is too long. Must be no more than 64 characters in /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php:344\nStack trace:\n#0 /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php(279): Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheDecorator->validateKey('glpi_entities_a...')\n#1 /var/www/glpi/inc/dbutils.class.php(802): Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheDecorator->has('glpi_entities_a...')\n#2 /var/www/glpi/inc/dbutils.class.php(563): DbUtils->getAncestorsOf('glpi_entities', Array)\n#3 /var/www/glpi/inc/db.function.php(653): DbUtils->getEntitiesRestrictRequest(' AND ', 'glpi_locations', '`glpi_locations...', Array, true, false)\n#4 /var/www/glpi/inc/dropdown.class.php(2369): getEntitiesRestrictRequest(' AND ', 'glpi_locations', '', Array, true)\n#5 /var/www/glpi/ajax/getDropdownVal in /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php on line 344, referer: http://192.168.31.202/front/ticket.php

If i switch to Root entity (tree structure), error gone and filter contents loading normal.

Other workaround i found (but no way anyone can do this in production) is to delete several entities. After this ofcourse key "glpi_entities_ancestors_cache_ID|OF|ALL|NESTED|ENTITIES" will fit in 64 characters.

I got this error both in clean fresh install of 9.3.2 without plugins on test server and after upgrade production server (9.2.1) with thousands of db items


GLPI 9.3.2 ( => /var/www/glpi)
Installation mode: TARBALL

Server
Operating system: Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64
PHP 7.2.11-2+0~20181015120801.9+stretch~1.gbp8105e0 apache2handler (Core, PDO, PDO_ODBC, Phar, Reflection, SPL, SimpleXML, Zend
	OPcache, apache2handler, apc, apcu, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv,
	imap, json, ldap, libxml, mbstring, mysqli, mysqlnd, odbc, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap,
	sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zlib)
Setup: max_execution_time="60" memory_limit="256M" post_max_size="12M" safe_mode="" session.save_handler="files"
	upload_max_filesize="10M" 
Software: Apache/2.4.25 (Debian) (Apache/2.4.25 (Debian) Server at 192.168.31.202 Port 80)
	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Server Software: mariadb.org binary distribution
	Server Version: 10.3.10-MariaDB-1:10.3.10+maria~stretch-log
	Server SQL Mode: 
	Parameters: glpi@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
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
CAS extension is not present
Database version seems correct (10.3.10) - Perfect!Database version seems correct (10.3.10) - Perfect!
OK/var/www/glpi/files/_log : OK
OK/var/www/glpi/config : OK
OK/var/www/glpi/files : OK
OK/var/www/glpi/files/_dumps : OK
OK/var/www/glpi/files/_sessions : OK
OK/var/www/glpi/files/_cron : OK
OK/var/www/glpi/files/_graphs : OK
OK/var/www/glpi/files/_lock : OK
OK/var/www/glpi/files/_plugins : OK
OK/var/www/glpi/files/_tmp : OK
OK/var/www/glpi/files/_cache : OK
OK/var/www/glpi/files/_rss : OK
OK/var/www/glpi/files/_uploads : OK
OK/var/www/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 (/var/www/glpi/lib/htmlawed)
SimplePie version 1.5.2 in (/var/www/glpi/vendor/simplepie/simplepie/library)
TCPDF version 6.2.25 in (/var/www/glpi/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/var/www/glpi/vendor/michelf/php-markdown/Michelf)
true/punycode in (/var/www/glpi/vendor/true/punycode/src)
iacaml/autolink in (/var/www/glpi/vendor/iamcal/lib_autolink)
sabre/vobject in (/var/www/glpi/vendor/sabre/vobject/lib)

SQL replicas
Not active

Notifications
Way of sending emails: PHP

Mails receivers
Plugins list

Offline

#2 2018-10-29 14:53:14

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,405

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

You made this request from search engine in GLPI?


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2018-10-29 15:32:33

spirkaa
Member
Registered: 2018-10-28
Posts: 3

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

yllen wrote:

You made this request from search engine in GLPI?

Yes, default search form

I done more testing with different php and glpi versions and found that this bug is not present in glpi 9.3.1

Last edited by spirkaa (2018-10-29 15:34:18)

Offline

#4 2018-10-29 17:23:20

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,405

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

can you look at your database if glpi_locations is not crashed?
If it is, repair it.


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2018-10-30 09:20:36

spirkaa
Member
Registered: 2018-10-28
Posts: 3

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

The problem is with not only locations, but another search items too. They work fine on Root entity (tree structure). There's nothing to do with database repair, because it is a clean, fresh install of 9.3.2 with only 1-2 test locations and 15 entinties.

And no problem at all with version 9.3.1.

Last edited by spirkaa (2018-10-30 09:25:19)

Offline

#6 2018-11-02 17:58:55

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,405

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

Ticket opened on the glpi forge: https://github.com/glpi-project/glpi/issues/4859


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2018-11-07 15:39:52

generalvini
Guest
Registered: 2018-03-09
Posts: 10

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

Same error when i try to assign Users to Groups

 PHP Fatal error:  Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_0

Offline

#8 2018-11-07 15:53:17

generalvini
Guest
Registered: 2018-03-09
Posts: 10

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache

generalvini wrote:

Same error when i try to assign Users to Groups

 PHP Fatal error:  Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_0

fix with diff file but the query is VERY SLOW ....

Offline

#9 2018-11-07 18:33:10

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,405

Re: [GLPI 9.3.2] Filter Errors. Invalid key glpi_entities_ancestors_cache


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB