Symptoms
-
Unable to start a migration, one of the following error messages are displayed in Plesk Migrator:
PLESK_ERROR: Failed to fetch basic information about resellers, clients and domains data from source servers
Cause: Command execution failed on the local server with non-zero exit code.
command: rsync -r –chmod=Fu=r,Du=rwx,go= –timeout=30 -e ‘ssh -i /root/.ssh/id_rsa -p 22 -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no’ /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/plesk/source/legacy/extras/plesk_17_0_pmm_shared/ [email protected]:/root/plesk_migrator/plesk_migrator-v1c5tj81ez33fks3axsor39rbz5o4ac3/pmm_agent
exit code: 12
stdout:
stderr: rsync: ERROR: cannot stat destination “/root/plesk_migrator/plesk_migrator-v1c5tj81ez33fks3axsor39rbz5o4ac3/pmm_agent”: Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(554) [receiver=3.0.6]
rsync: connection unexpectedly closed (247 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
That is a critical error, migration was stopped.PLESK_ERROR: Failed to check that all required components are installed on source Plesk
Cause: Command execution failed on the local server with non-zero exit code.
command: rsync -r –chmod=Fu=r,Du=rwx,go= -e ‘ssh -i /usr/local/psa/var/modules/panel-migrator/sessions/20170422134426/ssh-keys/id_rsa.203.0.113.2 -p 22 -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no’ /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/plesk/source/legacy/extras/plesk_12_5_pmm_shared/ [email protected]:/root/plesk_migrator/plesk_migrator-5e6lcbrmc6lcpd81on8iidsrh80zjoxl/pmm_agent
exit code: 255
stdout:
stderr: Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]
That is a critical error, migration was stopped. -
Migration via CLI returns the same error messages
-
SELinux status is in
Enforcing
mode on the source server:# getenforce
Enforcing -
The Rsync SELinux boolean
rsync_full_access
is disabled or not available (CentOS 6):# getsebool -a | grep rsync_full_access
rsync_full_access –> off -
The following errors are shown in the Audit log file
/var/log/audit/audit.log
:# egrep “comm=”rsync”” /var/log/audit/audit.log
type=AVC msg=audit(1591887406.036:11075811): avc: denied { create } for pid=16205 comm=”rsync” name=”.AgentConfig.pm.hePViC” scontext=system_u:system_r:rsync_t:s0 tcontext=system_u:object_r:admin_home_t:s0 tclass=file
Cause
SELinux blocks Rsync command on source or target servers.
Resolution
Note: Apply this solution to the source and target servers meanwhile the Plesk migration is ongoing
Allow the Rsync execution temporarily in SELinux:
Click on a section to expand
CentOS 7 / CloudLinux 7 / RHEL 7 or Newer
-
Connect to the server via SSH
-
Enable the Rsync SELinux boolean
rsync_full_access
:# setsebool -P rsync_full_access=1
-
Disable the Rsync SELinux boolean
rsync_full_access
:# setsebool -P rsync_full_access=1
CentOS 6 / CloudLinux 6 / RHEL 6
-
Connect to the server via SSH
-
Disable SELinux:
# setenforce 0
-
Enable SELinux:
# setenforce…