Subscriptions do not get fired / executed from Reporting service
Recently i was working on a very interesting case where reporting service in sharepoint integration mode didn't fire any subscriptions. We looked at the Event table of reporting service and found there are huge amount of entries. This clearly shows that the Report server windows service has not done its job. Report server windows service is responsible for executing the subscriptions.
We looked at the Report server's RsReportServer.config file to make sure the following settings look as below.
<Service>
<IsSchedulingService>True</IsSchedulingService>
<IsNotificationService>True</IsNotificationService>
<IsEventService>True</IsEventService>
<PollingInterval>10</PollingInterval>
And i found that all the settings are intact as expected.
The next level of action was to clear all the event table entries after taking a backup of the table and i created a new subscription. When the schedule fired i found that the event table entry got added and it just remained there in the report server table. This again pointed me that something is definitely wrong in regards to report server windows service.
So i enabled verbose logging (using https://verboselogger.codeplex.com) in the report server machine just to see if we get any error in the report server logs. Please note that it requires RESTART of the report server windows service. Also make sure to turn off verbose logging after collecting the logs as it does add some over head and fills up the logs quite fast.
When i collected the logs and started to look in to it, at the start of the error log i found this exception.
servicecontroller!WindowsService_0!1728!10/29/2010-13:13:31:: e ERROR: Exception caught loading and setting code permissions policy level: System.Security.XmlSyntaxException: Invalid syntax on line 154.
at System.Security.Util.Parser.GetRequiredSizes(TokenizerStream stream, Int32& index)
at System.Security.Util.Parser.ParseContents()
at System.Security.Util.Parser..ctor(Tokenizer t)
at System.Security.SecurityManager.LoadPolicyLevelFromStringHelper(String str, String path, PolicyLevelType type)
at System.Security.SecurityManager.LoadPolicyLevelFromString(String str, PolicyLevelType type)
at Microsoft.ReportingServices.Library.ServiceController.SetAppDomainPolicy()
library!WindowsService_0!1728!10/29/2010-13:13:31:: e ERROR: ServiceStartThread: Exception caught while starting service. Error: System.Security.XmlSyntaxException: Invalid syntax on line 154.
at System.Security.Util.Parser.GetRequiredSizes(TokenizerStream stream, Int32& index)
at System.Security.Util.Parser.ParseContents()
at System.Security.Util.Parser..ctor(Tokenizer t)
at System.Security.SecurityManager.LoadPolicyLevelFromStringHelper(String str, String path, PolicyLevelType type)
at System.Security.SecurityManager.LoadPolicyLevelFromString(String str, PolicyLevelType type)
at Microsoft.ReportingServices.Library.ServiceController.SetAppDomainPolicy()
at Microsoft.ReportingServices.Library.ServiceController.ServiceStartThread(Object firstStart)
library!WindowsService_0!1728!10/29/2010-13:13:31:: e ERROR: ServiceStartThread: Attempting to start service again...
After that i see all the normal entries and no exception for the one hour time frame were we collected the logs after enableg the verbose logging.
While trying to understand what could have gone wrong, onething striked my mind. I didn't see any operation related to windows service such as DB cleanup, Polling etc. These activitied are prefixed with the texts dbpolling / dbcleanup / library!WindowsService_0 in the log file entries.
Now i'm certain that the service thread responsible to all of the above operation has not started. And that is the reason reporting service is not able to process the subscriptions. The reason for the service thread not to start is the above mentioned exception, which ends, Attempting to start service again...
Analyzing the cause of the exception, all i can see it there is some invalid XML in the Rssrvpolicy.config which is inside the Reportserver/bin folder.
Looked at the config file and found there was one XML tag which was not closed porperly as expected. I corrected the config file and then restarted the Report server windows service. That made everything to work and subscriptions got processed.
The same error not necessarily will have to be in your environment. But for any such issue the approach to take is very inmportant to narrow down the issue.
More detailed information about Monitoring and Troubleshooting Subscriptions can be found @ https://blogs.msdn.com/b/deanka/archive/2009/01/13/diagnosing-and-troubleshooting-subscriptions.aspx
Also this issue can be in Reporting Service running either in Native mode or in sharepoint integration mode.
HTH!
Selva
[All the posts are AS-IS with no warranty]
Comments
- Anonymous
January 04, 2011
The comment has been removed - Anonymous
January 25, 2011
To be frank, the above error doesn't stop your subscription processing. The above error says that there are too much of cleanup data left to be delated which could not be completed at this attempt. But will be completed when the next cycle starts. This cleaup (CleanupCycleMinutes) runs every 10 minutes unless you change the default. The failure for the subscription could have been caused due to some other error. You can look at the log files to see any other error messages duing that time. Few references: msdn.microsoft.com/.../ms157273.aspx technet.microsoft.com/.../cc966418.aspx - Refer Appendix A. HTH! Selva.