web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / On-prem Gateway keeps ...
Power Automate
Unanswered

On-prem Gateway keeps stopping

(0) ShareShare
ReportReport
Posted on by 39

Good Morning all,

Not sure if this is the correct location to post, but I have to start somewhere 🙂

I have an automated cloud flow and an on-prem gateway on a server.  (it checks for incomming e-mail and writes the attachment to a folder on the server)

 

Every 2 or so days the service that deals with the gateway seems to stop running. I have set its recovery options to restart the service at 2nd and subsequent failures, but doesn't seem to solve my issue (It seems to take some time before it decides to restart the service, there for it misses e-mails)

I have already updated to the latest version last Friday , but yesterday it happened again. I have now set the recovery options to restart after 1 minute,  but it seems weird it keeps stopping every 2 days.

 

Does anyone have any ideas what i could do/try next? I have thought about scheduling a powershell script to restart the service at like 11pm every night, but it doesn't make sense having to do that?

Any help is appreciated.
Thanks

Hans

 

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,985 Super User 2026 Season 1 on at

    Hi  @hans-smeets ,

     

    Check to ensure that you are running the latest version of the "On-premises data gateway":

    Version: 3000.202.14 Date Published: 05/01/2024

    Download On-premises data gateway from Official Microsoft Download Center

     

    See also: Add another gateway to create a cluster in Install an on-premises data gateway | Microsoft Learn

     

    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Hans Smeets Profile Picture
    39 on at

    Hi @ekarim2020 ,

     

    I double checked to make sure, but the gateway is the most recent version 3000.202.14.

    Creating a gateway cluster is for sure something that we need to do, but at this point in time not feasible, due to lack of another server. Also if they keep stopping every other day, it would not solve our problem, because in 4 days both would be down and the flow would fail again.


    Some extra info: When i right click and choose start on the service, it starts up no problem, when i restart the whole server (which i also did on friday just to be sure), the service starts fine as well.

  • Ellis Karim Profile Picture
    11,985 Super User 2026 Season 1 on at

    All I can suggest is to use the Troubleshooting steps below, if you have not done so already, to see if if can shed light on why the service keeps stopping:

     

    Troubleshoot the on-premises data gateway | Microsoft Learn

     

    When did you first notice the issue? Have there been any recent Windows Updates or new/updated software installed on the server that is running the gateway that may be the root cause?

     

     
    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Hans Smeets Profile Picture
    39 on at

    I checked the eventviewer and i do see an error thrown there on the 11th of january, but it has happned before on the 15th of December. In between i see a whole range of service stop and starts as informational events in the eventviewer, they appear to be just minutes apart, then it goes quiet again.

    hanssmeets_0-1705277373106.png

    If i look at the error on the 11th of Jan, it has a lot of text, none of it makes sense to me, but may make sense to others (google wasn't realy my friend here)


    -------------------------------------------------------------------------------
    Failed to start the 'PbiEgwService' with exception:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.get_ProviderNameToGuid()
    at Microsoft.Diagnostics.Tracing.Session.TraceEventProviders.GetProviderGuidByName(String name)
    at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableProvider(String providerName, TraceEventLevel providerLevel, UInt64 matchAnyKeywords, TraceEventProviderOptions options)
    at Microsoft.PowerBI.DataMovement.Pipeline.EventSourceListener.SapTraceEventWriter..ctor(Stream stream, Func`1 rotate, String sessionNamePostfix)
    at Microsoft.PowerBI.DataMovement.Pipeline.EventSourceHosting.EventSourceHost.<>c__DisplayClass7_0.<StartCollectingEvents>b__5()
    at Microsoft.PowerBI.DataMovement.Pipeline.EventSourceHosting.EventSourceHost.ConstructTraceEventWriterWithErrorHandling(Action action)
    at Microsoft.PowerBI.DataMovement.Pipeline.EventSourceHosting.EventSourceHost.StartCollectingEvents(EventSourceListenerConfiguration[] configs)
    at Microsoft.PowerBI.DataMovement.Pipeline.GatewayServiceHost.GatewayServiceHost.<StartAsync>d__44.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.PowerBI.DataMovement.EnterpriseGateway.EnterpriseGatewayService.<StartAsync>d__5.MoveNext()

    ------------------------------------------------------------------------------------

     

    I have also attached the error log, fomr the exported logs to the post, but I dont think there is anything new in there.

    Edit: Not quite sure when this server was updated, but even then the flow we have only been develloping just before  the hollidays and during that period it would be a lot of back and forth anyway, so we wouldnt really have noticed.

    It was only after the hollidays, where we exptected to run the automation as a test before going live for a few weeks, we noticed the in stability


    Cheers

    Hans

  • Ellis Karim Profile Picture
    11,985 Super User 2026 Season 1 on at

    Hi  @hans-smeets ,

     

    Yes, google wasn't really our friend here.

     

    Can you try the following and monitor:

     

    • Turn Off Diagnostic Logging (and then restart service) - see point 3 below.
    •  Reinstall or Repair: Can you try reinstalling or running a repair installation of the Gateway? This can sometimes resolve obscure issues related to the service's operation.

     

    What service account is the gateway using? NT SERVICE\PBIEgwService

     

     

    ChaptGPT assisted interpretation of the error :

     

    1. It appears that your on-premises Gateway service is experiencing issues, leading to a halt in its operation. The error System.NullReferenceException typically indicates that your code is trying to access a member of a reference type variable that is set to null...
    2. ...This error suggests that there's an attempt to access a member of an object that is not initialized (i.e., is null). This can happen due to various reasons, often related to the code or the data source configuration.

    3. Based on the detailed error log you've provided, it seems the Power BI Enterprise Gateway service (PbiEgwService) is encountering a System.NullReferenceException during its startup. This exception is typically thrown when the code attempts to access a member of a null object reference. The logs indicate that the error is occurring within the Microsoft Diagnostics Tracing (Microsoft.Diagnostics.Tracing) namespace, which suggests an issue with the event tracing or logging within the Gateway service.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Hans Smeets Profile Picture
    39 on at

    It has now been running for 4 days, after i switched the Diagnostic logging. It is a bit early to say yay or nay on that being the cause, but it is starting to look like it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard