Rx Agent switching subnets - Timeout

Best practices, code snippets for common functionality, examples, and guidelines.
MUP
Posts: 12
Joined: Sat Aug 21, 2021 2:34 pm

Rx Agent switching subnets - Timeout

Post by MUP » Sun Oct 17, 2021 11:31 am

Rx Studio 10.1.1 is installed on a separate PC.
Premium lic. paid.
LAN only.

There is also a hardware-device for testing purposes.
Remote Agent 7. is installed, runtime lic paid.
LAN and Wifi.

2 network connections are configured in different subnets: 1x LAN, 1x Wifi
Metrics are set to "Automatic."
No DHCP, No DNS are in use.
Standardgateway is APIPA based, so the IP used before loosing a subnet connection will not lead to loosing the IP used before.

Active user sessions running same user/passw. on Windows 10 Pro 64bit (same update level).

LAN is the same Subnet on both devices.
Routing from LAN to Wifi is setup and works properly once LAN is disconnected.
Both subnets are working properly.
Ping from one subnet to the other subnet is working in both directions, checked by using Wireshark on PC.
Windows -Firewalls are disabled on both PC and testdevice.

RxStudio on PC is able to connect the RxAgent via IP in both subnets using different IPs.
Presented by same displayname.

All Nightly-Tests (no one is in the office) via LAN are successfully running.
Alle reports are green coloured.
And of course this was done:
https://www.ranorex.com/rx-media/rx-use ... 000050.png

Once removing the LAN cable from the test-device by hand, the Wifi became active.
Ping to PC is working fine.
Also a Ping from PC.

But RxStudio now told me:
Agent is Offline for LAN (that's OK) and Offline for Wifi (that's NOT OK).

Running a test from PC in this situation via CLI after a short time a message on the CLI windows is presented:
Agent not reachable, 2 rows with same displayname and same computername.

My workaround in this situation is
arp -a
save the current IP for the remote device with known MAC
arp -d
brute force ping the whole network
getting the IP for the remote device
arp -s <IP> <MAC>
That works well for Rx-CLI testing, but is not state of the art when using a modern RxStudio App.

So my questions are:
- How to reload one of both Agent-connections automatically in case of a failing sub-network?
- How to increase the timeout for Agent-network connections?

Thanks.

Jacob
Certified Professional
Certified Professional
Posts: 85
Joined: Mon Mar 22, 2021 10:01 pm

Re: Rx Agent switching subnets - Timeout

Post by Jacob » Fri Oct 22, 2021 7:01 pm

Hi MUP,
MUP wrote:
Sun Oct 17, 2021 11:31 am
So my questions are:
- How to reload one of both Agent-connections automatically in case of a failing sub-network?
- How to increase the timeout for Agent-network connections?
For your first issue, do you have access to the NAT settings on the network? One step to mitigation may just be to configure the network settings so that there is a route in place to ensure a good connection between the Ranorex Studio machine and the Ranorex Agent machine.

You can increase the local timeout at the Agent by navigating to the config.toml file for the Agent. You can do this with the following method:
1. Open the Ranorex Agent
2. Click on the Menu button in the top, right-hand corner of the window
3. Select "Show files..."
4. A Windows Explorer window should open
5. Open the config.toml file in your favorite text editor
6. Update the SessionReconnectTimeout property on line 11 to your desired value
7. Save the file and close the text editor
8. Restart the Ranorex Agent
Image

MUP
Posts: 12
Joined: Sat Aug 21, 2021 2:34 pm

Re: Rx Agent switching subnets - Timeout

Post by MUP » Sat Oct 30, 2021 7:38 am

Thanks for replying.

Fixed it finally by adding a physical DNS relay and a logical GPO object.
Now it is possible to use FQDN when handling with CLI calls independent of IP.