- Plesk Onyx for Windows
- Plesk 12.5 for Windows
Unable to activate Tools & Settings > Web Application Firewall (ModSecurity) in Plesk with the following error:
PLESK_ERROR: Failed to install the Mod-security rule set: Unable to find row with id 221 in domains table.
Unable to use the current Apache configuration file and to roll back to the previous version of the file because they contain an invalid configuration.
PLESK_ERROR: Db_Table_Exception: Unable to find row with id 221 in domains table.
Fix database inconsistency using Plesk self-repair tool.
Connect to the server via RDP.
Run from the command line:
C:\> plesk repair db
If the issue still exists create Plesk database backup:
C:\> plesk db dump psa > C:\psa_dump.sql
Access Plesk database:
C:\> plesk db
Remove the Application pool entries existing in
IisAppPoolsfor non-existent domain IDs:
MYSQL_WIN: DELETE FROM IisAppPools WHERE ownerId=221;
Query OK, 1 row affected (0.03 sec)
ownerIdis the corresponding domain ID.