Reporting Services 2008 R2 crashing on Windows Server 2008 R2
Recently came across one of the issue with SQL server reporting services 2008 R2. The Report manager and ReportService Webservice URL both were not opening. The ReportService URL threw "500 internal server error". I Was clueless on what might be the issue. The Reportserver configuration status was showing that it was initialized.
The next best place to look in such cases would be the Reporting services logs.
Restarted the Reporting services and then tried to open the Report Service URL.
On reviewing the Reporting service logs under <InstallPath>:\Program Files\Microsoft SQL Server\MSRS10_50.<ReportServerInstanceName>\Reporting Services\LogFiles
The File name would be like ReportServerService__<>.log
Found the following errors in the logs
Error: The type initializer for 'Microsoft.ReportingServices.Diagnostics.Canonicalization' threw an exception..
library!DefaultDomain!9b0!01/14/2015-15:43:52:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: Failed to intialize HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportServer_MSSQLSERVER_0-1-130657040318084612. ---> System.TypeInitializationException: The type initializer for 'Microsoft.ReportingServices.Diagnostics.Canonicalization' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' at Microsoft.ReportingServices.Diagnostics.Canonicalization..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
Server stack trace:
at Microsoft.ReportingServices.Diagnostics.Canonicalization.InitReportBuilderFileList(String rbRootDir)
at ReportingServicesHttpRuntime.RsHttpRuntime.Initialize(RsAppDomainType type, String virtualDir, String physicalDir)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ReportingServicesHttpRuntime.RsHttpRuntime.Initialize(RsAppDomainType type, String virtualDir, String physicalDir)
at ReportingServicesHttpRuntime.RsHttpRuntime.Create(RsAppDomainType type, String vdir, String pdir, Int32& domainId)
--- End of inner exception stack trace ---;
appdomainmanager!ReportServer_0-1!9b0!01/14/2015-15:43:52:: i INFO: Appdomain:3 ReportServer_MSSQLSERVER_0-1-130657040318084612 unloading
library!DefaultDomain!9b0!01/14/2015-15:43:52:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerAppDomainManagerException: Failed to create Report Server HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerAppDomainManagerException: An error occurred when attempting to start the application domain ReportServer within the Report Server service. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportServer_MSSQLSERVER_0-1-130657040318084612. ---> System.TypeInitializationException: The type initializer for 'Microsoft.ReportingServices.Diagnostics.Canonicalization' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
--- End of inner exception stack trace ---;
rshost!rshost!9b0!01/14/2015-15:43:52:: e ERROR: Failed to create HttpRuntime 80131500.
rshost!rshost!9b0!01/14/2015-15:43:52:: e ERROR: Failed to get appdomain 80131500, pipeline=0x0000000000133A40.
rshost!rshost!9b0!01/14/2015-15:43:52:: e ERROR: Error state. Internal abort for pipeline=0x0000000000133A40 ...
The one which caught my attention was
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Now my first action was to look for the file System.Core in the GAC
Opened the assembly folder by typing Assembly in the Run windows.
Tried to look for System.Core. It was not present there. Now the question is how do we get the file there. from the error message it is clear that the file belonged to .net framework 3.5 "Version=3.5.0.0". Also the operating system was Windows server 2008 r2. The .net framework 3.5 is part of the operating system features. We need to check on the status of .net framework 3.5.
Opened the Server manager and selected features. The Feature for .net framework 3.5 was disabled. So enabled the .netframework 3.5 sp1 feature and then completed the installation. Once the installation was completed. Then restarted the Reporting services. Now tried to access both the Reporting services and ReportManager both of them worked fine.