• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Migration from Plesk 7.5.4 fails

William Rex

New Pleskian
I recently updated my Plesk 9.5.4 installation and now all migrations from my older 7.5.4 server fail.

Here are the last few lines from the log file:
01:26:52 INFO Dumping domain statistics
01:26:52 TRACE SQL: SELECT http_in, http_out, ftp_in, ftp_out, smtp_in, smtp_out, pop3_imap_in, pop3_imap_out, date FROM DomainsTraffic WHERE dom_id=43
01:26:52 TRACE SQL: SELECT c.id FROM certificates c, Repository r WHERE c.id=r.component_id AND r.rep_id='26' ORDER BY c.id
01:26:52 TRACE SQL: SELECT * FROM certificates WHERE id=23
01:26:52 TRACE SQL: SELECT * FROM certificates WHERE id=27
01:26:52 TRACE SQL: SELECT status FROM DomainServices WHERE dom_id=43 AND type='tomcat'
01:26:52 TRACE SQL: SELECT * FROM dom_level_usrs WHERE dom_id=43
01:26:52 TRACE SQL: SELECT id, password, type FROM accounts
01:26:52 TRACE SQL: SELECT val FROM dom_param WHERE dom_id = 43 AND param = 'locale'
Can't use an undefined value as a HASH reference at Packer.pm line 2270.
[./actions.cpp:310]

I did countless searches but cannot find a solution. Any help would be appreciated.
 
The problem in database inconsistency and caused by Card_id=0 on the destination server. You can check it with following example:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select d.id,d.cr_date,d.name from domains d inner join dom_level_usrs u on d.id = u.dom_id where u.card_id = 0 order by d.id;"

+-----+------------+------------------+
| id | cr_date | name |
+-----+------------+------------------+
| 779 | 2011-09-06 | domain2.com |
+-----+------------+------------------+

This domain has been created recently - on 06 Sep. The issue is that newly created domains' administrators are not updated for some reason and this influences migration.

Meanwhile as a workaround please run manually:

# mysql -BN -uadmin -p`cat /etc/psa/.psa.shadow` psa -e 'select d.name from domains d inner join dom_level_usrs u on d.id = u.dom_id where u.card_id = 0 order by d.id' | xargs -n1 /usr/local/psa/bin/domadmin -u

I hope it will help.
 
IgorG: Thanks for the reply.

I tried the select you listed, but it didn't return any results. I also looked at the databases on both servers and neither of them have any entries with card_id = 0.

The domain doesn't exist on the new server at all, and has never existed on the new server, nor has the client.
Also, all migrations seems to fail at this point. Migrations were working fine when I was running 9.5.2 on the new server.

Any other suggestions?
 
Last edited:
Just wanted to post a follow up in case any one else runs into this issue and comes across this thread. After running into this problem a second time, I decided to take another look into it. It appears that the domains that were failing had card_id = NULL, rather than 0. Also, on the old server which is running Plesk Reloaded 7.5.4, domadmin didn't exist, but domuser.sh did. Double checking with my server running Plesk 9.5, both domadmin and domuser.sh pointed to the same file. So I modifed IgorG's original code to:

mysql -BN -uadmin -p`cat /etc/psa/.psa.shadow` psa -e 'select d.name from domains d inner join dom_level_usrs u on d.id = u.dom_id where isnull(u.card_id) order by d.id' | xargs -n1 echo /usr/local/psa/bin/domuser.sh -u

After running this command, migrations were working properly for the previously failed domains.
 
Back
Top