Issues with ChromeDriver.exe used on multiple RDP's on Server

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by gtdalsanto » Wed Aug 18, 2021 8:16 pm

Not sure if there is a solution to this, but I have a scenario where I am running over 100 Remote Desktop Programs on a server and am trying to run a compiled Macro Scheduler script (version 15.0.18) concurrently on multiple RDP's and the behavior I am seeing is that the web page will only open on the first RDP1 that the script gets executed on first. When any of the other scripts (exe) fire off (i.e. RDP2, RDP3, RDP4, etc), another chrome web session starts up for each of these on the original RDP1 where it was originally started first.

If i close the web session on RDP1 and start the script on another RDP(2), it opens up on RDP2 and runs fine on RDP2, but again, the running of the script exe on another RDP(3) will start to run a new chrome session on the RDP2 that it is currently running on.

I have tried multiple things such as renaming the chromedriver.exe to chromedriver_x.exe to see if each RDP needs to have its own unique instance of chromedriver.exe with it being defined in the CHROMEDRIVER_EXE setting of the variable at the beginning of the script. B I ended up getting the same results, with the only place the sessions get started is on the RDP where it was first loaded. I am setting up all the chromeDriver variables below (see below)

Let>CHROMEDRIVER_EXE=%SCRIPT_DIR%\ChromeDriver\chromedriver.exe
Let>CHROMEDRIVER_OPTIONS=--start-maximized
killprocess>chrome.exe
//start a Chrome session
ChromeStart>session_id
let>StartupPath=https://xxxxxx
ChromeNavigate>session_id,url,StartupPath

The script works perfectly when running on only one RDP, but i need it to work on all RDP's so i can convert a thick windows client over to the new web based thin client.

Any ideas/solutions would be appreciated.

Thanks

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1390
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by Dorian (MJT support) » Wed Aug 18, 2021 9:31 pm

I'll flag this for Marcus
Yes, we have a Custom Scripting Service. Message me or go here

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by gtdalsanto » Mon Aug 23, 2021 6:01 pm

Are there any updates on this using the ChromeDriver to run the same script on multiple RDP's from a server? I am wondering if anything been fixed in the Macro Scheduler chrome driver commands since 15.0_18 which i am using? From the history it doesn't appear that I need to install the latest. Thanks for your help.

Gary
Version of Chrome browser/driver version
Chrome Browser version: Version 92.0.4515.159 (Official Build) (64-bit)
ChromeDriver.exe version: 91.0.4472.19
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by Grovkillen » Mon Aug 23, 2021 6:19 pm

Let>ME=%Script%

Running: 15.0.27
version history

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by gtdalsanto » Mon Aug 23, 2021 6:26 pm

thanks. I will update the versions and see if this behavior goes away. I have no issues with any of the chrome commands, etc. I just have issues when running the same script on multiple rdp's on a server where the first one started is where chrome gets started for different RDP's even though i have a different session_id for each rdp.

fingers crossed.

thanks

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by gtdalsanto » Mon Aug 30, 2021 1:52 pm

I tried updating the chromedriver.exe to chromedriver_win32_92_0_4515_107 and Macro Scheduler to the most current 15.0.19, and got the same result where running an executable chrome script(exe) on one RDP(1) on a server, then running the same executable chrome script on another RDP(2) concurrently fails to bring up its own chrome instance on the two different RDP's. Whichever RDP I run the executable on first, when I start the executable on the other RDP, another instance of chrome starts on the first RDP.

This issue makes it so i cannot run multiple separate instances of chrome on multiple RDP's on a server. Is this a server limitation, chromedriver.exe issue or a Macro Scheduler issue?

I am using the ChromeStart>session_id with the CHROMEDRIVER_EXE variable being definition being a different path for the chrome driver, which i am seeing that it fails due to a chromedriver.exe already loaded on the server from a different RDP. Below is my setup with the unique SCRIPT_DIR from each RDP.

Let>CHROMEDRIVER_EXE=%SCRIPT_DIR%\ChromeDriver\chromedriver.exe

Need to determine if this is possible to even do this, or if I need to go in another direction. Everything works great if I run these scripts single threaded on one RDP at a time.

Thanks for your help on this.

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by Marcus Tettmar » Tue Aug 31, 2021 2:39 pm

Hi,

Probably just isn't possible. ChromeDriver runs a small http server. I guess only one instance of it can run per machine. And when it gets a response it fires up Chrome. So I can see why it won't play well in a server context where you might have multiple users. The first one will already be running so it will be that one that receives the request and fires up a Chrome instance ... That's just the way Chrome works so I can't really envision a workaround.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Re: Issues with ChromeDriver.exe used on multiple RDP's on Server

Post by gtdalsanto » Wed Sep 01, 2021 12:25 pm

Thanks Marcus,

I would assume the same behavior would also be with msedgedriver.exe as the chromedriver.exe driver too? Not sure if i should give that a try also. I will let you know if I find an alternate solution or possibly someone might have a suggestion.

Thanks

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts