Não foi possível acessar o Plesk: fork/exec /usr/local/psa/admin/bin/php: erro de formato exec
imprimir- 0
Sintomas
- Plesk está inacessível com o seguinte erro:
ERR_CONNECTION_TIMED_OUT
- Os serviços sw-engine e sw-cp-server são mascarados:
# systemctl list-unit-files --type=service | grep sw
sw-cp-server.service masked
sw-engine.service masked
- Os comandos do Plesk falham:
# plesk login
fork/exec /usr/local/psa/admin/bin/php: exec format error
- A atualização do Plesk falha com o seguinte erro:
/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");'
- O comando a seguir mostra muitos arquivos Plesk com tamanho 0B:
# 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
...
Causa
Arquivos Plesk corrompidos.
Resolução
- Conecte-se ao servidor via SSH ;
- Encontre o proprietário dos arquivos com tamanho 0B:
# 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
- Remova-os com o seguinte comando:
# rpm -e --nodeps --justdb plesk-core
# rpm -e --nodeps --justdb plesk-service-node
- Execute o Plesk Installer para reinstalá-los:
# plesk installer
- Reinicie o serviço PSA:
# systemctl psa restart