Toad World® Forums

How to create many agents as a service on Windows?

Using Benchmark Factory 6.5 Build 332.

I have 5 Windows 2008 R2 servers. Server1 is where the Benchmark Factory GUI is running. The other 4 servers have benchmark factory installed but have agents running (not the GUI). I have created 10 services using instsrv.exe and srvany.exe like this:

“C:\Program Files\Utils\instsrv.exe” BenchMarkFactoryAgent1 “C:\Program Files\Utils\srvany.exe”

“C:\Program Files\Utils\instsrv.exe” BenchMarkFactoryAgent2 “C:\Program Files\Utils\srvany.exe”

etc. On the agents, in services.msc I have changed the account to my Windows domain account and it connects fine to the Benchmark Factory server. If I change the account on the agents to a service account and restart the services, the agent does not connect and I get this in the error log on the agent:

** File Opened at: (3/11/2014 6:08:47 AM)
Benchmark Factory Agent
Version: 6.5.0
Build: 332
Copyright © Quest Software 2010

** Error **(Tue Mar 11 14 6:17:41 AM) Error connecting to Benchmark Factory console.
** Error **(Tue Mar 11 14 6:17:41 AM) Connection refused. Please verify that the Benchmark Factory is running.

Any ideas?

The dev team or product manager may answer otherwise, so don’t take this as definitive. But we don’t support running the BMF agent as a service. I can say that when running BMF agents as executable on remote servers that those servers do NOT have to have the same windows user/domain. For example my notebook has a windows user/domian but my BMF VM’s for running agents are all setup as Administrator and not on domain - and just need to supply an IP address that is reachable for it to work. So I am not sure what trying to run as a service introduces in the way of complexity or wrinkles that cause this problem …

I found a workaround.

Run the agent under the service you want. Find the SID of the service using Powershell Get-ADUser or something. Export the following from the registry:

HKEY_CURRENT_USER\Software\Quest Software

Search for HKEY_CURRENT_USER in that file and replace with HKEY_USERS{SERVICE_ACCOUNT_SID}

Restart the agent services using Powershell with something like:

get-service -include “bench*” | restart-service

All is well.

Whew - that went right over my head :slight_smile:

Anyhow - you ought to write a blog for toad world on this in case anyone else could benefit from you research. It probably should not have required so much work on your part (i.e. we should maybe rework some of the logic that forced you here). But we really don;t support running agents as a service - so you kind of were on your own.

So glad you found a solution - and sorry could not be of more help …