Symptoms
- Attempting to start a new migration going to Tools & Settings > Migration & Transfer Manager > Start a New Migration > Fill source server details > Click on Prepare migration, and migration fails to start with following error:
external error ;-P
ERROR: Zend_Config_Exception: file_get_contents(/opt/psa/var/modules/panel-migrator/sessions/20170603231643/config.ini): failed to open stream: No such file or directory (MigratorConfig.php:837)Or
Internal error ;-P
ERROR: Zend_Config_Exception: file_get_contents(/usr/local/psa/var/modules/panel-migrator/sessions/20180410114341/config.ini): failed to open stream: No such file or directory (Config.php:339) - In Plesk log file
/var/log/plesk/panel.log
following error is shown:PHP Warning: scandir(/opt/psa/var/modules/panel-migrator/sessions): failed to open dir: No such file or directory; File: /opt/psa/admin/plib/modules/panel-migrator/library/Backend/SessionManager.php, Line: 36
Or
ERR [1] PHP Warning: scandir(/usr/local/psa/var/modules/panel-migrator/sessions): failed to open dir: No such file or directory; File: /usr/local/psa/admin/plib/modules/panel-migrator/library/Backend/SessionManager.php, Line: 40
ERR [1] PHP Warning: file_put_contents(/usr/local/psa/var/modules/panel-migrator/sessions/20180411152303/config.ini): failed to open stream: No such file or directory; File: /usr/local/psa/admin/plib/modules/panel-migrator/vendor/plesk/migration-lib-code/src/Utils/FileUtils.php, Line: 31
ERR [1] file_get_contents(/usr/local/psa/var/modules/panel-migrator/sessions/20180411152303/config.ini): failed to open stream: No such file or directory
Cause
$PLESK_ROOT_DIR/var/modules/panel-migrator/sessions
directory doesn't exist.
Resolution
- Connect via SSH
- Create directory manually and set valid ownership and permissions:
In Debian/Ubuntu:
# mkdir /opt/psa/var/modules/panel-migrator/sessions
# chown psaadm:root /opt/psa/var/modules/panel-migrator/sessions
# chmod 0750 /opt/psa/var/modules/panel-migrator/sessionsIn CentOS/RedHat:
# mkdir /usr/local/psa/var/modules/panel-migrator/sessions
# chown psaadm:root /usr/local/psa/var/modules/panel-migrator/sessions
# chmod 0750 /usr/local/psa/var/modules/panel-migrator/sessions