Forum Discussion
Microsoft.PowerBI.ReportServer.AsServer.AsConnectionException: Failed to connect to AS
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