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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Power Bi gateway just works for a few hours.

I'm having issues with a Power BI gateway, I installed it as a service and with admin permissions, but it just works a few hours. On it's documentation there is a sentence: "The gateway cannot be installed on a domain controller". How can I check if my Windows is a domain controller?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I fixed it creating a cmd script to restart the Power BI gateway and creating a task schedule to execute that script sometimes in a day.

 

Cmd's file code:

net stop DIAHostService
net start DIAHostService

And this is the content of the task scheduler:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2017-04-12T09:17:09.7077677</Date>
    <Author>YOUR_USER_NAME</Author>
    <Description>This task restarts the PowerBI Gateway (DIAHostService) sometimes in a day.</Description>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <Repetition>
        <Interval>PT1H</Interval>
        <StopAtDurationEnd>false</StopAtDurationEnd>
      </Repetition>
      <StartBoundary>2017-04-12T09:20:26</StartBoundary>
      <ExecutionTimeLimit>PT30M</ExecutionTimeLimit>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>YOUR_USER_NAME</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>true</WakeToRun>
    <ExecutionTimeLimit>PT5M</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>PATH_TO_CMD_FILE\restart_powerbi_service.cmd</Command>
    </Exec>
  </Actions>
</Task>

Save this file as xml and import it on Windows Task Scheduler. Don't foget to change YOUR_USER_NAME by the user name of the machine that the Power BI gateway is running And change PATH_TO_CMD_FILE to the location of your cmd file. 

 

Hope it helps.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

I fixed it creating a cmd script to restart the Power BI gateway and creating a task schedule to execute that script sometimes in a day.

 

Cmd's file code:

net stop DIAHostService
net start DIAHostService

And this is the content of the task scheduler:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2017-04-12T09:17:09.7077677</Date>
    <Author>YOUR_USER_NAME</Author>
    <Description>This task restarts the PowerBI Gateway (DIAHostService) sometimes in a day.</Description>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <Repetition>
        <Interval>PT1H</Interval>
        <StopAtDurationEnd>false</StopAtDurationEnd>
      </Repetition>
      <StartBoundary>2017-04-12T09:20:26</StartBoundary>
      <ExecutionTimeLimit>PT30M</ExecutionTimeLimit>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>YOUR_USER_NAME</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>true</WakeToRun>
    <ExecutionTimeLimit>PT5M</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>PATH_TO_CMD_FILE\restart_powerbi_service.cmd</Command>
    </Exec>
  </Actions>
</Task>

Save this file as xml and import it on Windows Task Scheduler. Don't foget to change YOUR_USER_NAME by the user name of the machine that the Power BI gateway is running And change PATH_TO_CMD_FILE to the location of your cmd file. 

 

Hope it helps.

Greg_Deckler
Super User
Super User

nltest /dclist:{domainname}

 

Lists all DC's in a domain


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler, Do I have to change the {domainname}? If I understand your solution correctly, I run that command and got this output:

 

nltest /dclist:{domainname}
Cannnot find DC to get DC list from Status.= 1355 0x54b ERROR_NO_SUCH_DOMAIN.

 

Yes, replace {domainname} with the name of your domain.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler, I changed it to my current domain name and I got a list of 14 DCs. So, is my machine a domain controller? If yes, what is the solution for that? 

Check the name of your machine against the list of DC's returned. If your machine is in the list, it is a DC. Use "hostname" from the command prompt to get your computer name. Also, use "set" from the command prompt to verify that you entered the correct domain. Look for the USERDOMAIN property.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler, thank you! My machine isn't a DC. Can you tell me what is the next step to find what is my problem? The Power BI's site is telling me that my gateway is offiline, but my machine has a internet conexion and the Data Management service is still running.   

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors
Top Kudoed Authors