Cannot create an FTP account: Error: Cannot add duplicate collection entry of type 'site' with unique key attributes 'name, id' respectively set to

Created:

2017-01-12 14:22:14 UTC

Modified:

2017-08-08 13:41:12 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot create an FTP account: Error: Cannot add duplicate collection entry of type 'site' with unique key attributes 'name, id' respectively set to

Applicable to:

  • Plesk 12.5 for Windows

Symptoms

  • Following error is displayed in Plesk UI when adding a ftp account ( Subscriptions > example.com > FTP Access > Add an FTP Account ):
    Error: ftpmng failed: Filename:
    Error: Cannot add duplicate collection entry of type 'site' with unique key attributes 'name, id' respectively set to '203.0.113.2, 28',br/> In module
    Exception type: System.Runtime.InteropServices.COMException
    at Microsoft.Web.Administration.Interop.IAppHostElementCollection.AddElement(IAppHostElement pElement, Int32 cPosition)
    at Microsoft.Web.Administration.ConfigurationElementCollectionBase`1.Add(T element)
    at Microsoft.Web.Administration.SiteCollection.Add(String name, String bindingProtocol, String bindingInformation, String physicalPath, Byte[] certificateHash)
    at IISFtpSites.add(IISFtpSites* , basic_string\,std::allocator >* idnName, basic_string\,std::allocator >* protocol, basic_string\,std::allocator >* bindings, basic_string\,std::allocator >* sPhysicalPath)
    at addServer(203.0.113.2)(IIsFtp7ServerAdapter::addServer line 694)
    at updateFtp(203.0.113.2)(FtpServerManager::updateFtp line 378)
    at reconfFtpUser(user)(FtpServerManager::reconfFtpUser line 471)
    at updateUser(user)(FtpServerManager::updateUser line 144)
    at execute console command --update-user(vconsoleapp::start line 100)
    at execute "C:\Program Files\Parallels\Plesk\admin\bin\ftpmng.exe" --update-user "--ip-addresses=203.0.113.2" "--login=user" "--home=C:/Inetpub/vhosts/example.com" "--quota=0" "--permissions=3"(vconsoleapp::run line 117)
    (Error code 1)
  • plesk repair ftp shows an error:
    Checking FTP home junctions 
    ftpmng failed: Site 203.0.113.2 doesn't exist
    at (FtpServerManager::getServerBaseDir line 639)
    at execute console command --get-server-base-dir(vconsoleapp::start line 100)
    at execute "C:\Program Files\Parallels\Plesk\admin\bin\ftpmng.exe" --get-server-base-dir "--ip-address=203.0.113.2"(vconsoleapp::run line 117)
    (Error code 1)
  • 203.0.113.2 website in IIS has not localuser and logs folders.
  • Error during login on FTP through command line:
    530-User cannot log in, home directory inaccessible.

Cause

203.0.113.2 website in IIS contains another application.

Resolution

  1. Rename 203.0.113.2 website in IIS.
  2. Recreate FTP website:
    "%plesk_dir%\admin\bin\ftpmng.exe" --add-ip-address  --ip-address=203.0.113.2
  3. Repair FTP:
    plesk repair ftp

    Note : Confirm repairing in case of the error below:
    Checking FTP home junctions

      The junction 'C:\Inetpub\vhosts\Servers\28\localuser\user' does not
      exist ............................................................. [ERROR]
      Repair the junction 'C:\Inetpub\vhosts\Servers\28\localuser\user'? [Y/n]
Have more questions? Submit a request
Please sign in to leave a comment.