cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TobyOne
Frequent Visitor

Running unattended desktop flow on load balancing

Hi.

I am helping a client with PAD and are having trouble getting the unattended desktop flow running consistently.  

The client has a server setup, where the user connects to a load balancing server (RD Gateway or RDS Broker), and then are redirected to 1 of 2 servers - the one with fewest users on. All server infrastructure is handle by another supplier. 
It seems like the flow only can get triggered when it hits the correct server by chance.

I have tried multiple solutions - none of them gets the flow running consistently:

  • Using the machine runtime and making a group with both. 
  • Using on-premise datagateways and making a cluster.
  • Making a flow that first tries to run the desktop flow on server 1. If that fails it tries to run the desktop flow on server 2.

Often the error is "Cannot create new session to execute unattended run."

Any good suggestions? 

It is possible for me to talk to the other supplier, if some serversettings needs to be changed.

Regards,
Tobias

 

7 REPLIES 7
MichaelAnnis
Super User
Super User

What if the flow read the current server to determine if it was on 1 or 2, and if it is on the wrong one, kicks it back as unsuccessful which triggers a restart in 5 mins to try again?

TobyOne
Frequent Visitor

Hi @MichaelAnnis . 
Thank you for your response.

I'm not sure how to try the solution you suggested. 


How can the flow "read" the current server? 

Use the information here to run ip/config on cmd.

 

https://visuresolutions.com/how-to-find-server-details/

 

Read from cmd, use text actions (or the new ‘recognize entity’ function or regex to extract the host name or MAC address. 

 

Oh I understand.

The problem is, the desktop flow never starts. It doesn't matter if it runs on server 1 or 2 (they have the same desktop setup and uses same network-drive.)

It seems like the online flow tries to trigger the desktop flow on a random server in the cluster. If this one happens to be the one the load balancing server would have chosen (the one with less users on), the flow runs without a problem. If it isn't, the flow can't start. Does that make sense? (It might also be wrong, but I am not aware of a way to figure out if that is really what is happening.)

Anonymous
Not applicable

Hi MichaelAnnis,

 

For using CMD action of PAD, is there any idea on this error while writing command?

on99username_0-1642153501367.pngon99username_1-1642153547805.png

It is ok when I use cmd manually.

on99username_2-1642153628373.png

 

 

No clue.  Mine worked fine:

MichaelAnnis_0-1642174924378.png

 

I thought it might be because you were on a subfolder, buy I used my downloads file, and no error.

Try just the C:, I wonder if the "." in the subfolder is breaking something.

 

TobyOne
Frequent Visitor

So this is the newest info on this problem. I still hope someone has inputs on the issue and a possible solution.

The server setup is like this: 
juserver.png

As stated earlier, it seems like the online flow tries to trigger the desktop flow on a random server in the cluster.
If this happens to be the one the connection broker / load balance server would have chosen (the one with less users on), the flow runs without a problem. If it isn't, the connection broker redirects the request to the other RDS host - Power automate gets confused, as it isn't the host it tried to connect to, and the flow can't start.
(It might be wrong, but I am not aware of a way to figure out if that is really what is happening.)

Any help is appreciated! (I'll buy you a beer, cake or something else!)

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Users online (3,024)