Provisioning robot clients from ORCH (possibly via CMD)?

orchestrator
cmd_arguments

#1

Currently we are looking into the possibility of automating the provisioning of robots from ORCH 2018.1.1, or possibly from CMD. I think I saw something in the OCH Docs, but I cannot find it anymore.

We would like to be able to spin up a VDI-robot on demand in our VMWare milieu and it should be ready right away. Right now we are stifled by the Robot Key that we have to manually copy from ORCH to the robot client. I was looking through the REST API but I don’t think it is the way forward.

Is there anyone who has an idea or workaround so that we don’t have to manually log onto the client to set the robot key (and URL)?

Best regards
/Klaus


#2

I found the section on command line parameters for enrolling the client here:

However, this means I still have to know the Key and put it into a Powershell)script. I would prefer it if I don’t know the key and that the provisioning is done for me - preferably all in ORCH.
Alternatively, I would do the whole provisioning from CMD or REST (which then both registeres the new robot in ORCH and simulaneously sets up the robot client).

Best regards
/Klaus


#3

Hi Klaus,

You can use Orchestrator API to provision a new robot in Orchestrator. You will get the key in the response, but I think it is also possible to provide a custom key when provisioning the robot.
Then you can use command line to connect the robot to Orchestrator using the same key.

Regards
Silviu


#4

Ah, yes. I followed the section about the ConnectionString but was thrown off since this setting has been moved from the robot to the admin section. I’ll look into both. Thanx, Silviu.

Regards
/Klaus


#5

After a whole day of testing the command line features of the uirobot.exe I found this:

I can get the “uirobot --connect -url -key” to work smootly. Afterwards I open the Settings and can verify that the fields are filled in with the correct values. ORCH is able to “see” and control the client within seconds of issuing the command.

However, when I try with “uirobot --connect -conectiongstring” nothing happens. The command take 1-2 sec then ends as if everything went well. I didnt. When I open the Setting alle fileds are empty. I have tried with various values for the tenantId, even leaving ti blank. No reaction.

I have provisioned the robot with a valid license in my tenant, of course (and copied the connectionstring from the admin page in order to avoid any typos).

The manual states that the database and the webconfig have to have certain settings in place beforehand. I’ve done them and restarted both DB and web server, just in case. I have even allowed for 10 min to pass after trying to connect - ample time for client and ORCH to fidn eachother on the network.

The client can both access the UIPath Admin page (https) and telnet on ports 80, 8080, 443 as to rule out any firewalls. Both ends of the connetion use 2018.1.1. The Studio on the robot client has been activated with a trail license, though. I don’t think that’s an issue, thoug.

It’s rather frustrating as I was almost certain to have an autoprovision proces in place. I want to spin up tens of robots at a time for various customers and I don’t want to connect to each robot afterwards to set key + url.

Any thoughts, anyone?

Reards
/Klaus


#6

Hi Klaus,

Please note that the command to connect the Robot to Orchestrator using the Connection String is case sensitive. Have you tried with UiRobot.exe --connect -connectionString not connectionstring?


#7

Oh yes, Ovi - I’ve played the combination game - differnt case and order of call on the command line. Of course I also have copied the commands from the samples in the manual. All to no avail.
I made an odd observation. When the Settings box is visible displaying empty fields, when I then fire the connectionString verison command from the command line the dialogbox blinks for a brief second but the fields remain empty. I deduce from that behavior that the command has some effect. But sadly not enough to fill in the fields with the correct values.

My next order of business is to spin up two other robot clients and try the same on them. Maybe I have a bad robot :slight_smile:
Best Regards
/Klaus


#8

That’s a good one :smiley:

In a more serious approach, please check if in the UiPath.settings file the ConnectionString parameter is set and if it’s the same as the one in Orchestrator. Also, in Orchestartor IIS - Authentication check if WindowsAuth is set to Enabled.

Did you use the .msi or .exe to install the Robot? Because if your Robot is installed in user-mode(.exe) it won’t connect with connectionString.

Another thing to check is the Event viewer for any errors.

There is no such thing as bad robot :joy:


#9

Hi Ovi,

I øm pretty sure I used the MSI. To make absolutely sure I removed the whole UiPath package, rebooted and installed from the MSI only the robot (full robot, no studio, no orch).
i ran the robot to get the %appData% and %Localdata% files created for me. I then edited the UiPath.settings file as:

{
“NuGetApiKey”: “”,
“NuGetServerUrl”: “%ProgramData%\UiPath\Packages”,
“ActivitiesFeed”: “”,
“UiPathServerUrl”: “https://XXX”,
“TracingLevel”: “Information”,
“LowLevelTracing”: false,
“RobotKey”: “”,
“LoginToConsole”: true,
“ResolutionWidth”: 0,
“ResolutionHeight”: 0,
“ResolutionDepth”: 0,
“ConnectionString”: “https://XXX/api/RobotsService/GetConnectionData?tenantId=2
}

I made sure the WindwosAuth was turned on in web.config on the ORCH (I restartet the IIS).
The I ran the --connect -connectionString with the same connectionstring as in the settings file (which was copied directely from Orch Aadmin | settings - so likely no typos).

Nothins happed. However the UiPath.settings file got changed: The UiPathServerUrl and ConnectioncString was blanked out by the operation.

{
“NuGetApiKey”: “”,
“NuGetServerUrl”: “%ProgramData%\UiPath\Packages”,
“ActivitiesFeed”: “”,
“UiPathServerUrl”: “”,
“TracingLevel”: “Information”,
“LowLevelTracing”: false,
“RobotKey”: “”,
“LoginToConsole”: true,
“ResolutionWidth”: 0,
“ResolutionHeight”: 0,
“ResolutionDepth”: 0,
“ConnectionString”: “”
}

Somehow it seems that the command cannot/wil not perform correctly. I suspected that the Uipath.settings files was locked or needed admin permissions to vbe accessed, so I gave it FULL access rights to EVERYBODY (just to be sure). No change.

What am I missing?

Best regards
/Klaus


#10

Was this ever resolved?

I am having a similar issue. To add, I am getting a 500 internal server error when trying to call GetConnectionData from Swagger: https://myorchestrator/swagger/

{
“message”: “An error has occurred.”,
“errorCode”: 0,
“resourceIds”: null
}
Response Code: 500