Articles in this section

Unable to access Plesk: fork/exec /usr/local/psa/admin/bin/php: exec format error

kb: technical Plesk Obsidian for Linux

Applicable to:

  • Plesk Obsidian for Linux

Symptoms

  • Plesk is inaccessible with the following error:

    CONFIG_TEXT: ERR_CONNECTION_TIMED_OUT 

  • Both sw-engine and sw-cp-server services are masked:

    # systemctl list-unit-files --type=service | grep sw
    sw-cp-server.service masked
    sw-engine.service masked

  • Plesk commands fail:

    # plesk login
    fork/exec /usr/local/psa/admin/bin/php: exec format error

  • Plesk update fails with the following error:

    CONFIG_TEXT: /usr/local/psa/bin/extension: line 2: ?php: No such file or directory
    /usr/local/psa/bin/extension: line 3: syntax error near unexpected token "The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk distribution. It cannot be run outside of Plesk environment.\n"' /usr/local/psa/bin/extension: line 3: die("The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk distribution. It cannot be run outside of Plesk environment.\n");'

  • The following command shows many Plesk files with 0B in size:

    # find /usr/local/psa -type f -size 0 | grep -v modules | grep -v search | grep -v PMM
    usr/local/psa/admin/bin/plesk_agent_manager
    /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/vendor/pragmarx/google2fa/tests/.gitkeep
    /usr/local/psa/admin/htdocs/spaw/empty/empty.html
    /usr/local/psa/admin/sbin/mchk
    /usr/local/psa/admin/sbin/deployer
    /usr/local/psa/admin/sbin/backup_encrypt
    /usr/local/psa/admin/sbin/backup-archiver
    /usr/local/psa/admin/sbin/pmm-ras
    /usr/local/psa/admin/sbin/pmmcli
    /usr/local/psa/admin/sbin/pmmcli_daemon
    /usr/local/psa/admin/sbin/gl_dbcleaner
    ...

Cause

Corrupted Plesk files.

Resolution

  1. Connect to the server via SSH;
  2. Find the owner of the files with 0B in size:

    # find /usr/local/psa -type f -size 0 -exec rpm -qf {} \; | grep -v search | grep -v PMM | grep -v 'not owned' | uniq
    plesk-core-18.0-2.centos.7+p18.0.25.2+t200325.1928.x86_64
    plesk-service-node-utilities-18.0-2.centos.7+p18.0.25.2+t200325.1928.x86_64

  1. Remove them with the following command:

    # rpm -e --nodeps --justdb plesk-core
    # rpm -e --nodeps --justdb plesk-service-node

  1. Run Plesk Installer to reinstall them back:

    # plesk installer

  1. Restart the psa service:

    # systemctl psa restart

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.