SSRS Report Server - HTTP Error 503. The service is unavailable.

Ariana Grande 5 Reputation points
2023-01-18T09:03:09.8466667+00:00

At the company I work at we use an SSRS Report Server to publish financial reports and such. It always worked really well, but a couple of days ago, the server where the Report Server is running on was restarted due to a security update. The Report server doesn't work ever since.

When accessing the URL, I get the error message "HTTP Error 503. The service is unavailable."

I checked the logs on the server and found the following error messages:

RSHostingService.log

INFO|4|Launching Process : Management Service
INFO|4|Starting Process: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Management\RSManagement.exe
WARN|12|Child Process [Management Service] Died. Check the log for further information
INFO|12|Immediate restart of process Management Service

RSManagement.log


ERROR|1|Unhandled exception in Appdomain System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func2 appFunc, IList1 addresses, IDictionary2 capabilities, Func2 loggerFactory)
at Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func2 app, IDictionary2 properties)
End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(IAppBuilder builder)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.BIServer.Management.WebHost.Program.Main(), Exception RSManagement.exe: 
ERROR|1|Report server dump occurred: System.Reflection.TargetInvocationException at 
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(IAppBuilder builder)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.BIServer.Management.WebHost.Program.Main()

Event Log 1:

Application: RSManagement.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Net.HttpListenerException
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(System.Net.HttpListener, System.Func2<System.Collections.Generic.IDictionary2<System.String,System.Object>,System.Threading.Tasks.Task>, System.Collections.Generic.IList1<System.Collections.Generic.IDictionary2<System.String,System.Object>>, System.Collections.Generic.IDictionary2<System.String,System.Object>, System.Func2<System.String,System.Func`6<System.Diagnostics.TraceEventType,Int32,System.Object,System.Exception,System.Func3<System.Object,System.Exception,System.String>,Boolean>>)
   at Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(System.Func2<System.Collections.Generic.IDictionary2<System.String,System.Object>,System.Threading.Tasks.Task>, System.Collections.Generic.IDictionary`2<System.String,System.Object>)
Exception Info: System.Reflection.TargetInvocationException
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(Owin.IAppBuilder)
   at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(Microsoft.Owin.Hosting.Engine.StartContext)
   at Microsoft.BIServer.Management.WebHost.Program.Main()

Event Log 2:

Faulting application name: RSManagement.exe, version: 15.0.1102.1002, time stamp: 0x63055c58
Faulting module name: KERNELBASE.dll, version: 10.0.17763.3887, time stamp: 0x3e07c6b6
Exception code: 0xe0434352
Fault offset: 0x00000000000349b9
Faulting process id: 0x3b94
Faulting application start time: 0x01d92b0c60e4aa6c
Faulting application path: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Management\RSManagement.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 4b258278-3fbe-4e6c-bbc5-333482c6ba63
Faulting package full name: 
Faulting package-relative application ID: 

Another thing I have noticed is that when I try to use the Report Server Config Tool, it takes an extremely long time to load. When the Report Server was working just fine, this was notthe case either.

I tried restarting the Reporting Server service numerous times, but that didn't change anything.

Since the RSManagement Service is mentioned in the error messages, I tried executing RSManagement.exe myself. That created the following log file:

 INFO|1|File Logger created: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Management\RSManagement_2023_01_18_08_20_54.log - level Info, will roll at 32 Mb, process id 14868
INFO|1|No flag is configured for the Dumper. Using Default settings.
INFO|1|Do not dump on: 
ERROR|1|Unhandled exception in Appdomain System.Collections.Generic.KeyNotFoundException: Missing Configuration [listenerUrl]
   at Microsoft.BIServer.HostingEnvironment.StaticConfig.GetOrException(String key)
   at Microsoft.BIServer.Management.WebHost.Program.Main(), Exception RSManagement.exe: 
ERROR|1|Exception thrown while reading configuration: System.Collections.Generic.KeyNotFoundException: Missing Configuration [rsConfigFilePath]
   at Microsoft.BIServer.HostingEnvironment.StaticConfig.GetOrException(String key)
   at Microsoft.BIServer.Configuration.ConfigReader.get_Current()System.Collections.Generic.KeyNotFoundException: Missing Configuration [rsConfigFilePath]
   at Microsoft.BIServer.HostingEnvironment.StaticConfig.GetOrException(String key)
   at Microsoft.BIServer.Configuration.ConfigReader.get_Current()
INFO|1|Logger shutting down

Lastly I tried completely uninstalling SSRS and reinstall it. After the reinstallation, the error message was the same. I assume that there is some external configuration that might be messing with the Report Server?

I also use a Power BI Report server running on the same server, which surprisingly woks. I also thought that maybe the PBI Report Server might cause a conflict, but I am not sure.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,063 questions
0 comments No comments
{count} vote

5 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2023-01-19T02:27:33.9633333+00:00

    Hi @Ariana Grande

    You can find the log files for report server at below path: In SQL Server Reporting Services 2016 or earlier: C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\LogFiles

    In SQL Server Reporting Services 2017: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles

    Please also try to re-create the database in report server configuration manager to see whether it work or not, test the connection to make sure it could connect to database successfully.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

  2. diana.sl.carneiro@gmail.com 0 Reputation points
    2023-01-18T18:32:30.2433333+00:00

    Hi,

    Please check the event viewer for more information.

    It really seems that is SSRS in conflict/locked by another application.

    Good Luck

    0 comments No comments

  3. Ismail Hossain Zihan 0 Reputation points
    2023-08-19T10:19:54.23+00:00

    @Ariana Grande Is your problem solved? If it is then how did you solve it?


  4. Gupta, Ashish 0 Reputation points
    2024-08-08T11:52:36.48+00:00

    We are having the same issue can someone let us know if issue resolved at your end.

    Thanks,

    Ashish

    0 comments No comments

  5. Joshua Jay 1 Reputation point
    2024-08-15T02:45:07.95+00:00

    I ran into this same issue today. We've had an SSRS server running for years and this morning users started receiving "503 Service Unavailable" errors.

    Reviewing the SSRS error logs, indicated the same error:

    Unhandled exception in Appdomain System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process

    Ultimately, the issue was a port conflict on the RSHostingService, which defaults to port 8082. Another service was added listening on the same port. I updated the RSHostingService config file located at "C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\RSHostingService\config.json" to use port 8083 instead. After saving and restarting the SSRS service, everything was back up and running.

    I found this article on druva.com that confirmed what I was seeing:

    Port 8082 is used for internal communications on the host for FS, NAS, Hyper-V, VMware, Oracle DTC, and MS SQL. If port 8082 is unavailable, other available ephemeral ports will be used.

    To verify on my server I ran the following commands in an elevated command prompt.

    netstat -ano -p TCP | find /I "listening" | find /I "8082"
    

    Attachment

    This showed what was listening on port 8082 (Note: This screenshot is after I moved RSHostingService to 8083). Taking the PID on the right of the results, I could then put that in this command to identify the associated executable:

    tasklist /fi "PID eq 16216"
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.