locked
Trace is disabled but still receiving an error in Application log for eventid 17204 CrmTrace encountered an error RRS feed

  • Question

  • Hello!

    I am receiving an error occassionaly in the server application log for MSCRMTracing with EventID 17204.

    Our platform is Windows Server 2008R2 with CRM 2011 and UR6. Upgraded from CRM 4.0.

    The details are: CRMTrace encountered an error. AdditionalInfo:Error in GetFileName: Error accessing file C:\CRMDROP\LOGS\<serverName>-w3wp(476#7991B5E8)-CRMWeb-20120326-1.log (ReportingProcess:w3wp, AppDomain:C:\Program Files\Microsoft Dynamics CRM\CRMWeb\)

    We can access CRM okay, and everything appears to be okay with the following exceptions:

    We recieve an alert around the same time from SCOM that MSCRM Performance counters were not able to be loaded for CRM Server and CRM platform.

    If I check in Perfmon, and both Server and Platform counters are available so I look and I see that there is an event from WAS that the worker processes for the app pool were recycled.

    Tracing is truned off in the registry.

    The processes have been restarted and the errors have been going on for some time.

    Any help or information provided will be appreciated.

    Thank You,

    Chris

    Monday, March 26, 2012 5:44 PM

All replies

  • Do you use plugins?

    You might have custom trace enabled via this plugins.

    Tuesday, March 27, 2012 12:40 PM
  • Did you happen to find a resolution to this? We have the same problem after installing UR 6. We also upgraded from 4.0 and are running R2.
    Wednesday, April 11, 2012 3:44 PM
  • No, not yet. I had to stop looking at it, as the server appears to be working okay.

    Unfortunately I do not have the expertise to review the plugins as we are using them, but our software engineer is stating that there is nothing in the code that he is aware of that would call a custom trace.

    I have yet to turn on tracing to see if I can find the errors in the quagmire.

    I will post if I find something.

    Wednesday, April 11, 2012 3:48 PM
  • UPDATE:

    I had created the directory it was looking for. Now there are trace files in there. Now we are getting 17203 Event Errors.

    Invalid Trace Directory. Additional Info:[ Unable to Write file , Trace directory not defined (Reporting Process:File Name is Null. LocalTraceSettings: {Filename:  ,FileCountSuffix:1 ,TraceFileSize:10485760 ,TraceDirectory: ,TracingCallStack:Yes ,IsTracingOff:No ,LoadState:LoadSuccessfulUnreported ,RefreshTraceInt:-1 ,SiteWideRefreshTraceInt:-1 ,RegistryRefreshTraceInt:2 ,Precedence:Organization} ] , AppDomain:CrmAsyncService)

    It must be something in the plugins. I am guessing tracing is on and missing a variable for the directory.

    G. Kjono -- Are you guys using plugins as well?

    Wednesday, April 11, 2012 3:56 PM
  • We have 1 plug-in in that environment that just copies data for a dashboard.

    I did look and we have been getting the 17203 errors as well, but we've been getting them for a while. I just created that directory, and it created two empty log files, ServerName-CrmAsyncService(Server#1452#7C794E46)-bin-20120411-1.log and ServerName-w3wp(3116#5D80F75C)-CRMWeb-20120411-1.log

    We have been having more problems with ours however. I noticed that after I get this error, users start getting 404 errors until I reset IIS and the following message gets logged in the application event log.

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          4/2/2012 10:15:39 AM
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      ServerName.Domain.local
    Description:
    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 4/2/2012 10:15:39 AM
    Event time (UTC): 4/2/2012 3:15:39 PM
    Event ID: 0e61942e7edd41e081080d7929aec906
    Event sequence: 4
    Event occurrence: 3
    Event detail code: 0
     
    Application information:
        Application domain: /LM/W3SVC/1/ROOT-1-129778300967203815
        Trust level: Full
        Application Virtual Path: /
        Application Path: D:\Program Files\Microsoft Dynamics CRM\CRMWeb\
        Machine name: ServerName
     
    Process information:
        Process ID: 5164
        Process name: w3wp.exe
        Account name: DOMAIN/ServiceAccount

    Exception information:
        Exception type: CrmSecurityException
        Exception message: Could not find GUID for : ServerName$ with SearchFilter: samAccountName
       at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)
       at Microsoft.Crm.SecurityUtils.GetLocalSystemGuid()
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)

    Logon failure: unknown user name or bad password.

       at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
       at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)
       at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)

    Logon failure: unknown user name or bad password.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_AdsObject()
       at System.DirectoryServices.PropertyValueCollection.PopulateList()
       at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
       at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
       at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)

     
     
    Request information:
        Request URL: https://ServerName.Domain.com:443/default.aspx
        Request path: /default.aspx
        User host address: 10.0.0.1

        User: Domain\user

        Is authenticated: True
        Authentication Type: Negotiate
        Thread account name: Domain\ServiceAccount

     
    Thread information:
        Thread ID: 70
        Thread account name: Domain\ServiceAccount

        Is impersonating: False
        Stack trace:    at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)
       at Microsoft.Crm.SecurityUtils.GetLocalSystemGuid()
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
     
     
    Custom event details:

    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="ASP.NET 4.0.30319.0" />
        <EventID Qualifiers="32768">1309</EventID>
        <Level>3</Level>
        <Task>3</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2012-04-02T15:15:39.000Z" />
        <EventRecordID>619269</EventRecordID>
        <Channel>Application</Channel>
        <Computer>ServerName.Domain.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>3005</Data>
        <Data>An unhandled exception has occurred.</Data>
        <Data>4/2/2012 10:15:39 AM</Data>
        <Data>4/2/2012 3:15:39 PM</Data>
        <Data>0e61942e7edd41e081080d7929aec906</Data>
        <Data>4</Data>
        <Data>3</Data>
        <Data>0</Data>
        <Data>/LM/W3SVC/1/ROOT-1-129778300967203815</Data>
        <Data>Full</Data>
        <Data>/</Data>
        <Data>D:\Program Files\Microsoft Dynamics CRM\CRMWeb\</Data>
        <Data>ServerName</Data>
        <Data>
        </Data>
        <Data>5164</Data>
        <Data>w3wp.exe</Data>
        <Data>Domain\ServiceAccount</Data>
        <Data>CrmSecurityException</Data>
        <Data>Could not find GUID for : ServerName$ with SearchFilter: samAccountName
       at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)
       at Microsoft.Crm.SecurityUtils.GetLocalSystemGuid()
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)

    Logon failure: unknown user name or bad password.

       at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
       at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)
       at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)

    Logon failure: unknown user name or bad password.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_AdsObject()
       at System.DirectoryServices.PropertyValueCollection.PopulateList()
       at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
       at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
       at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)

    </Data>
        <Data>https://Servername.Domain.com:443/default.aspx</Data>
        <Data>/default.aspx</Data>
        <Data>10.0.0.2</Data>
        <Data>Domain\User</Data>
        <Data>True</Data>
        <Data>Negotiate</Data>
        <Data>Domain\ServiceAccount</Data>
        <Data>70</Data>
        <Data>Domain\ServiceAccount</Data>
        <Data>False</Data>
        <Data>   at Microsoft.Crm.SecurityUtils.GetGuid(String searchItem, String searchFilter, String searchItemLogInfo, Boolean exceptionIfNotfound)
       at Microsoft.Crm.SecurityUtils.GetLocalSystemGuid()
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
    </Data>
      </EventData>
    </Event>

    Wednesday, April 11, 2012 8:33 PM
  • Looking at that plug-in, this is all we see that references traces

    tracingService.Trace("Create Activity Plugin");
                        throw new InvalidPluginExecutionException("An error occurred in the CreateActivityRollupPlugin plug-in.", ex);

    Wednesday, April 11, 2012 8:58 PM
  • We get the same asp.net errors as well. My suspicion has been the plugins for that error but I cannot prove it.

    It sounds like your Async servcie is stopping.

    In our test environment one server was bombing the async when the network hiccuped. I had to set the service's recovery options to Restart the Service for all failures. This way the servcie would auto start if someone else did something without my knowledge.

    Wednesday, April 11, 2012 8:59 PM
  • The service was still running, and originally I thought that may be related because we had issues with async in some environments when we were on 4.0. I looked the last couple days, and we haven't gotten those errors at all since I created the C:\CRMDROP\LOGS\ directories. I have a scheduled job to restart IIS every morning to try and mitigate the impact of the 404's. I think I'll stop that for a few days and see if we still get the 404 errors now that the above errors aren't showing up anymore.
    Friday, April 13, 2012 3:39 PM
  • Hi Chris!

    Try this in the powershell

    PS > Add-PSSnapin Microsoft.Crm.PowerShell

    PS > $trace = Get-CrmSetting TraceSettings

    PS > $trace.Enabled = 1

    PS > Set-CrmSetting $trace

    To turn off tracing, run the following commands from the Windows PowerShell console:

    PS > Add-PSSnapin Microsoft.Crm.PowerShell

    PS > $trace = Get-CrmSetting TraceSettings

    PS > $trace.Enabled = 0

    PS > Set-CrmSetting $trace

    I Hope this information is helpful.

    Friday, April 13, 2012 7:56 PM
  • OK, now I started getting those 17203 errors as well. Maybe because we rebooted this weekend after patching. I haven't gotten any of the 404's since the last change though.

    I did try the powershell command that Adriano Chaves offered, but I got an error

    Get-CrmSetting : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure ch
    annel.
    At line:1 char:24
    + $trace = Get-CrmSetting <<<<  TraceSettings
        + CategoryInfo          : NotSpecified: (:) [Get-CrmSetting], WebException
        + FullyQualifiedErrorId : System.Net.WebException,Microsoft.Crm.PowerShell.GetCrmSettingCmdlet

    I enabled straight HTTP and tried it, but got the same powershell error. I'll try to get to the bottom of that when I have more time, just thought I would throw out an update for now.

    Thursday, April 19, 2012 3:27 PM
  • Hi,

    G. Kjono, do you have more than 1 binding on CRM site?

    Monday, April 23, 2012 6:00 PM
  • We have got the same issue here, upgraded from 4.0 to 2011.

    Anymore suggestions?


    it's all very nice when it works

    Monday, June 11, 2012 9:54 AM
  • If you look at this KB entry:

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

    it says:

    "When you create a trace in Microsoft Dynamics CRM 4.0 or Microsoft Dynamics CRM 2011, the TraceDirectory registry key is ignored. For tracing on the Microsoft Dynamics CRM 4.0 server and the Microsoft Dynamics CRM 2011 server, the trace log file is created in the following folder:

    <var>Drive</var>:\Program Files\Microsoft Dynamics CRM\Trace"

    However this seems not to be the case. The default value for the trace log is C:\CRMDROP\LOGS\ and it appears that CRM 2011 tries to use this location even though it does not exist.

    I fixed this by setting the value of the Directory to what CRM 2011 is expecting, ie. the folder in Program Files mentioned above. I used PowerShell, again as described in the KB above. This works because the install has already created the folder with the correct permissions.

    Tim

    • Proposed as answer by nrodriEditor Monday, June 11, 2012 10:50 PM
    Monday, June 11, 2012 10:48 PM
  • I'm getting this on a completely new, vanilla install of CRM 2011 UR6 (&UR8) on Windows 2008 R2 and SQL 2012.

    Simon Hetzel Microsoft Dynamics CRM Consultancy Microsoft Server/Infrastructure Architecture http://uk.linkedin.com/in/simonhetzel

    Saturday, July 14, 2012 12:12 PM
  • Doing the following seemed to work for us;

    Removed the diagnostics code that we had placed in C:\Program Files\Microsoft Dynamics CRM\Server\bin\CrmAsyncService.exe.config and then restarted the CRM Async Services.


    Friday, November 23, 2012 6:33 AM
  • Adriano's post lead me to find another article about this (sorry I can't remember where now).  It basically said that CRM checks for the existence of this non-existent C:\CRMDROP\LOGS trace directory even when tracing is disabled.  I simply used PowerShell to set the directory back to what is supposed to be the default:

    In PowerShell:

      Add-PSSnapin Microsoft.Crm.PowerShell
      Get-CrmSetting TraceSettings
      $setting=Get-CrmSetting TraceSettings
      $setting.Directory="C:\Program Files\Microsoft Dynamics CRM\Trace"
      Set-CrmSetting $setting
      Get-CrmSetting TraceSettings

    This worked for me at the time - I guess it may have since been fixed in subsequent rollups.


    Simon Hetzel Microsoft Dynamics CRM Consultancy Microsoft Server/Infrastructure Architecture http://uk.linkedin.com/in/simonhetzel

    • Proposed as answer by nrodriEditor Thursday, November 29, 2012 10:31 AM
    Friday, November 23, 2012 10:03 AM
  • I've noted that when you enable trace using powershell, you can not disable it again. I know this is unsupported but the only way to disable it is, to go edit bit fields in the CRM Config database. After that tracing is disabled. 
    Friday, November 30, 2012 1:05 PM
  • Hi Morne,

    This is an old post and you might have found the answer but I found this thread while looking for a way to get around a Powershell problem with CRM and IFD. You can disable the trace with powershell, set the "Enabled" to blank or 0 IIRC. Like this:

    $setting= Get-CrmSetting TraceSettings $setting.Enabled=""

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Monday, January 28, 2013 8:51 AM