Symptoms
-
On managing Plesk, for example:
- using the search bar in top left corner
- installing Plesk updates
- installing, updating or removing extensions
one of the following error is shown:
The extension %%name%% was removed with errors: Error: GraphQL error: External exception. File '/opt/psa/var/search/segments_4b' is not readable. "
PHP Warning: fread(): Length parameter must be greater than 0; File: /opt/psa/admin/plib/vendor/zendframework/zendsearch/library/ZendSearch/Lucene/Storage/File/Filesystem.php, Line: 148
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 16777216) (tried to allocate 4512838288218564640 bytes) in /opt/psa/admin/plib/vendor/zendframework/zendsearch/library/ZendSearch/Lucene/Storage/File/Filesystem.php on line 152
ERR [extension/revisium-antivirus] Execution of
/opt/psa/admin/plib/modules/revisium-antivirus/scripts/pre-uninstall.php
failed with exit code 1 and the output:
ERR [panel] SQLSTATE[HY000]: General
error: 1 no such table: pool:
0:
/opt/psa/admin/plib/modules/revisium-antivirus/library/Model/Pool.php:95
PDO->prepare(string 'SELECT count(*) FROM pool WHERE
status IN (2, 3)')
...
3:
/opt/psa/admin/plib/modules/revisium-antivirus/scripts/pre-uninstall.php:9
ERROR: PDOException: SQLSTATE[HY000]: General error: 1 no such
table: pool (Pool.php:95)
Wrong segments.gen file format
Wrong TermInfoFile file format
Wrong norms file format.
-
Accessing Plesk extensions (e.g. ImunifyAV) show an empty page or an error 500
Cause
Segment files are missing or corrupted.
Resolution
Reinstall Plesk Catalog extension and recreate index files:
For Plesk on Linux:
-
Connect to the server via SSH
-
Remove the index files:
# rm -rf /usr/local/psa/var/search/*
# rm -rf /usr/local/psa/var/modules/catalog/search/*
# rm -rf /opt/psa/var/search/* (path is for Debian-based distributions only)
-
Reinstall Plesk Extension Catalog with the following command:
# plesk bin extension -i catalog
-
Recreate the indexes:
# plesk daily SearchIndex
For Plesk on Windows:
-
Connect to the server via RDP
-
Delete all files in the folders
%plesk_dir%varsearch
and%plesk_dir%varmodulescatalogsearch
-
Reinstall Plesk extension catalog with the following command:
plesk bin extension -i catalog
-
Recreate the indexes:
plesk daily SearchIndex
plesk bin extension --exec catalog update-index.php