Today going to share real time issue after upgrade to SQL 2019 SSRS report service was not working. Untill we are not fixing we are not able to restore report encyption key.
Issue:
SSRS failure since CAS SQL Upgrade from 2014 to 2019
The requester was getting the following error:
Microsoft.ReportingServices.WmiProvider.WMIProviderException: An error occurred when attempting to connect to the report server remote procedure call (RPC) end point. Verify that the Report Server Windows service is running, and then retry the operation.
---> System.Runtime.InteropServices.COMException: The RPC server is not listening. (Exception from HRESULT: 0x800706B3)
Environment:
- Server: Windows Server 2016
- OS: Standard
- Instance Name: SSRS
- SSRS version: 2019
- Old & New SQL Database version : 2014 and now 2019 Ent.
- SSRS Scale Out / Stand alone: Stand alone
- Report Server URL : http://DEMO/reportserver
- Report manager URL : http://DEMO/reports
Cause:
- Port 8082 was being used by McAfee solution
- IPListen was failing
- DLL file was missing
Resolution / Advisory:
In order to fix the issue, we performed the following actions:
It was explained to the Issue reported Users that the error normally occurs when there is another application using port 8082.
The Issue reported User indicated that the issue started after moving from SSRS 2014 to SSRS 2019.
In order to rule out the above (port 8082 used by another tool), we ran the following commands:
- netsh http show urlacl > c:\temp\Urls.txt
- netstat -anob >c:\temp\netstat.txt
The netstat output was showing that port 8082 was being used by McAfee solution:
Port 8082 is used by Reporting Services for internal communication between processes.
It was explained to the Issue reported Users that changing the port number on SSRS (config.json) is not supported because that file is replaced during upgrades.
Therefore, the only supported alternative that Issue reported Users have was to change the port number for the McAfee solution.
Additionally, we shared the following information with the Issue reported Users, since it was not failing when they were using SSRS 2014:
Differences between SSRS 2014 and SSRS 2019
The SSRS 2014’s architecture is different than the SSRS 2019’s architecture.
The architecture of Reporting Services 2014 had just one process named ReportingServicesService.exe. Nowadays, we have a “parent” process named RSHostingService.exe which then starts the RSManagement.exe process. That process is used for communication between all of the “child” processes like RSPortal.exe and ReportingServicesService.exe. The port 8082 is being used for that internal communication between processes.
It is valid to mention that this new architecture started with Reporting Services 2017.
The Issue reported User indicated that it was not feasible for them to change McAfee port number since they have a large number of servers running with existing solution.
- Since rolling back was not an option for Issue reported Users, we considered the alternative of changing the listener's port number in SSRS
- However, we made the disclaimer that every time SSRS is upgraded the config.json file (C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\RSHostingService\config.json) is going to be overwritten. Therefore, the Issue reported Users will need to apply the same steps we did
- We removed the URL binding that uses port 8082 by running the following command: netsh http delete urlacl url=http://+:8082
- We decided to use port 8080 instead. Hence, we ran the following command: netsh http add urlacl url=http://+:8080/ user="NT SERVICE\SQLServerReportingServices"
- Additionally, we modified the config.json file in order to use port 8080 instead of port 8082
- After the changes were applied, we rebooted the server
- When server reboot was completed, we tested again but were still seeing the same error:
---> System.Runtime.InteropServices.COMException: The RPC server is not listening. (Exception from HRESULT: 0x800706B3)
- We checked the SSRS error logs and were able to identify the following exception:
2022-01-28 19:09:11.0848|ERROR|1|Unhandled exception in Appdomain System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: The format of the specified network name is invalid
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
- The error was fixed by running the following command (Event ID 15005 — HTTP Service Namespace Management | Microsoft Docs): netsh http add iplisten ipaddress=0.0.0.0
- After the above command was executed, we checked again the SSRS links (Web Service & Web Portal). They were loading but displaying an error related to encrypted content
- We restored the SSRS encryption key with successful results
- SSRS Web Portal was loading properly. We were able to see the folders and the reports. However, when running the reports, we got the following exception:
Failed to load expression host assembly. Details: Could not load file or assembly 'SrsResources, Culture=neutral' or one of its dependencies. The system cannot find the file specified. (rsErrorLoadingExprHostAssembly)
- Since Issue reported Users upgraded to SSRS 2019, we verified that the bin folder has the SrsResources.dll file
- We confirmed that the file does not exist. We went to the old installation folder and copied the dll. The dll was pasted into the bin folder of the new SSRS installation
- We restarted the SSRS service and tested again. Now the SCCM reports are running fine
- The Issue reported User also confirmed that the reports are running properly within the SCCM console
1 Comments
Alex
21-02-2023 02:58 pmWell that 100% helped me so I need to buy you a coffee. In my case seem that 8082 is stuck with "NT SERVICE\SQLServerReportingServices" Not sure if it's when I uninstall the older version or something when bad during install. I did the setup following your instruction to port 8080 and everything works fine. Now I just need to figure out how to reset that 8082 port assignment.
Haresh Hirani
thanks for your feedback. keep motivating to share information