SQL SERVER – Reporting Services Not Starting After Maintenance Window

SQL
No Comments

SQL SERVER - Reporting Services Not Starting After Maintenance Window errorspy This is the issue faced on my test server and I found something interesting. In this blog, we would learn about one of the reasons why SQL Server Reporting Services (SSRS) couldn’t start after regular maintenance.

I stopped SQL related services without any issue during the maintenance window (let’s call it as a fake maintenance as it as my lab server). Now, while restarting the same all the SQL related servers got started except SSRS service. After restart server, it started.

I checked on the internet to find a way to find the cause. I started checking the SSRS error log file Reporting Services Log Files and Sources

Here is the information I could see.

  1. servicecontroller!WindowsService_0!f80!10/22/2018-06:14:04:: e ERROR: Error initializing configuration from the database: Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed.Login failed for user ‘sa’.
  1. resourceutilities!WindowsService_0!f80!10/22/2018-06:14:05:: i INFO: Reporting Services starting SKU: Enterprise
  2. library!WindowsService_0!fd0!10/22/2018-06:14:05:: e ERROR: Throwing Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: , Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed.Login failed for user ‘sa’.
  1. library!WindowsService_0!fd0!10/22/2018-06:14:05:: e ERROR: ServiceStartThread: Exception caught while starting service. Error: Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed. Login failed for user ‘sa’.
  1. library!WindowsService_0!fd0!10/22/2018-06:14:05:: e ERROR: ServiceStartThread: Attempting to start service again…
  2. library!WindowsService_1!ff4!10/22/2018-06:14:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
  3. library!WindowsService_1!fa0!10/22/2018-06:14:55:: w WARN: Transaction rollback was not executed connection is invalid
  4. library!WindowsService_1!17ac!10/22/2018-06:15:52:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException:, An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
  5. schedule!WindowsService_1!17ac!10/22/2018-06:15:52:: Unhandled exception caught in Scheduling maintenance thread: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. —> System.Data.SqlClient.SqlException: Database ‘msdb’ is being recovered. Waiting until recovery is finished.

Note that there were no numbers in the log. I have added them to provide more explanation.

WORKAROUND/SOLUTION

If we look at each numbered item, it has some messages. Let me put them below with the interesting piece.

  1. e ERROR: Error initializing configuration from the database: Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed. Login failed for user ‘sa’.
  1. i INFO: Reporting Services starting SKU: Enterprise
  2. e ERROR: Throwing Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: , Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed. Login failed for user ‘sa’.
  1. e ERROR: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. —> System.Data.SqlClient.SqlException: Cannot open database “ReportServer” requested by the login. The login failed. Login failed for user ‘sa’.
  1. e ERROR:Attempting to start service again…
  2. e ERROR: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
  3. w WARN: Transaction rollback was not executed connection is invalid
  4. e ERROR: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
  5. e ERROR: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. —> System.Data.SqlClient.SqlException: Database ‘msdb’ is being recovered. Waiting until recovery is finished.

There are three kinds of tags we can see above, i-INFO, e-ERROR, and w-WARN. If you read them again, it would start making sense. As we can see that there may be a connection failure, timeout or low disk condition within the report server database.  Also, the system database ‘msdb’ was being recovered and its recovery was not finished. Due to this SSRS service did not start immediately.

When I checked SQL ERRORLOG, I found that MSDB database recovery has taken time to come online and hence SSRS was not able to connect to it. Now, this explained everything and it was a nice experience to do “detective” work to find the root cause.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , ,
Previous Post
SQL SERVER – Always On Availability Groups and Full-Text Index
Next Post
SQL SERVER – XML Document Could Not be Created Because Server Memory is Low. Use sp_xml_removedocument to release XML documents

Related Posts

Leave a Reply

Menu