When trying to import AD Users/Groups the domains don't resolve and loading screen does not disappear 1355 0x54b ERROR_NO_SUCH_DOMAIN

How to import AD Users/Groups when the domains can not be resolved and loading screen does not disappear 1355 0x54b ERROR_NO_SUCH_DOMAIN

Problem


When trying to import AD Users/Groups the domains don't resolve and loading screen does not disappear.

The following error message appears in the Orchestrator EventViewer Application log.
UiPath.Orchestrator.Core.Exceptions.BadRequestException: Error code - 1413, Message - 'The user is not a member of the specified AD domain.' ---> System.DirectoryServices.ActiveDirectory.ActiveDirectoryServerDownException: The specified domain either does not exist or could not be contacted.
Name: "DOMAINNAME"
   at DomainControllerInfo System.DirectoryServices.ActiveDirectory.Locator.GetDomainControllerInfo(string computerName, string domainName, string siteName, long flags)
   at bool System.DirectoryServices.ActiveDirectory.DirectoryContext.isCurrentForest()
   at string System.DirectoryServices.ActiveDirectory.DirectoryContext.GetServerName()
   at DirectoryEntry System.DirectoryServices.ActiveDirectory.DirectoryEntryManager.GetNewDirectoryEntry(string dn)
   at DirectoryEntry System.DirectoryServices.ActiveDirectory.DirectoryEntryManager.GetCachedDirectoryEntry(string distinguishedName)
   at string System.DirectoryServices.ActiveDirectory.DirectoryEntryManager.ExpandWellKnownDN(WellKnownDN dn)
   at string System.DirectoryServices.ActiveDirectory.DirectoryEntryManager.ExpandWellKnownDN(WellKnownDN dn)
   at ArrayList System.DirectoryServices.ActiveDirectory.Forest.GetDomains()
   at DomainCollection System.DirectoryServices.ActiveDirectory.Forest.get_Domains()
   at IReadOnlyList<DomainDto> UiPath.Orchestrator.Core.DirectoryService.ActiveDirectoryClient.GetDomains()+(string key) => { }
   at TValue Abp.Runtime.Caching.CacheExtensions.Get<TKey, TValue>(ICache cache, TKey key, Func<TKey, TValue> factory)+(string k) => { }
   at object Abp.Runtime.Caching.CacheBase.Get(string key, Func<string, object> factory)
   at TValue Abp.Runtime.Caching.CacheExtensions.Get<TKey, TValue>(ICache cache, TKey key, Func<TKey, TValue> factory)
   at IReadOnlyList<DomainDto> UiPath.Orchestrator.Core.DirectoryService.ActiveDirectoryClient.GetDomains()
   --- End of inner exception stack trace ---
   at IReadOnlyList<DomainDto> UiPath.Orchestrator.Core.DirectoryService.ActiveDirectoryClient.GetDomains()
   at IHttpActionResult UiPath.Web.Controllers.DirectoryServiceController.GetDomains()
   at object lambda_method(Closure, object, object[])
   at Func<object, object[], Task<object>> System.Web.Http.Controllers.ReflectedHttpActionDescriptor+ActionExecutor.GetExecutor(MethodInfo methodInfo)+(object instance, object[] methodParameters) => { }
   at Task<object> System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary<string, object> arguments, CancellationToken cancellationToken)
   at async Task<HttpResponseMessage> System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Api.Filters.MaintenanceFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Common.Filters.CancellationTokenFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Common.Filters.AuditExecutionFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> Abp.WebApi.Uow.AbpApiUowFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> Abp.WebApi.Validation.AbpApiValidationFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> Abp.WebApi.Auditing.AbpApiAuditFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Controllers.ActionFilterResult.ExecuteAsync(CancellationToken cancellationToken)
   at async Task<HttpResponseMessage> System.Web.Http.Filters.AuthorizationFilterAttribute.ExecuteAuthorizationFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Common.Authorization.UiApiAuthorizationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Common.Filters.OrganizationUnitValidationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> UiPath.Orchestrator.Web.Common.Authentication.UiApiAuthenticationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> Abp.WebApi.Security.AntiForgery.AbpAntiForgeryApiFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task<HttpResponseMessage>> continuation)
   at async Task<HttpResponseMessage> System.Web.Http.Controllers.AuthenticationFilterResult.ExecuteAsync(CancellationToken cancellationToken)
   at async Task<HttpResponseMessage> System.Web.Http.Controllers.ExceptionFilterResult.ExecuteAsync(CancellationToken cancellationToken)
System.DirectoryServices.ActiveDirectory.ActiveDirectoryServerDownException: The specified domain either does not exist or could not be contacted.

 

Validation

To validate the issue follow the steps below:

  1. Open a CMD on the Orchestrator machine

  2. Run the following command
     

    <pre class="ckeditor_codeblock">nltest /dsgetdc:DOMAINNAME</pre>
    </li><li style="margin-top: 4px;">
    <p style="margin: 0px;padding: 0px;">If it errors with<br>	&nbsp;</p>
    
    <pre class="ckeditor_codeblock">1355 0x54b ERROR_NO_SUCH_DOMAIN</pre>
    
    <p style="margin: 0px;padding: 0px;">it means either the DNS or Network is not resolving a Domain Controller for the domain</p>
    </li><li style="margin-top: 4px;">
    <p style="margin: 0px;padding: 0px;">Attempt to run it on a different machine, but on a different network with access to the domain. This will confirm the DNS is not the culprit if it is working and will give&nbsp;a DCHOSTNAME to validate the port on.</p>
    </li><li style="margin-top: 4px;">
    <p style="margin: 0px;padding: 0px;">If 4 is successful open a Powershell and run the following command<br>	&nbsp;</p>
    
    <pre class="ckeditor_codeblock">[adsi]”LDAP://DCHOSTNAME:389” </pre>
    
    <p style="margin: 0px;padding: 0px;">or telnet to check the port</p>
    </li><li style="margin-top: 4px;">
    <p style="margin: 0px;padding: 0px;">If it works on another server and not on the Orchestrator one it means the port 389 is blocked or communication via LDAP is blocked.</p>
    </li></ol>
    

    Solution


    Open Port 389 and allow LDAP communication between the Orchestrator server and DomainController of the domain.