Protected directory cannot be enabled: columns siteId, path are not unique

Refers to:

  • Plesk for Windows
  • MT:3eee089d90d98a8a439c4c163b090705
  • MT:15ce68b7c657e3915829a6000aa4756f
  • MG:2ac6655868e5e5446afb9302b21c0a60

Created:

2016-11-16 13:20:40 UTC

Modified:

2017-02-18 08:35:59 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Protected directory cannot be enabled: columns siteId, path are not unique

Symptoms

When trying to add a new customer and a protected directory in Plesk, the protected directory cannot be enabled:

Error message : ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique (Error code 1)

The similar error message appears in debug.log for current migration:

- Subscription 'example.com'
|
`- error: Failed to create subscription 'example.com' in target panel
Migration for that subscription is considered completely failed. No further actions are performed for it.
Migration tools tried to perform operation in 2 attempts.
----------------------------------------------------------------------------
Attempt #1 failed with the following error:
u'Command LANG=en_US.UTF-8 ALLOW_WEAK_PASSWORDS=1 PLESK_RESTORE_MODE=1 "subscription" "--create" "example.com" "-hosting" "true" "-hst_type" "phys" "-login" "sub_1111111111" "-passwd" "abcdefgi" "-ip" "10.20.30.40" "-mail-service-ip" "10.20.30.40" "-do-not-apply-skeleton" "-notify" "false" failed with exit code 1:
stdout:
stderr: An error occurred during domain creation: An error occurred during changing of hosting settings: ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique
at execute console command --add-protected-url(vconsoleapp::start line 100)
at execute "C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\bin64\\websrvmng.exe" --add-protected-url "--vhost-name=example.com" "--path=plesk-stat" "--realm=Domain statistics"(vconsoleapp::run line 117)
(Error code 1)

The following error can be found in Event Viewer > Applications and Services > Plesk :

columns siteId, path are not unique
at execute console command --add-protected-url(vconsoleapp::start line 100)
at execute "C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\bin64\\websrvmng.exe" --add-protected-url "--vhost-name=example.com" "--path=plesk-stat" "--realm=Domain statistics"(vconsoleapp::run line 117)
Execute file name: C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\bin64\\websrvmng.exe

Cause

The protected directory was not synchronized properly, unnecessary entires in IIS Manager > Sites .

Resolution

  1. Synchronize the protected directories database by executing the following command in cmd.exe :

    "%plesk_cli%\\repair.exe" --synchronize-protected-directories-storage
  2. Go to IIS Manager > Sites and delete unnecessary entries related to example.com domain.

For migration case it is required to rerun migration process after running the command above.

Have more questions? Submit a request
Please sign in to leave a comment.