Unable to Install Dmp Connector with error: Bootstrap operation failed with error code 183

Hello Y'all,

It has a been a while since I wrote, and I will try to keep writing more stories about my experiences.
For this story, another long tale and a short answer, however my intent with this blog is not to give and answer to an error or a magic pill.
I want to open my toolbox and show something that can be used to help your troubleshooting and understanding of the product.

[The Scenario:]

The issue was discover when trying to upgrade the environment to 1802, there was no updates available in the SCCM console.
And looking at the DMPDownloader.log and DMPUploader.log, the last entry was from January of 2018.
And if we tried to restart one of those two components using compmgr.exe, we would get an error saying that we were unable to connect to the component.
Lets start the detective work.
The first step is to check the sitecomp.log, that is responsible for the installation of the components, in my logic, that's the place to start.

And here is what we could see:

====================================================================
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Reinstalling component SMS_CLOUD_USERSYNC...
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) STATMSG: ID=1018 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_CLOUD_USERSYNC" SYS= SITE=RSP PID=4520 TID=5880 GMTDATE=Sun May 20 03:04:49.248 2018 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) LogEvent(): Successfully logged Event to NT Event Log (4, 110, 1073742842, (null)).
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Writing component specific registry values.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Registry keys Operations Management\SMS Server Role\SMS Dmp Connector already exists on server .
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Writing SQL Alias registry values.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Configure Sql server alias DBMSSOCN,,1433
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Installed CloudUserSync for .
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Found 1 files to register with Regasm.exe
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) The server already contains some of the required files for this component. A disk space check will not be made.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Installed service SMS_SERVER_BOOTSTRAP_RP-PRI-01.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Starting service SMS_SERVER_BOOTSTRAP_RP-PRI-01 with command-line arguments "RSP E:\Program Files\Microsoft Configuration Manager /regasm E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.Usersync.dll none"...
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.Usersync.dll is done successfully.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Bootstrap operation successful.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Deinstalled service SMS_SERVER_BOOTSTRAP_.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Bootstrap operations completed.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) All files installed.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Starting bootstrap operations...
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Installed service SMS_SERVER_BOOTSTRAP_.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Starting service SMS_SERVER_BOOTSTRAP_ with command-line arguments "RSP E:\Program Files\Microsoft Configuration Manager /install E:\Program Files\Microsoft Configuration Manager\bin\x64\rolesetup.exe CONNECTOR "...
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Bootstrap operation failed with error code 183
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) "E:\Program Files\Microsoft Configuration Manager\bin\x64\rolesetup.exe /install /siteserver:" executed successfully on server .
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Bootstrap operation successful.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Deinstalled service SMS_SERVER_BOOTSTRAP_.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Bootstrap operations aborted.
SMS_SITE_COMPONENT_MANAGER 5880 (0x16f8) Reinstallation failed and will be retried in the next polling cycle.
====================================================================

The operation starts, it calls the service SMS_SERVER_BOOTSTRAP, and Bootstrap(srvboot.exe) calls the rolesetup.exe.
Looking at the error 183, there isn't much to it, and one would think, maybe it was trying to look at something that was already there... hold that though.

====================================================================
Error Code: 0xB7 (183)
Error Name: ERROR_ALREADY_EXISTS
Error Source: Windows
Error Message: Cannot create a file when that file already exists.
====================================================================

So using our good friend Procmon from Sysinternals Suite I tracked only the rolesetup.exe.

====================================================================
rolesetup.exe 7476 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
rolesetup.exe 7476 RegOpenKey HKLM\Software\Microsoft\Rpc SUCCESS Desired Access: Query Value
rolesetup.exe 7476 RegQueryValue HKLM\SOFTWARE\Microsoft\Rpc\IdleTimerWindow NAME NOT FOUND Length: 144
rolesetup.exe 7476 RegCloseKey HKLM\SOFTWARE\Microsoft\Rpc SUCCESS
rolesetup.exe 7476 CreateFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS Desired Access: Generic Write, Read Attributes, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Opened
rolesetup.exe 7476 QueryStandardInformationFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS AllocationSize: 204,800, EndOfFile: 204,376, NumberOfLinks: 1, DeletePending: False, Directory: False
rolesetup.exe 7476 QueryStandardInformationFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS AllocationSize: 204,800, EndOfFile: 204,376, NumberOfLinks: 1, DeletePending: False, Directory: False
rolesetup.exe 7476 QueryStandardInformationFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS AllocationSize: 204,800, EndOfFile: 204,376, NumberOfLinks: 1, DeletePending: False, Directory: False
rolesetup.exe 7476 WriteFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS Offset: 204,376, Length: 135, Priority: Normal
rolesetup.exe 7476 CloseFile E:\Program Files\Microsoft Configuration Manager\Logs\ConnectorSetup.log SUCCESS
rolesetup.exe 7476 QueryOpen E:\Program Files\Microsoft Configuration Manager\EasySetupPayload SUCCESS CreationTime: 7/24/2017 6:20:29 PM, LastAccessTime: 5/18/2018 11:09:41 PM, LastWriteTime: 5/18/2018 11:09:41 PM, ChangeTime: 5/19/2018 9:59:42 PM, AllocationSize: 4,096, EndOfFile: 4,096, FileAttributes: D
rolesetup.exe 7476 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
====================================================================

Good boy! Procmon directed us to where we needed to go, looking at the entries when we restart the Site Component service the command line for the installation is writing to the log(ConnectorSetup.log).
And looking at the end or the Connector setup log, we see that we are getting an access denied to the folder EasySetupPayload
And we also get the error we were seeing in the sitecomp.log when the bootstrap service was failing: CONNECTOR could not be installed. The return code was 183

====================================================================
CONNECTOR Setup Started....
Parameters: E:\Program Files\Microsoft Configuration Manager\bin\x64\rolesetup.exe /install /siteserver:RP-PRI-01 CONNECTOR 0
Installing Pre Reqs for CONNECTOR
======== Installing Pre Reqs for Role CONNECTOR ========
Found 1 Pre Reqs for Role CONNECTOR
Pre Req SqlNativeClient found.
SqlNativeClient already installed (Product Code: {1385D3DB-8E80-427B-91D2-B7535862B8E4}). Would not install again.
Pre Req SqlNativeClient is already installed. Skipping it.
======== Completed Installation of Pre Reqs for Role CONNECTOR ========
Installing the CONNECTOR
Passed OS version check.
.NET Framework 4.0 Full profile is installed.
.NET Framework 4.5 or later Full profile is installed.
CTool::RegisterManagedBinary: run command line: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.DataUpload.dll"
CTool::RegisterManagedBinary: Registered E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.DataUpload.dll successfully
Registered DLL E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.DataUpload.dll
CTool::RegisterManagedBinary: run command line: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.MessageDownload.dll"
CTool::RegisterManagedBinary: Registered E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.MessageDownload.dll successfully
Registered DLL E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.MessageDownload.dll
CTool::RegisterManagedBinary: run command line: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.Usersync.dll"
CTool::RegisterManagedBinary: Registered E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.Usersync.dll successfully
Registered DLL E:\Program Files\Microsoft Configuration Manager\bin\x64\Microsoft.ConfigurationManager.DmpConnector.Usersync.dll
CTool::RegisterManagedBinary: run command line: "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe" "E:\Program Files\Microsoft Configuration Manager\bin\x64\IntuneContentManager\Microsoft.ConfigurationManager.IntuneContentManager.dll" /codebase
CTool::RegisterManagedBinary: Failed to register E:\Program Files\Microsoft Configuration Manager\bin\x64\IntuneContentManager\Microsoft.ConfigurationManager.IntuneContentManager.dll with .Net Fx 2.0
CTool::RegisterManagedBinary: run command line: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "E:\Program Files\Microsoft Configuration Manager\bin\x64\IntuneContentManager\Microsoft.ConfigurationManager.IntuneContentManager.dll" /codebase
CTool::RegisterManagedBinary: Registered E:\Program Files\Microsoft Configuration Manager\bin\x64\IntuneContentManager\Microsoft.ConfigurationManager.IntuneContentManager.dll successfully
Registered DLL E:\Program Files\Microsoft Configuration Manager\bin\x64\IntuneContentManager\Microsoft.ConfigurationManager.IntuneContentManager.dll
Creating EasySetupPayload share to point to: E:\Program Files\Microsoft Configuration Manager\EasySetupPayload
Failed to create share EasySetupPayload (0x00000005)
CreateLocalShare failed; 0x80070005
Failed to create EasySetupPayload share
CONNECTOR could not be installed. The return code was 183
~RoleSetup().

====================================================================

[The resolution:]

Reviewing the EasySetupPayload share and comparing the Permissions to my lab server, the SYSTEM account was removed both from the share and from the Security Tab.
Once we added the SYSTEM account with Full Permissions to the Share and to the Security TAB the next polling cycle, the installation was successful:

====================================================================
Creating EasySetupPayload share to point to: E:\Program Files\Microsoft Configuration Manager\EasySetupPayload
Succesfully created share EasySetupPayload
EasySetupPayload share was created successfully
Creating AdminUIContentPayload share to point to: E:\Program Files\Microsoft Configuration Manager\AdminUIContentPayload
Succesfully created share AdminUIContentPayload
AdminUIContentPayload share was created successfully
Installation was successful.

~RoleSetup().
====================================================================