Меню

Installing Agent on Windows
Installing agent on Windows

PIX Agent is included in PIX Studio as of version 1.12. It can be installed by enabling the related setting in the PIX installer.
After successful installation, an icon will appear on your desktop.
PIX Agent runs in the background.
You can check for a running instance of the application in the Task Manager or in the tray.
Registering an agent in the Master
To add a new agent to Master, follow these steps:

1) Authenticate in the Master.
2) Switch to the "Agents " tab and click the [Add Agent] button.
3) Fill in the Name (agent name) and Description (if necessary) fields.
The Agent_ID field is autogenerated. This is a unique key that is required to connect the Agent.

4) Click the "Save" to create an entry.
Certificate registration
The connection is made through a secure channel. Therefore, before connecting an Agent to the Master, you must add the Master certificate to the trusted root certificates on the machine on which Agent is installed.
To do this:
1) Start Chrome and open the Master on the machine on which Agent is installed.
2) Download the certificate that causes a conflict in Chrome.
3) Install the certificate on the local machine.

For an agent to be succesfully authorized, the server DNS name and the certificate recipient's name must match.

If you cannot navigate to the DNS name from the "Issued to" field, you can create a DNS entry at "C:\Windows\System32\drivers\etc\hosts".
Connect Agent to Master

The agent settings window can be accessed through a tray icon by double-clicking it with the left mouse button.
The settings window contains:

Data for connecting to Master:
1) URL - link to the public Master. You can copy it from the browser line.
Select symbols up to «/».

2) Agent ID - agent ID in Master.
Status bar - shows the current state of the agent (connected, not connected, connection in progress).
Connect/Disconnect agent to the master button.
After filling in the data, press the "Connect " button. If all steps are done correctly and the data in the settings are filled in, the Agent will show the status "Connected ".

You can also check the connection in the "Agents" list in the Master (the indicator of the corresponding agent will be green).

Only one task at a time can be run on an Agent
The PIX Agent has a system that makes it impossible to run more than one task on an Agent.
When trying to launch a task from Master - an agent will return a message that it's already busy and the task will stop with the "Failed" status.
Switch between old and new RDP client
PIX Studio 2.16.2 supports the TLS 1.2 cryptographic protocol for RDP (Remote Desktop Protocol) interaction. TLS 1.2 provides a more secure transmission of data than the previously used TLS 1.0.
The RDP session is started by a new client - wfreerdp.exe.
In some cases, the new RDP client causes errors in the operation of robots, including those that worked fine on previous versions of PIX Studio and PIX Agent, that is why PIX Studio version 2.16.5 and later adds the ability to switch between the old and the new RDP client (FreeRdpClient.exe and wfreerdp.exe). The old RDP client - FreeRdpClient.exe - is used by default.
    There is a checkbox to enable the old RDP client (R).

    There is a parameter in the command line interface for the connect command called
    --legacy-session-auth, which has true or false value.
    If not specified, the parameter is assumed to be true. This parameter is primarily needed to set the mode when running the agent through a host.
    Robot in a separate process
    To improve the stability of the PIX Agent, it is possible to run the Robot in a separate process from the Agent. This will reduce the Agent's memory usage within a single process. The Agent won't need to keep itself in the memory of activity libraries since they are only used by the Robot. This way, the Agent is used to communicate with the PIX Master and serves to transmit data and status of script execution by the Robot.

    How to start a Robot in a separate process:
    • In the Agent, check the "Run robot at separate process" box (R).

    By default, the checkbox is inactive.
    • The Robot is started from an Agent with parameters.
    • While running the script Robot exchanges messages with the Agent: logs, commands, requests for the PIX Master.
    • The agent sends requests to the PIX Master and waits for a response.
    • After receiving the data from the Master, the Agent sends it to the Robot.
      The PIX Master logs now store information about the mode in which the robot has been started:

      RDP client settings in appsettings.json:
      
         "HostHubConnectionOptions": {
           "MasterUri": "https://localhost:5001",
           "MachineId": "00000000-0000-0000-0000-000000000000" 
         },
      +  "RdpOptions": {
      +   "UseLegacyRdpClient": true
      +  },
      +  "AgentOptions": {
      +    "UseLegacyRdpClient": true
      +  }
       }
      
      
      The contents of the RdpOptions block determine which RDP client the host will use when starting a session for an Agent.
      The contents of the AgentOptions block determine which RDP Client an Agent will use to hold an RDP session (similar to the setting in the UI).
        No new blocks will be added to the configuration when Agent.Host is updated. If the user needs to use these settings, blocks have to be added manually.
        Visualization of the loss of communication with the Agent.
        If the connection with the Agent is lost during the task - the Agent connection icon will become orange. When the connection is restored - the agent will be marked green.

        Forced restart mode.

        Prior to Master 2.15.3, if an abnormal stopping of the Agent occurred, Master would stop running tasks on that Agent until the administrator would manually restart it.

        This situation was believed to require intervention and investigation by administrators.

        It is now possible to add a new parameter for Master in appsettings.json:
        "ReuseFailedAgent": true
        With this parameter set to "true" the Master will make autonomous attempts to restart the Agent.
        Mechanism of receiving system fail signals from Agent Host.

        PIX Master can receive signals from Agent Host in case of an abnormal Agent shutdown (in this case the Agent itself can't send any signals to the Master, which causes the task queue to freeze).
        Having received a signal from Agent Host - Master forcibly marks the task as incomplete, changing its status to Disconnected.
        Block the transfer of Agent credentials if no RDP session is configured.
        When requesting Agent data from AgentHostService, there is a check if the "With Credential" flag (С) is set for the Agent (used for keeping an RDP session online).

        If the flag is not set, the login and password are not transmitted when prompted, and the error entry "Login cannot be empty" is saved in the log.