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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PeterSdobyrev
Regular Visitor

Power BI Gateway. "A specified logon session does not exist"

Hello, I'm experiencing a persistent issue with Power BI Gateway when attempting to connect directly to a SQL Server Tabular model data source. Here are the key details:

  • Environment: SQL Server connection configured in Power BI Gateway.
  • Gateway Account: The service account has full administrator access to SQL Server and confirmed permissions on the database. Both the Power BI Gateway and SQL Server are running under the same service account. 
  • Gateway Version: 3000.238.11 (September 2024).
  • Error:
    • Gateway Log:
      DM_GWPipeline_Gateway_DataSourceAccessError "Swallowing exception during Ole Db connection initialization: 'Session does not exist. It may have already ended.'"
    • The error persists even after restarting the gateway.
  • Troubleshooting Steps Taken:
    • Verified direct SQL access using SQL Server Management Studio with the same service account (no issues).
    • Checked that the gateway machine can reach the SQL Server (no network restrictions).
    • Restarted the gateway and verified that the service account is properly configured.
    • Gateway configuration appears correct, and I’ve confirmed that all connection parameters and permissions align.
    • Checked that user mapping in the gateway is configured to impersonate all users as the same service account ensuring consistent access.
    • Confirmed that I can successfully access a local Excel file through the same gateway configuration without encountering errors.
    • Ensured that the security policy "Network access: Do not allow storage of passwords and credentials for network authentication" is disabled, allowing the service account to store credentials as required.

I've reviewed the OLE DB driver settings and compatibility but have not identified any discrepancies.

Request for Assistance: Could anyone provide guidance on resolving this specific "Session does not exist" error? Any insights on whether it could be related to specific OLE DB settings, network configurations, or gateway-specific parameters would be greatly appreciated.

Thank you in advance for your help!

1 ACCEPTED SOLUTION
PeterSdobyrev
Regular Visitor

I found a workaround. The connection works when using Dataflows and Azure Analysis Services, as it allows selecting "Basic" as the authentication kind.

View solution in original post

7 REPLIES 7
PeterSdobyrev
Regular Visitor

I found a workaround. The connection works when using Dataflows and Azure Analysis Services, as it allows selecting "Basic" as the authentication kind.

v-tianyich-msft
Community Support
Community Support

Hi @PeterSdobyrev ,

 

What operation are you performing that is giving you the error. There are a few things that are not quite clear to me about your description. First of all you're connecting directly, which usually doesn't require a gateway. Secondly, you are connecting to a table model, when you create the connection the data source should not be selected Sql server it should be AS.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

The error only occurs when I publish the report to the Power BI Service and configure the connection to Analysis Services through the gateway. When I connect directly to Analysis Services from Power BI Desktop during dashboard development, there’s no issue, and I can connect without error.

 

Let me know if you'd like to expand on any details!

Hi @PeterSdobyrev ,

 

If this error is reported when opening a report or dashboard, try to map user.The email address must match a defined user principal name (UPN) within the local Active Directory (AD) domain. The UPN is a property of an AD account. The Windows account must be present in an Analysis Services role.

Manage SQL Server Analysis Services data sources - Power BI | Microsoft Learn

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

I’ve checked the UPN mapping, AD setup, and ensured the Windows account is in the correct Analysis Services role. Unfortunately, the issue still persists.

rohit1991
Responsive Resident
Responsive Resident

Here's a condensed list of steps to try:

  1. Check OLE DB Driver: Update or try a different stable OLE DB driver version.
  2. Session Timeout: Adjust timeout settings on both SQL Server and Power BI Gateway to prevent premature session closure.
  3. Performance Profile: Set the gateway's performance profile to "Balanced" or "Reliability" for better connection stability.
  4. Firewall/Antivirus: Temporarily disable them to rule out interference.
  5. Event Viewer: Look for related errors in the Event Viewer logs on the gateway machine.
  6. Re-add Data Source: Remove and reconfigure the SQL Server data source in the Power BI Gateway.

Hope this helps 🙂

 

Thank you for the recommendations! I appreciate the guidance

  1. I'll check
  2. All default timouts on AS:  60 for connection, no time limit for orphan.  
    PeterSdobyrev_0-1731395437557.png
  3. The Gateway is operating entirely within our corporate network, without any reliance on external or potentially unstable connections like VPN, NAT, or the internet.
  4. Firewall/Antivirus.  The error persists even when the firewall and antivirus are completely disabled, so these do not appear to be contributing factors.
  5. I will review the Event Viewer logs on the gateway machine in detail, but at first glance, I haven’t found any additional errors related to this issue.
  6. We've tried removing and reconfiguring the SQL Server data source in the Power BI Gateway countless times, but unfortunately, this hasn't resolved the issue.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.