TLDR
I can't add a new Service Control instance if I have the Azure Cosmos Db Emulator installed.
The Story:
This one's a bit weird and took us a while to get to the bottom of, so I think it's worth raising as an FYI.
I was trying to add a new instance and got the following exception:
System.ArgumentException: UrlAcl is invalid
at ServiceControlInstaller.Engine.UrlAcl.UrlReservation..ctor(String url, SecurityIdentifier[] securityIdentifiers) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControlInstaller.Engine\UrlAcl\UrlReservation.cs:line 49
at ServiceControlInstaller.Engine.UrlAcl.UrlReservation.GetAll() in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControlInstaller.Engine\UrlAcl\UrlReservation.cs:line 149
at ServiceControlInstaller.Engine.Instances.ServiceControlNewInstance.CheckForConflictingUrlAclReservations() in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControlInstaller.Engine\Instances\ServiceControlNewInstance.cs:line 276
at ServiceControlInstaller.Engine.Instances.ServiceControlNewInstance.Validate(Func`2 promptToProceed) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControlInstaller.Engine\Instances\ServiceControlNewInstance.cs:line 252
at ServiceControl.Config.Framework.Modules.ServiceControlInstanceInstaller.Add(ServiceControlNewInstance details, IProgress`1 progress, Func`2 promptToProceed) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControl.Config\Framework\Modules\InstallerModule.cs:line 41
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ServiceControl.Config.UI.InstanceAdd.ServiceControlAddAttachment.<Add>d__6.MoveNext() in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControl.Config\UI\InstanceAdd\ServiceControlAddAttachment.cs:line 85
After a bit of digging I found that when creating a new Service Control instance it loads a list of the UrlAcl entries and compares them to a Regex statement.
So I ran the following command to see a list of UrlAcl entries on my machine:
netsh http show urlacl
I have the Azure Cosmos Db Emulator running on my machine which adds many of these UrlAcl entries of the format:
There about 10 of them but I have just included one for reference. In order to be able to add the new Service Control instance I had to manually remove all of the DocDbService UrlAcl entries and then it worked.
For reference, you can remove the UrlAcl entries using:
My suspicion is that the regex doesn't handle this format of URL.
This could be a problem with the Cosmos Db Emulator but I think there might be a chance that other software could add URL s in this format. So it might be useful to either extend the regex to handle this or give a more specific message that indicates that it is not the URL that you are adding causing the problem but the reserved URLs already on the machine causing the problem.
Steps to Replicate
Install the Azure Cosmos DB emulator. ( iused choclately cinst azure-documentdb-emulator -y)
Install the Particular Software installer, Install Service Control and try and add a new Service Control Instance. I am using Azure Service Bus as a transport instance.
TLDR I can't add a new Service Control instance if I have the Azure Cosmos Db Emulator installed.
The Story: This one's a bit weird and took us a while to get to the bottom of, so I think it's worth raising as an FYI.
I was trying to add a new instance and got the following exception:
After a bit of digging I found that when creating a new Service Control instance it loads a list of the UrlAcl entries and compares them to a Regex statement.
So I ran the following command to see a list of UrlAcl entries on my machine:
I have the Azure Cosmos Db Emulator running on my machine which adds many of these UrlAcl entries of the format:
Note the double semi-colon in the Reserved Url.
There about 10 of them but I have just included one for reference. In order to be able to add the new Service Control instance I had to manually remove all of the DocDbService UrlAcl entries and then it worked.
For reference, you can remove the UrlAcl entries using:
My suspicion is that the regex doesn't handle this format of URL.
This could be a problem with the Cosmos Db Emulator but I think there might be a chance that other software could add URL s in this format. So it might be useful to either extend the regex to handle this or give a more specific message that indicates that it is not the URL that you are adding causing the problem but the reserved URLs already on the machine causing the problem.
Steps to Replicate