• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk 12 full of bugs / migration problem / database inconsistency

fliegerhermi

Regular Pleskian
Hi!
I installed plesk 12.5 on a debian minimal machine, which should work just fine according to the manual.
Some minor problems have been solved, but now I seem to be having a database inconsistency on a productive system. That is unacceptable!

What I have done:
1) Installed Plesk, didn't change anything in the database manually
2) Migrated a few customers
3) Deleted some of the migrated subscriptions because I didn't have access to the NS-entries.
4) Migrated them again

Migration returned the following error:
Warning: Restore customer "xxxxxx"
Failed deployment of domain xxxxx.com
Warning:
Execution of /opt/psa/admin/plib/api-cli/domain.php --create xxxxxx.com -owner xxxxx-do-not-apply-skeleton -notify false -guid 66d0c552-93eb-47f5-9276-4937fcfab733 -creation-date 2015-04-03 -ip 84.200.17.45 -ignore-nonexistent-options failed with return code 1. Stderr is An error occurred during domain creation: mailmng-outgoing failed: ERROR:eek:utgoing:UNIQUE constraint failed: domains.name
Warning: Restore user account "[email protected]"
Internal server error: There is no DSMail service for domain with id = 92


I ran the plesk consistency checker (http://kb.odin.com/en/114791) which returned a bunch of errors:
List of records in [psa.mail.dom_id] that miss a matching record in [psa.domains.id]
66, 66, 77, 77, 77
List of records in [psa.DomainServices.dom_id] that miss a matching record in [psa.domains.id]
11, 29, 66, 77
Caught exception: MySQL query failed: Table 'psa.domainaliases' doesn't exist at running query "SELECT id FROM dns_zone WHERE id<>1 and id not in (select dns_zone_id from domainaliases);"
Caught exception: MySQL query failed: Table 'psa.domainaliases' doesn't exist at running query "SELECT id FROM dns_zone WHERE id<>1 and id not in (select dns_zone_id from domainaliases);"
ERROR: Table "domainaliases" is not found in database "psa"!
ERROR: Table "domainaliases" is not found in database "psa"!
ERROR: Table "domainaliases" is not found in database "psa"!
ERROR: Table "domainaliases" is not found in database "psa"!
List of records in [psa.Subscriptions.object_id WHERE object_type='domain'] that miss a matching record in [psa.domains.id WHERE parentDomainId=0 AND htype = 'vrt_hst' AND webspace_id=0]
19, 35, 38, 41, 42, 43, 44, 56, 57, 60, 61, 92
List of records in [psa.Subscriptions.id] that miss a matching record in [psa.PlansSubscriptions.subscription_id]
2, 58, 67, 68, 69, 70, 71, 72, 74, 75
List of records in [psa.smb_servicePermissionAccounts.servicePermissionId] that exceed N in 1:N (N=1) relation to [psa.smb_servicePermissions.id]
2 [count in table psa.smb_servicePermissions:1; count in table psa.smb_servicePermissionAccounts:23]
List of records in [psa.smb_servicePermissions.id] that miss a matching record in [psa.smb_servicePermissionAccounts.servicePermissionId]
1, 5, 6
ERROR: Table "smb_apsImportedResources" is not found in database "psa"!
ERROR: Table "smb_apsImportedResources" is not found in database "psa"!
ERROR: Table "siteapppackages_apscategories" is not found in database "psa"!
List of records in [apsc.aps_registry_object.uid WHERE type='aps.resource'] that miss a matching record in [psa.smb_apsInstances.registryResourceId]
f2056b0d-1601-4299-9db7-481d0d43a452, 6865e909-5446-4e03-88c0-af63054addcb
List of records in [apsc.aps_registry_object.uid WHERE type='aps.resource'] that miss a matching record in [psa.smb_serviceInstances.externalId WHERE serviceProviderId=(SELECT id FROM smb_serviceProviders WHERE classname='Smb_Service_Provider_Aps')]
f2056b0d-1601-4299-9db7-481d0d43a452, 6865e909-5446-4e03-88c0-af63054addcb



So basically when you delete something garbage remains in the database which results in errors later on. I'm sorry to say that, but that is a basic system function that should really work. If it doesn't plesk 12.5 should go back to testing stage.
There's absolutly no chance for a user mistake since I've done everything in your panel (Not in the console, nor in the database).

I'd be thankful for any help. Messing in the database will result in more problems and doesn't solve the issue for the future. THanks!

PS: No thanks I don't want to buy support for 150$, because it is a system malfunction!
 
You have applied KB with a beta tool for Plesk 12.0 (http://kb.odin.com/en/114791) to Plesk 12.5.
Plesk Database Inconsistency Checker (Beta)
APPLIES TO:
    • Plesk 12.0 for Linux
    • Plesk 11.0 for Linux
    • Plesk 10.4 for Linux/Unix
    • Plesk for Windows
It is generally unrecommended since Plesk 12.0 and Plesk 12.5 have differencies in DB structure, so I cannot tell now whether KB helped or harmed your server.

For Plesk 12.5 there is a built-in "plesk repair" option. Run it from the command line and let it fix discovered issues.

Certain inconsistencies cannot be avoided even if there are no user errors - some operations may remain incomplete due to insufficient system resources (especially in low cost vps), some - because of locked files, etc; Normally they don't cause much harm or problem.
 
Thank you for your quick answer. Great support. Since the utility just reads data it can't change or brake anything. That's why I tried it.

Thank you for the plesk repair option. That solved the issue. (plesk repair db)
 
Sorry guys. I came back with the good news to early. Plesk repair fixed some db issues, but the migration error persists:

Execution of /opt/psa/admin/plib/api-cli/user.php --create [email protected] -owner admin -guid 6281ad2a-d9eb-0226-0934-1573e5e17f6a -cname '' -passwd '' -passwd_type sym -status enabled -domain-admin false -email [email protected] -role Application\ User -legacy-user false -subscription-name xxxxxx.eu -ignore-nonexistent-options failed with return code 1. Stderr is Error during user creation: Owner with id 1 has not subscription with id 102

Any idea on how to solve that migration-issue? Thanks
 
This results in the same error except for the fact, that the ID in the end is changing [...]Error during user creation: Owner with id 17 has not subscription with id 103

Any further ideas? Thanks!
 
Probably inconsistent data remains in the system after previously performed migration and subsequent clean-up of Plesk database? Could you please check, that subscription "xxxxxx.eu" really exist under vendor "admin" both on source and target (after failed migration) servers? Could you try again to remove all migrated objects (domans, clients, resellers, etc) from target Plesk and perform another tries to migrate them? Also I suggest you to try Plesk Migrator: http://docs.plesk.com/en-US/12.5/migration-guide/introduction/. It was developed as a replacement for Migration & Transfer Manager, has better error reporting and clear and consistent logs.
 
Back
Top