Symptoms
Take-over migration of Plesk server failed with error like (from
/opt/oa-migrator/logs/debug.log
on Odin Automation core node):[2019-03-15 21:27:47,873] 140110122800960 [ERR] Unable to retrieve web hosting information from the source system Cause: The command "/usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/api-cli/database-registrar.php --get-credentials 127.0.0.1 -type mysql" executed at source server '203.0.113.2' (203.0.113.2) returned a non-zero exit code.
Where
203.0.113.2
- IP address of Plesk Server./opt/oa-migrator/logs/debug.log
contains an error like:[2019-03-15 21:27:47,078] 140110122800960 [DBG] Execute remote command: ssh 203.0.113.2 "/usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/api-cli/database-registrar.php --get-credentials 127.0.0.1 -type mysql" [2019-03-15 21:27:47,611] 140110122800960 [DBG] Command stdout: ****** [2019-03-15 21:27:47,611] 140110122800960 [DBG] Command stderr: Can not found appropriate database server in Plesk
There are at least two Database servers registered in Plesk with same
type
andhost
. It could be checked with request topsa
(Plesk database) as:[root@whplin01 ~]# plesk db "select * from DatabaseServers;" +----+-----------+------+------------+-------------+----------------------------------------------------------------+---------------------+----------------+---------------+ | id | host | port | type | admin_login | admin_password | last_error | server_version | parameters_id | +----+-----------+------+------------+-------------+----------------------------------------------------------------+---------------------+----------------+---------------+ | 1 | localhost | 3306 | mysql | admin | ******** | no_error | 5.1.73 | 0 | | 2 | localhost | 5432 | postgresql | | | credentials_not_set | | 0 | | 4 | 127.0.0.1 | 3316 | mysql | root | XXX | no_error | 5.6.34 | 0 | +----+-----------+------+------------+-------------+----------------------------------------------------------------+---------------------+----------------+---------------+
Cause
This behavior is considered as unexpected and the Software related issue was submitted with ID OAM-3421 Takeover migration of Plesk host failed due error on attempt to get Database Server credentials
.
Resolution
Contact your Technical Account Manager or Pooled Technical Associate Team at pta@cloudblue.com to clarify the status of OAM-3421.