Symptoms
Migration project for Windows Plesk Web Hosting Subscription failed with error.
Error like below could be found in
/opt/oa-migrator/logs/debug.log
on CloudBlue Commerce Core node:Failed to create webspace in WebHosting Plesk for subscription 'domain.name'.: Failed to validate WebHosting Plesk web hosting XML file: XML file with WebHosting Plesk web hosting data is invalid: /opt/oa-migrator/sessions/588952ea-2b87-4fd4-8c8a-95e2b9a346aa/shm_web_hosting.xml:875:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element '{http://www.odin.com/oam/unified/web/hosting/shm/1.0}database_user': Missing child element(s). Expected is ( {http://www.odin.com/oam/unified/web/hosting/shm/1.0}password ).
Manual XML scheme validation fails:
[root@core cloudblue]# xmllint --schema /opt/oa-migrator/share/oa-migrator/unified_format/schema/web_hosting_shm.xsd --noout invalid: /opt/oa-migrator/sessions/588952ea-2b87-4fd4-8c8a-95e2b9a346aa/shm_web_hosting.xml shm_data_formatted.xml:18444: element database_user: Schemas validity error : Element '{http://www.odin.com/oam/unified/web/hosting/shm/1.0}database_user': Missing child element(s). Expected is ( {http://www.odin.com/oam/unified/web/hosting/shm/1.0}password ). shm_data_formatted.xml fails to validate
Cause
Database inconsistency on source Plesk host. Database user does not have password.
Resolution
Copy SHM data file from OAM session:
[root@core cloudblue]# cp -rp /opt/oa-migrator/sessions/588952ea-2b87-4fd4-8c8a-95e2b9a346aa/shm_web_hosting.xml shm_data.xml
Format the file:
[root@core cloudblue]# xmllint --format shm_data.xml > shm_data_formatted.xml
Validate schema:
[root@core cloudblue]# xmllint --schema /opt/oa-migrator/share/oa-migrator/unified_format/schema/web_hosting_shm.xsd --noout shm_data_formatted.xml shm_data_formatted.xml:18444: element database_user: Schemas validity error : Element '{http://www.odin.com/oam/unified/web/hosting/shm/1.0}database_user': Missing child element(s). Expected is ( {http://www.odin.com/oam/unified/web/hosting/shm/1.0}password ). shm_data_formatted.xml fails to validate
Find
<database_user>
element (near string #18444) and check if it contains<password>
child element.Also, you can check password existence in Plesk database using CLI tools with command filtered by DB user name:
"C:\Program Files (x86)\Plesk\admin\bin\dbclient" --direct-sql --sql="select u.login, u.db_id, u.id, a.type, a.password from accounts a, db_users u where a.id=u.account_id and u.login in ('jdoe1','jdoe1_sa')" login db_id id type password jdoe1 0 166 sym <encrypted> jdoe1_sa 152 169 plain
Note: password field is empty for
jdoe1_sa
DB user.- Set password for user
jdoe1_sa
in Plesk and restart migration.