Articles in this section

Installing, updating or removing extensions in Plesk fails: file segments is not readable

Plesk for Windows Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

  • On performing different operations in Plesk, for example:

    • using the search bar on the top,
    • installing Plesk updates,
    • installing, updating or removing extensions

    one of the following errors 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:
    ...
    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.


    Wrong TermInfoIndexFile format.

  • Accessing Plesk extensions (e.g. ImunifyAV) results in an empty page or an error 500.

  • One of the following errors might be shown in the Plesk log file/var/log/plesk/panel.log (Linux) or %plesk_dir%admin\logs\php_error.log (Windows):

    ERROR: ZendSearch\Lucene\Exception\InvalidFileFormatException: Unsupported segments file format (Index.php:276)


    ERR [1] Exception: 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


    ERROR: Out of memory (allocated 16777216) (tried to allocate 4080523509242931280 bytes) (Filesystem.php:152)
    ERR [1] /opt/psa/admin/bin/autoinstaller '--select-product-id' 'plesk' '--select-release-current' '--upgrade-installed-components' failed with message: Downloading file products.inf3: 0%
    Downloading file products.inf3: 100% was finished.
    Downloading file plesk.inf3: 0%
    ...
    Installing packages
    ERROR: Failed to install or upgrade the extension 'SEO Toolkit' (package: xovi):
    mmap() failed: [12] Cannot allocate memory
    PHP Fatal error: Out of memory (allocated 16777216) (tried to allocate 4080523509242931280 bytes) in /opt/psa/admin/plib/vendor/zendframework/zendsearch/library/ZendSearch/Lucene/Storage/File/Filesystem.php on line 152
    Warning! Not all packages were installed.
    ...

  • The segments file might be missing:

    # ls -la /opt/psa/var/search/segments_4b
    ls: cannot access /opt/psa/var/search/segments_4b: No such file or directory

  • One of the following messages might be shown in the Plesk Installer log file /var/log/plesk/install/autoinstaller3.log (Linux) or C:\ParallelsInstaller\autoinstaller3.log / C:\ProgramData\Plesk\Installer\autoinstaller3.log (Windows):

    Wrong segments.gen file format


    Wrong TermInfoFile file format


    Wrong norms file format.


    Extension package ext-xovi 1.1.4-43 installation failed with code 255, stdout: ~empty
    stderr:
    mmap() failed: [12] Cannot allocate memory
    PHP Fatal error: Out of memory (allocated 16777216) (tried to allocate 4080523509242931280 bytes) in /opt/psa/admin/plib/vendor/zendframework/zendsearch/library/ZendSearch/Lucene/Storage/File/Filesystem.php on line 152
    Warning! Not all packages were installed.

Cause

Segment files are missing or corrupted.

Resolution

Reinstall Plesk Catalog extension and recreate index files:

For Plesk on Linux:
  1. Connect to the server using SSH.

  2. Remove the index files:

    # rm -rf /usr/local/psa/var/search/*
    # rm -rf /usr/local/psa/var/modules/catalog/search/*

  3. Reinstall Plesk Extension Catalog:

    # plesk bin extension -i catalog

  4. Recreate the indexes:

    # plesk daily SearchIndex

For Plesk on Windows:
  1. Connect to the server using RDP.

  2. Delete all files in folders %plesk_dir%var\search and %plesk_dir%var\modules\catalog\search.

  3. Reinstall Plesk Extension Catalog:

    plesk bin extension -i catalog

  4. Recreate the indexes:

    plesk daily SearchIndex
    plesk bin extension --exec catalog update-index.php

Was this article helpful?

Comments

1 comment
Date Votes
  • Reinstall Plesk Extension Catalog:

    c:\> plesk bin extension -i catalog

    Recreate the indexes:

    c:\> plesk daily SearchIndex
    c:\> plesk bin extension --exec catalog update-index.php

    I have found an error for all step.

    The execution of port-install.php has failed with the following message:
    exit status 1

     

    0

Please sign in to leave a comment.