locked
Service Bus for Windows Server throws exception on farm configuration (wizard and Powershell) RRS feed

  • Question

  • I am having issues with installing the latest Service Bus for Windows bits.  The configuration wizard continually crashes on the New Farm Configuration page as soon as it tries to validate the service account user and password with the following crash information:

    Problem signature:
      Problem Event Name: CLR20r3
      Problem Signature 01: M5IL4IUBOFXDMX4GN4CG3WKPQFC0FQYW
      Problem Signature 02: 2.0.20922.0
      Problem Signature 03: 505e1b54
      Problem Signature 04: System.DirectoryServices
      Problem Signature 05: 4.0.30319.17929
      Problem Signature 06: 4ffa5bdb
      Problem Signature 07: 8e
      Problem Signature 08: 18
      Problem Signature 09: PSZQOADHX1U5ZAHBHOHGHLDGIY4QIXHX
      OS Version: 6.1.7601.2.1.0.274.10
      Locale ID: 1033
      Additional Information 1: b35a
      Additional Information 2: b35a3a62e109cdf932d08dbd19f168e5
      Additional Information 3: a28a
      Additional Information 4: a28a81bcedc49de2300ad0e7e13de03e

    Configuration through PowerShell also fails with the following error:

    PS C:\Program Files\Service Bus\1.0> New-SBFarm -SBFarmDBConnectionString "data
    source=localhost\sqlexpress;integrated security=true" -CertificateAutoGeneration
    Key $mycert -verbose
    New-SBFarm : The specified directory service attribute or value does not exist.
    At line:1 char:1
    + New-SBFarm -SBFarmDBConnectionString "data
    source=localhost\sqlexpress;integrate ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : NotSpecified: (:) [New-SBFarm], COMException
        + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Micr
       osoft.ServiceBus.Commands.NewSBFarm

    Stack Trace from event log:

    System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
       at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
       at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions options)
       at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry(DirectoryEntry entry)
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
       at Microsoft.ServiceBus.Commands.NewSBFarmBase.ProcessRecordImplementation()
       at Microsoft.ServiceBus.Commands.ServiceBusBaseCmdlet.ProcessRecord()

    I believe this may have something to do with permissions when accessing ActiveDirectory.  I am running the install and configuration as a local admin on the server but it's likely that I don't have whatever AD permissions the installer needs.

    I found the exact issue on StackOverflow @ stackoverflow.com/questions/12352484/service-bus-1-0-beta-new-sbfarm-the-specified-directory-service-attribute-or-v but there was not a solution there and he just ended up going to RabbitMQ.

    I have a sinking suspicion that this may be the root cause: http://blogs.msdn.com/b/dsadsi/archive/2009/08/28/getting-an-exception-the-specified-directory-service-attribute-or-value-does-not-exist-when-you-try-to-search-a-user-in-an-ad-container-using-system-directoryservices-accountmanagement-userprincipal-findbyidentity.aspx

    Does anybody have any ideas? Is a fix needed in the installer and PowerShell commands?

    • Edited by jschultz311 Wednesday, November 7, 2012 11:47 PM
    Wednesday, November 7, 2012 11:41 PM

Answers

  • Hello,

    Could you please create a C# console app (snippet below) and see if the output matches the user that you are providing to the configuration wizard

    static void Main(string[] args)
            {
                Console.WriteLine(UserPrincipal.Current.UserPrincipalName);
                Console.Read();
    
            }
    Regards

    Narasimhan

    Thursday, November 8, 2012 3:10 AM
  • Hello - It looks like we would have to fix it in a way where the container name is explicitly specified as called out by the earlier post in the thread and in the blog post - http://blogs.msdn.com/b/dsadsi/archive/2009/08/28/getting-an-exception-the-specified-directory-service-attribute-or-value-does-not-exist-when-you-try-to-search-a-user-in-an-ad-container-using-system-directoryservices-accountmanagement-userprincipal-findbyidentity.aspx

    In the meanwhile, is there another account that you could use to try.

    Apologies for the inconvenience.

    Thank you

    Tuesday, November 20, 2012 1:30 AM
  • Answers - the problem can be of two types:

    1. As explain early that can come from read rights on the active directory container "CN:=users".
      To solve this problem, ask to your domain administrator to give you read access on the "CN:=users" container.
    2. The second problem depends on the Active Directory configuration. By default the container for the user is define under the “CN:=users” node.  This default value is defined in the “wellKnownsObjects” attribute of the domain component (see http://msdn.microsoft.com/en-us/library/cc223663.aspx).
      Sometimes as a recommendation, the AD is configured to create the users under another container, e.g. an organization unit (OU).  In this case probably the default well-known user container is not updated to the new users’ container.
      To solve this problem,  ask to the domain administrator to change the default container names

    Why these behaviors?
    The Powershell cmdlets of the service bus (e.g. New-SBNamespace), uses the System.DirectoryServices.AccountManagement.PrincipalContext class without define a container (look with ILSpy or Reflector in the Microsoft.ServiceBus.Commands.dll assembly). So when the cmdlet try to find a user (via the Principal.FindByIdentity API), they will look in the default well-known container and so if that is not well defined this call will return this exception: System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist.

    In a next version of the SB, I think it will be comfortable that the SB cmdlets lets define a custom container in their parameters.

    Ref: See MSDN library, PrincipalContext and Principal, classes.

    • Proposed as answer by tsca Wednesday, May 8, 2013 10:46 AM
    • Marked as answer by jschultz311 Friday, May 10, 2013 4:32 AM
    Wednesday, May 8, 2013 10:14 AM

All replies

  • Hello!

    If the Install and Configuration is run as Local Admin on the Server - and No Run as account is specified, then Configuration assumes that the Local Admin to be the RunAs User and hence Ideally, there shouldn't have been  an Issue with AD.

    For us to be able to dig deeper - Can you please provide with more event logs @: EventVwr > Applications and Services logs > Microsoft-ServiceBus > Admin. Please provide all the events info (just the General Detail part) from Event ID : 61501 (New-SBFarm: Started) till the above exception. + Any suspicious Windows Application Logs at that Time.

    HTH!

    Thursday, November 8, 2012 12:55 AM
  • Thanks for the response.  I'm really excited about this solution and just trying to get this installed to try it out.  I have included the 3 relevant messages from the event log below (61501 start message, then 61502 which has the stack trace, and then 61501 which says it failed).

    I also included an event from the Application log which occurred when the GUI configuration tool crashed which has another stack.

    Log Name:      Microsoft-ServiceBus/Admin
    Source:        Microsoft-ServiceBus
    Date:          11/7/2012 3:26:00 PM
    Event ID:      61501
    Task Category: (4033)
    Level:         Information
    Keywords:      
    User:          <snip>
    Computer:      <snip>
    Description:
    New-SBFarm: Started
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceBus" Guid="{3D05219E-3959-41C4-A2A7-EA6CA5B5C257}" />
        <EventID>61501</EventID>
        <Version>0</Version>
        <Level>4</Level>
        <Task>4033</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2012-11-07T23:26:00.214812400Z" />
        <EventRecordID>25</EventRecordID>
        <Correlation ActivityID="{01908C40-F800-0000-6DD2-C98E1CBDCD01}" />
        <Execution ProcessID="720" ThreadID="3992" />
        <Channel>Microsoft-ServiceBus/Admin</Channel>
        <Computer><snip></Computer>
        <Security UserID="S-1-5-21-945540591-4024260831-3861152641-38608" />
      </System>
      <EventData>
        <Data Name="message">New-SBFarm: Started</Data>
      </EventData>
    </Event>

    Log Name:      Microsoft-ServiceBus/Admin
    Source:        Microsoft-ServiceBus
    Date:          11/7/2012 3:26:00 PM
    Event ID:      61502
    Task Category: (4032)
    Level:         Error
    Keywords:      
    User:          <snip>
    Computer:      <snip>
    Description:
    System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
       at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
       at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions options)
       at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry(DirectoryEntry entry)
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
       at Microsoft.ServiceBus.Commands.NewSBFarmBase.ProcessRecordImplementation()
       at Microsoft.ServiceBus.Commands.ServiceBusBaseCmdlet.ProcessRecord()
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceBus" Guid="{3D05219E-3959-41C4-A2A7-EA6CA5B5C257}" />
        <EventID>61502</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>4032</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2012-11-07T23:26:00.324193000Z" />
        <EventRecordID>26</EventRecordID>
        <Correlation ActivityID="{01908C40-F800-0000-6DD2-C98E1CBDCD01}" />
        <Execution ProcessID="720" ThreadID="3992" />
        <Channel>Microsoft-ServiceBus/Admin</Channel>
        <Computer><snip></Computer>
        <Security UserID="S-1-5-21-945540591-4024260831-3861152641-38608" />
      </System>
      <EventData>
        <Data Name="message">System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
       at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
       at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions options)
       at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry(DirectoryEntry entry)
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
       at Microsoft.ServiceBus.Commands.NewSBFarmBase.ProcessRecordImplementation()
       at Microsoft.ServiceBus.Commands.ServiceBusBaseCmdlet.ProcessRecord()</Data>
      </EventData>
    </Event>

    Log Name:      Microsoft-ServiceBus/Admin
    Source:        Microsoft-ServiceBus
    Date:          11/7/2012 3:26:00 PM
    Event ID:      61501
    Task Category: (4033)
    Level:         Information
    Keywords:      
    User:          <snip>
    Computer:      <snip>
    Description:
    New-SBFarm: Failed
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-ServiceBus" Guid="{3D05219E-3959-41C4-A2A7-EA6CA5B5C257}" />
        <EventID>61501</EventID>
        <Version>0</Version>
        <Level>4</Level>
        <Task>4033</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2012-11-07T23:26:00.324193000Z" />
        <EventRecordID>27</EventRecordID>
        <Correlation ActivityID="{01908C40-F800-0000-6DD2-C98E1CBDCD01}" />
        <Execution ProcessID="720" ThreadID="3992" />
        <Channel>Microsoft-ServiceBus/Admin</Channel>
        <Computer><snip></Computer>
        <Security UserID="S-1-5-21-945540591-4024260831-3861152641-38608" />
      </System>
      <EventData>
        <Data Name="message">New-SBFarm: Failed</Data>
      </EventData>
    </Event>

    Error when the GUI crashes

    Log Name:      Application
    Source:        .NET Runtime
    Date:          11/7/2012 3:33:09 PM
    Event ID:      1026
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      QSWATESB.na.qualcomm.com
    Description:
    Application: Microsoft.ServiceBus.ConfigWizard.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Runtime.InteropServices.COMException
    Stack:
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(System.DirectoryServices.AccountManagement.PrincipalContext, System.Type, System.Nullable`1<System.DirectoryServices.AccountManagement.IdentityType>, System.String, System.DateTime)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(System.DirectoryServices.AccountManagement.PrincipalContext, System.String)
       at Microsoft.ServiceBus.Commands.Common.SecurityHelper.IsUserValid(System.DirectoryServices.AccountManagement.PrincipalContext, System.String)
       at Microsoft.ServiceBus.Commands.Common.SecurityHelper.IsDomainUserValid(System.String, System.String)
       at Microsoft.ServiceBus.Commands.Common.ValidateUserAttribute.Validate(System.String)
       at Microsoft.Deployment.ConfigWizard.UICommon.AccountDetailsViewModel.ValidateDomainPassword()
       at Microsoft.Deployment.ConfigWizard.UICommon.AccountDetailsControl.PasswordTextBox_LostFocus(System.Object, System.EventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.Controls.PasswordBox.OnLostFocus(System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.IsFocused_Changed(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.Controls.PasswordBox.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
       at System.Windows.DependencyObject.ClearValueCommon(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata)
       at System.Windows.DependencyObject.ClearValue(System.Windows.DependencyPropertyKey)
       at System.Windows.Input.FocusManager.OnFocusedElementChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
       at System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
       at System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
       at System.Windows.FrameworkElement.OnGotKeyboardFocus(System.Object, System.Windows.Input.KeyboardFocusChangedEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.KeyboardDevice.ChangeFocus(System.Windows.DependencyObject, Int32)
       at System.Windows.Input.KeyboardDevice.Focus(System.Windows.DependencyObject, Boolean, Boolean, Boolean)
       at System.Windows.Input.KeyboardDevice.Focus(System.Windows.IInputElement)
       at System.Windows.UIElement.Focus()
       at System.Windows.Documents.TextEditorMouse.MoveFocusToUiScope(System.Windows.Documents.TextEditor)
       at System.Windows.Documents.TextEditorMouse.OnMouseDown(System.Object, System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run()
       at Microsoft.ServiceBus.ConfigWizard.App.Main()

    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name=".NET Runtime" />
        <EventID Qualifiers="0">1026</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2012-11-07T23:33:09.000000000Z" />
        <EventRecordID>1660</EventRecordID>
        <Channel>Application</Channel>
        <Computer>QSWATESB.na.qualcomm.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>Application: Microsoft.ServiceBus.ConfigWizard.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Runtime.InteropServices.COMException
    Stack:
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(System.DirectoryServices.AccountManagement.PrincipalContext, System.Type, System.Nullable`1&lt;System.DirectoryServices.AccountManagement.IdentityType&gt;, System.String, System.DateTime)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(System.DirectoryServices.AccountManagement.PrincipalContext, System.String)
       at Microsoft.ServiceBus.Commands.Common.SecurityHelper.IsUserValid(System.DirectoryServices.AccountManagement.PrincipalContext, System.String)
       at Microsoft.ServiceBus.Commands.Common.SecurityHelper.IsDomainUserValid(System.String, System.String)
       at Microsoft.ServiceBus.Commands.Common.ValidateUserAttribute.Validate(System.String)
       at Microsoft.Deployment.ConfigWizard.UICommon.AccountDetailsViewModel.ValidateDomainPassword()
       at Microsoft.Deployment.ConfigWizard.UICommon.AccountDetailsControl.PasswordTextBox_LostFocus(System.Object, System.EventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.Controls.PasswordBox.OnLostFocus(System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.IsFocused_Changed(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.Controls.PasswordBox.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
       at System.Windows.DependencyObject.ClearValueCommon(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata)
       at System.Windows.DependencyObject.ClearValue(System.Windows.DependencyPropertyKey)
       at System.Windows.Input.FocusManager.OnFocusedElementChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
       at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
       at System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
       at System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
       at System.Windows.FrameworkElement.OnGotKeyboardFocus(System.Object, System.Windows.Input.KeyboardFocusChangedEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.KeyboardDevice.ChangeFocus(System.Windows.DependencyObject, Int32)
       at System.Windows.Input.KeyboardDevice.Focus(System.Windows.DependencyObject, Boolean, Boolean, Boolean)
       at System.Windows.Input.KeyboardDevice.Focus(System.Windows.IInputElement)
       at System.Windows.UIElement.Focus()
       at System.Windows.Documents.TextEditorMouse.MoveFocusToUiScope(System.Windows.Documents.TextEditor)
       at System.Windows.Documents.TextEditorMouse.OnMouseDown(System.Object, System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run()
       at Microsoft.ServiceBus.ConfigWizard.App.Main()
    </Data>
      </EventData>
    </Event>

    It looks to me like there is a PrincipalOperationException being thrown during LocalGroup creation in NewSBFarmBase (when attempting in PowerShell) but in the catch block, another exception is being thrown when accessing UserPrincipal.Current that eats the initial exception and causes the command to crash.  So we can't see what the first real exception was because of the second exception in the catch block.  After some back-tracing, I think the error I was supposed to get was "GroupAddingLocalUserWarning" which is "GroupAddingLocalUserWarning=Failure in adding {0} user in the local group {1}. Please add the user manually." but it doesn't look the PrincipalOperationException information was being printed out anywhere so I can't see what the original exception was about.

    I can't quite tell what the local group name is supposed to be though.  I checked and my domain account is already a member of WindowsFabricAdministrators local group so I don't know if there is another group that I could try to create and manually add myself to to avoid this error.

    My best guess is that the creation of the PrincipalContext in CreateLocalGroup should specify an initial container because otherwise it will try to use the CN=Computers container and I probably don't have permissions to that.  It's a huge guess but seems to somewhat fit.

    I'd be happy to try out any test code you have.  I may try to track somebody down with elevated AD permissions to see if that helps but it doesn't seem from what I'm doing that this should be required.  I might even see if I can convince somebody to give me read access to the CN=Computers container to test my theory but I'm not holding my breath.

    Thanks again for the help!

    Thursday, November 8, 2012 2:25 AM
  • Hello,

    Could you please create a C# console app (snippet below) and see if the output matches the user that you are providing to the configuration wizard

    static void Main(string[] args)
            {
                Console.WriteLine(UserPrincipal.Current.UserPrincipalName);
                Console.Read();
    
            }
    Regards

    Narasimhan

    Thursday, November 8, 2012 3:10 AM
  • Throws exactly the same exception.  Good test.  I'll keep digging.

    PS C:\Users\jschultz\Desktop> .\UserPrincipalTest.exe

    Unhandled Exception: System.Runtime.InteropServices.COMException: The specified
    directory service attribute or value does not exist.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
       at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(Director
    yEntry de)
       at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry
     ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions o
    ptions)
       at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextF
    romDirectoryEntry(DirectoryEntry entry)
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirector
    yInitNoContainer()
       at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()

       at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
       at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()

       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTyp
    eHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, S
    tring identityValue, DateTime refDate)
       at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTyp
    e(PrincipalContext context, Type principalType, IdentityType identityType, Strin
    g identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(Pr
    incipalContext context, IdentityType identityType, String identityValue)
       at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
       at UserPrincipalTest.Program.Main(String[] args)

    Thursday, November 8, 2012 3:57 AM
  • Hello

    I wanted to check back if you have got past the error.

    Regards

    Narasimhan

    Tuesday, November 13, 2012 7:00 PM
  • No, still no ideas why UserPrincipal.Current throws a COMException on this machine.  None of the documentation indicates that this is an expected exception and I can't really find any other references as to why this would happen.  As it is, I'm still unable to install Service Bus on my VM.
    Wednesday, November 14, 2012 2:11 AM
  • I get exactly the same error. I was trying to install Service Bus on severall machines with the same result. The Console programm above creates the same result for me as well. I keep looking...

    Ulrich

    Wednesday, November 14, 2012 10:02 AM
  • I will follow-up and get back with a response.

    Thanks!

    Wednesday, November 14, 2012 3:37 PM
  • Hello - Can you please review this article, perform the actions listed and let me know if the issue resolves?

    http://support.microsoft.com/kb/331651

    Thanks!

    Thursday, November 15, 2012 11:38 PM
  • I checked the UPN for my user and it is set correctly. I removed and reentered the value and ran the setup again with the same result - it crashed with the COMException.

    I can confirm that other users in the same domain can execute the setup without issues. Not sure where to look next.

    Update: I was playing with your console code a bit.

    This does not work:            

            Console.WriteLine(UserPrincipal.Current.UserPrincipalName);
    

    this too does not work:

    	var userName = "<my username without domain>";
    	var context = new PrincipalContext(ContextType.Domain);
    			Console.WriteLine(UserPrincipal.FindByIdentity(context, userName).UserPrincipalName);
    
    But this does work:
    	var userName = "<my username without domain>";
    	var context = new PrincipalContext(ContextType.Domain, "<my domain>", "<my container>", ContextOptions.Negotiate); 
    	Console.WriteLine(UserPrincipal.FindByIdentity(context, userName).UserPrincipalName);
    

    I compared my User AD settings with other users but did not find any special differences



    • Edited by sigristU Friday, November 16, 2012 3:37 PM
    Friday, November 16, 2012 11:49 AM
  • Yeah, the link I posted earlier pointed to explicitly setting the container as one possible solution to this error.  The problem is that it looks like the service bus installer is trying to get a "Machine" ContextType as opposed to a domain ContextType.  But the API does not support specifying an explicit container for the Machine ContextType so I'm not sure this could be a potential solution for the installer.

    It seems like this symptom could be on the right track though.  Something to do with no read permissions on some form of default container.  I don't really know much about AD or this API so I could be off base.

    As it stands now, I'm still stuck but it's interesting to see that others are having this same problem.

    Monday, November 19, 2012 5:48 AM
  • Hello - It looks like we would have to fix it in a way where the container name is explicitly specified as called out by the earlier post in the thread and in the blog post - http://blogs.msdn.com/b/dsadsi/archive/2009/08/28/getting-an-exception-the-specified-directory-service-attribute-or-value-does-not-exist-when-you-try-to-search-a-user-in-an-ad-container-using-system-directoryservices-accountmanagement-userprincipal-findbyidentity.aspx

    In the meanwhile, is there another account that you could use to try.

    Apologies for the inconvenience.

    Thank you

    Tuesday, November 20, 2012 1:30 AM
  • I checked the article you linked with our sysadmin and he granted my user read permission on the  CN=Users container and now the test code from above and the Service Bus Setup are working. I'm no AD specialist by any means and do not know about the implications of this - but my problem is solved and I can start playing with MS Service Bus.

    Thank you

    Tuesday, November 20, 2012 2:19 PM
  • This is great to hear. Please post any questions or issues you have and we will on hand to help you out.

    Best Regards

    Narasimhan

    Tuesday, November 20, 2012 4:04 PM
  • We're running into the same issue as the original poster.

    PS C:\Program Files\Service Bus\1.0> $mycert=ConvertTo-SecureString -string SomePasswordHere -force -AsPlainText; New-SBFarm -SBFarmDBConnectionString 'Data Source=qctdb03\dev;Integrated Security=True' -RunAsAccount na\qctmqsvc -AdminGroup qctmq01\servicebusadmins -CertificateAutoGenerationKey $mycert

    New-SBFarm : Cannot validate argument on parameter 'RunAsAccount'. The specified directory service attribute or value does not exist.

    At line:1 char:175

    + ...  -RunAsAccount na\qctmqsvc -AdminGroup qctmq01\servicebusadmins

    -CertificateAuto ...

    +                    ~~~~~~~~~~~

        + CategoryInfo          : InvalidData: (:) [New-SBFarm], ParameterBindingV

       alidationException

        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Servi

       ceBus.Commands.NewSBFarm

    From reading the original thread, it sounds like the bug has been identified.  Do you have a timeline as to when a fix will be released?

    thanks
    matt


    --- Matthew Swanson Windows Server 2003 MCSE

    • Proposed as answer by tsca Wednesday, May 8, 2013 6:19 AM
    Wednesday, December 5, 2012 9:22 PM
  • Answers - the problem can be of two types:

    1. As explain early that can come from read rights on the active directory container "CN:=users".
      To solve this problem, ask to your domain administrator to give you read access on the "CN:=users" container.
    2. The second problem depends on the Active Directory configuration. By default the container for the user is define under the “CN:=users” node.  This default value is defined in the “wellKnownsObjects” attribute of the domain component (see http://msdn.microsoft.com/en-us/library/cc223663.aspx).
      Sometimes as a recommendation, the AD is configured to create the users under another container, e.g. an organization unit (OU).  In this case probably the default well-known user container is not updated to the new users’ container.
      To solve this problem,  ask to the domain administrator to change the default container names

    Why these behaviors?
    The Powershell cmdlets of the service bus (e.g. New-SBNamespace), uses the System.DirectoryServices.AccountManagement.PrincipalContext class without define a container (look with ILSpy or Reflector in the Microsoft.ServiceBus.Commands.dll assembly). So when the cmdlet try to find a user (via the Principal.FindByIdentity API), they will look in the default well-known container and so if that is not well defined this call will return this exception: System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist.

    In a next version of the SB, I think it will be comfortable that the SB cmdlets lets define a custom container in their parameters.

    Ref: See MSDN library, PrincipalContext and Principal, classes.

    • Proposed as answer by tsca Wednesday, May 8, 2013 10:46 AM
    • Marked as answer by jschultz311 Friday, May 10, 2013 4:32 AM
    Wednesday, May 8, 2013 10:14 AM