locked
Problem importing data RRS feed

  • Question

  • We seem to be experiencing a problem importing data using CRM's built in facility.  Tried ito import a load of Leads but when you go to System Jobs it says that the Status is Waiting.  A few days later it's the state is the same.

     

    I've enabled Trace Logging on our server.  From the CRMWeb log I get the following message:

     

    Code Snippet

    [2008-03-20 13:35:47.1] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   11 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException, Boolean enableTrace)
     at ServerLocatorService.GetCrmUserIdFromDatabase(Guid organizationId, String authenticationInfo)
     at ServerLocatorService.GetCrmUserId(Guid organizationId, String authenticationInfo)
     at LocatorService.GetCrmUserId(Guid organizationId, String authenticationInfo)
     at SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo)
     at SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId)
     at InProcessCrmService.Execute(Object request)
     at PlatformCommand.ExecuteInternal()
     at ExecuteFetchCommand.Execute()
     at ApplicationQuery.GetViewData()
     at AppGridDataProvider.GetDataXml(QueryBuilder qb)
     at AppGridDataProvider.Execute()
     at AppGridUIProvider.Render(HtmlTextWriter output)
     at AppGridWebService.GetRefreshResponseHtml(IGridUIProvider uiProvider)
     at AppGridWebService.GetRefreshResponseXml(IGridDataProvider dataProvider, IGridUIProvider uiProvider)
     at AppGridWebService.Refresh(String gridXml)
     at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at LogicalMethodInfo.Invoke(Object target, Object[] values)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at ApplicationStepManager.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >Crm Exception: Message: User Was Not Found, ErrorCode: -2147220969

     

     

    And from the CRMAsyncService log I get the folllowing:

     

    Code Snippet

    [2008-03-20 13:33:06.2] Process:CrmAsyncService |Organization:82fab96d-6856-430f-812d-8737fe014e42 |Thread:    4 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Error | AsyncOperationCommand.Execute
    >Exception while trying to execute AsyncOperationId: {1363AE66-DAA9-480A-B6F4-B09C527264F4} AsyncOperationType: 12 - System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.Crm.SdkTypeProxy.CrmService.Execute(Request Request)
       at Microsoft.Crm.Asynchronous.SdkTypeProxyCrmServiceWrapper.Execute(Object request)
       at Microsoft.Crm.Asynchronous.DuplicateDetectionCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
       at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Asynchronous.PersistMatchCodeOperation.InternalExecute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent)

     

     

    It seems to allude to something to do with a User not being found.  Does anyone have any suggestions?  Seems to be happening with another couple of entities as well.

     

    Many thanks,

     

    Douglas

    Thursday, March 20, 2008 1:45 PM

Answers

  • Hi

     

    One thing you should look at is to see if the account that your Asynchronous Service runs under can authenticate with your SQL Server Service.  You might also want to look at something called a Service Principal Name (or SPN) which is required when you are running the SQL Server service under a non-local system account.  This, apparently, is required so that the SQL Server service account can allow clients to identify and authenticate the service using Kerberos authentication.  Sorry, I'm not an SQL Server expert by any means so a lot of this is beyond me.  For more information please see the following article:

     

    http://technet.microsoft.com/en-us/library/bb735885(TechNet.10).aspx

     

    Hope that helps,

     

    Douglas

    Thursday, June 19, 2008 9:37 AM

All replies

  • Hi.

     

    Is it consistent, when you try to import a single lead, do you get the same error?

    Does your file mapping contain all mandatory fields?

    Does this happen immediately or do you have to wait more then a few minutes?

     

    Adi

     

     

    Thursday, March 20, 2008 3:33 PM
  • We had a similar problem, turns out there was an & in the file name of the CSV being uploaded, after replacing it with and it worked fine.

     

    Thursday, March 20, 2008 4:14 PM
  • Many thanks to you both for your swift reply.  The problem is irrespective of whether we are trying to import a single entry or many.  I created a new data mapping with the mandatory fields included (Topic, Last Name & Company Name) but to no avail.  Soon after you set the import in motion it just seems to hang there and displays the Status "Waiting".

     

    There are no ampersands (&) in any of the fields let alone the name of the file.

     

    Can enter data manually no problems, just not import.  Perhaps I should try the data migration wizard instead but that may be overkill for this.

     

    Thanks again,

     

    Douglas

    Thursday, March 20, 2008 4:46 PM
  • Did you change the Microsoft CRM Asynchronous Processing Service Log on user? Is it a Well-known user like AUTHORITY\NetworkService or another user?

     

    Adi

     

    Thursday, March 20, 2008 5:42 PM
  • You do seem to have a user issue.  I guess you've checked the obvious stuff such as: using the right CRM organisation (if more than one), user is enabled for full access etc.

     

    The thing that is weird from your async log is that the user guid is all zeros. I'm not sure how this helps but it is odd.:

     

    Code Snippet
    2008-03-20 13:33:06.2] Process:CrmAsyncService |Organization:82fab96d-6856-430f-812d-8737fe014e42 |Thread:    4 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Error | AsyncOperationCommand.Execute
    >Exception while trying to execute AsyncOperationId: {1363AE66-DAA9-480A-B6F4-B09C527264F4} AsyncOperationType: 12 - System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

     

     

     

    Do check that the crm asynchronous service is up and running.

     

    I can't think of anything else. 

     

     

    Wednesday, March 26, 2008 9:36 AM
    Moderator
  • Any resolution to this issue? We are experiencing the exact same situation.

    thanks
    mads

    Wednesday, June 18, 2008 1:31 PM
  • Same problem here. Any help will be apreciated.

     

    Thanks in advance

    Adrian D. Garcia

     

     

    Wednesday, June 18, 2008 6:25 PM
  • first debug  http://blogs.msdn.com/benlec/archive/2008/03/04/crmdiagtool4-for-microsoft-crm-4-0-has-been-released.aspx

     

    also check your fields and mapping

     

    Regards,

    Imran

     

    Thursday, June 19, 2008 6:54 AM
    Moderator
  • Hi

     

    One thing you should look at is to see if the account that your Asynchronous Service runs under can authenticate with your SQL Server Service.  You might also want to look at something called a Service Principal Name (or SPN) which is required when you are running the SQL Server service under a non-local system account.  This, apparently, is required so that the SQL Server service account can allow clients to identify and authenticate the service using Kerberos authentication.  Sorry, I'm not an SQL Server expert by any means so a lot of this is beyond me.  For more information please see the following article:

     

    http://technet.microsoft.com/en-us/library/bb735885(TechNet.10).aspx

     

    Hope that helps,

     

    Douglas

    Thursday, June 19, 2008 9:37 AM