Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
againey2011
Regular Visitor

Microsoft.PowerBI.ReportServer.AsServer.AsConnectionException: Failed to connect to AS

Hello, 

 

I need some help figuring out how to get the AS service on one of our report servers to connect to the AS service/model. Here is an example of the logs 

 

2023-06-26 11:44:30.9127|INFO|52|Sending response. Response code VHAMASTER\vhaisbgainea 500, Elapsed time 0:00:02.9248437| RequestID = 790bbde3-6c68-098d-98a8-d0b0dee2ae40 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead
2023-06-26 11:44:31.9283|INFO|59|Received request GET /api/explore/reports/d1a2dacc-a670-4721-acc6-0499ac005d74/modelsAndExploration| RequestID = 21fba398-732c-1b79-bd9f-100678ce9851 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead
2023-06-26 11:44:34.4283|ERROR|40|Failed to connect to AS| RequestID = 21fba398-732c-1b79-bd9f-100678ce9851 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead Microsoft.PowerBI.ReportServer.AsServer.AsConnectionException: Failed to connect to AS ---> Microsoft.AnalysisServices.ConnectionException: A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5132
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at Microsoft.AnalysisServices.XmlaClient.GetTcpClient(IConnectivityOwner owner, ConnectionInfo connectionInfo)
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.XmlaClient.OpenConnectionAndCheckIfSessionTokenNeeded(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)
at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString)
at Microsoft.PowerBI.ReportServer.AsServer.AnalysisServicesFactory.CreateASWrapper(String serverAddress, Int32 port, TimeSpan timeout)
--- End of inner exception stack trace ---
2023-06-26 11:44:34.4283|INFO|46|Sending response. Response code VHAMASTER\vhaisbgainea 500, Elapsed time 0:00:02.4916138| RequestID = 21fba398-732c-1b79-bd9f-100678ce9851 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead
2023-06-26 11:44:36.8033|INFO|59|Received request GET /api/explore/reports/d1a2dacc-a670-4721-acc6-0499ac005d74/modelsAndExploration| RequestID = 319a61d3-6ff3-0916-0cd9-efb8a9293615 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead
2023-06-26 11:44:39.3033|ERROR|48|Failed to connect to AS| RequestID = 319a61d3-6ff3-0916-0cd9-efb8a9293615 ClientSessionID = 168bf056-45d3-1de0-7bca-ebbd80099ead Microsoft.PowerBI.ReportServer.AsServer.AsConnectionException: Failed to connect to AS ---> Microsoft.AnalysisServices.ConnectionException: A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5132
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)

 

We have had this system in production for almost 3 years now and this started happening after maintenance was done on our report servers. We have 3 server setup and the other two report servers front ends are working fine handling power bi report traffic. Its only when the power bi report gets routed to render on the 3rd report server that we get this error in the report portal: 

 

Something went wrong

Unable to load the data model for your Power BI report.
Please try again later or contact support. If you contact support, please provide these details.

 

The Analysis Server instance has experienced an error and is not available. Please contact your system administrator.

Request ID14efa3f8-26fe-6da3-457d-3021ecd552b0

Status code500

TimeTue Jun 27 2023 06:06:15 GMT-0400 (Eastern Daylight Time)

Service version/powerbi/libs

 

All of our settings are the same across the servers as far as service account, permissions etc. the service account is even in the local admins group on each server... Please let me know if you have seen this before. All of our servers are on the January 2023 patch level. 

8 REPLIES 8
HussamDabbas
Microsoft Employee
Microsoft Employee

There current investgiation regarding this issue May and Sep 2023 release and Product Group advise to set with workaround until further investigation.

"After setting the <CriticalErrorHandling> setting to 0 the msmdsrv.exe process was able to restart succesfully and the error during report rendering stopped appearing. 

 

<CriticalErrorHandling>0</CriticalErrorHandling>"

We are encountering this issue but have not yet upgraded to the January '24 release, is this fixed in January '24 release? If not is it scheduled to be fixed in May '24 release? Thanks

Hi Hussam, Thanks... Any idea when it will be fixed.  in what release? The above fix has not solved the problem fully. It needs restarting of power bi service whenever we have issue.

 

Your reply will be greatly appriciated...

Takbok
Regular Visitor

We are seeing the same behaviour after our server was restarted for the latest Windows update.  We installed the Power BI September 2023 update (Version: 1.18.8668.33514(build 15.0.1113.162), Released: September 27, 2023)  on the 10th of October and only restarted the server on the 19th of October which is when the reports stopped working.

 

The workaround from dedlock works, but we need to understand what effect this has, any one have some insights?

 

The latest update Version: 1.18.8683.7488(build 15.0.1113.165), Released: October 10, 2023 does not resolve the issue.

PBI_user27
Frequent Visitor

We were facing the same issue too and managed to resolve it following dedlock's solution temporarily. If anyone could let us know why this is happening and how to overcome this, it would be greatly appreciated.

 

 

 

2023-08-25 16:50:10.1014|ERROR|10|Getting list of expired modelsMicrosoft.AnalysisServices.AdomdClient.AdomdConnectionException: A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5132
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetTcpClient(IConnectivityOwner owner, ConnectionInfo connectionInfo)
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnectionAndCheckIfSessionTokenNeeded(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect()
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
at Microsoft.PowerBI.ReportServer.AsServer.ModelDataAccessor.GetModelInfo()
at Microsoft.PowerBI.ReportServer.AsServer.AnalysisServicesEvictor.GetExpiredDatabases()
2023-08-25 16:50:10.1014|INFO|10|Finished clean up of 0 embedded models
2023-08-25 16:50:22.1167|ERROR|9|Error getting next eventSystem.Exception: ReportServerDatabaseUnavailableException ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The remote computer refused the network connection.) ---> System.ComponentModel.Win32Exception: The remote computer refused the network connection

beeep
New Member

we have exactly the same behavior as described by dedlock. The change in the *.ini suggested by dedlock helped us temporarily. However, I still don't know what exactly the problem is. It could be related to the last Windows update, as that was also the reason for our server restart. If anyone has more information, let me know.

Anonymous
Not applicable

Hi all, 

 

We are experiecing the same error on some of our reports after a server restart. Couple of things we have noticed:

  • Only reports in Import mode have the error/issue.
  • Reports that have a Live connection to a SSAS tabular model on a different server are unaffected. 
  • The process msmdsrv.exe is not running. When restarting the PBIRS via Report Server Configuration Manager the process briefly restarts but stops/dissappears again.

No idea of what the root casue of this issue is.  A temporary solution was to change a settings in the configuration file: Program Files\Microsoft Power BI Report Server\PBIRS\ASEngine\msmdsrv.ini

 

After setting the <CriticalErrorHandling> setting to 0 the msmdsrv.exe process was able to restart succesfully and the error during report rendering stopped appearing. 

 

<CriticalErrorHandling>0</CriticalErrorHandling>

 

dedlock_1-1689255199451.png

 

If someone from Microsoft could comment on this approach or provide a better way to fix this issue. That would be greatly appreciated. Thanks!

 

 

sharrock85
New Member

we are getting the exact same error?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors