Links

Change Agent default ports

This article describes how to change the default ports the agent binds to at start-up
Sometimes when using TestProject Agent you might encounter an issue where the Agent default ports are already in use by another program. It's also possible that in some organizations biding to localhost can only be done on specific ports.
In this article, we will explain how to check if another program is using the Agent ports and how to change the Agent default ports. So we can work in a restricted environment.
If you are running in a restricted environment that does not allow binding to ports 8585 / 8433 you can skip to part #2 - change default ports

1) Check if the ports are being used by another program

First, let's run a scan to check if there are other processes that are using the Agent default ports. For that, we will need to quit the TestProject Agent.

Windows:

Open PowerShell as an admin and then run the following command:
Get-Process -Id (Get-NetTCPConnection -LocalPort 8585).OwningProcess
Get-Process -Id (Get-NetTCPConnection -LocalPort 8443).OwningProcess

macOS / Ubuntu:

Open Terminal and then run the following command:
sudo lsof -i :8585
sudo lsof -i :8443
If anything uses these ports when the agent is turned off, that means we should change the Agent default ports.

2) Change default ports

You can change the agent default ports from here.

Windows:

navigate to %appdata%/TestProject/Agent in your run command (⊞ WinKey + R):
you can change the ports from here:

macOS:

Open Files Finder and choose Go form the top menu, select Go to Folder and type:  ~/Library/Application Support/TestProject/Agent/agent-configuration.json
Linux Navigate to ~/.testproject/agent/ and edit the ports using the command:
vi agent-configuration.json from terminal or use any editing tool.
Note:
You can change the proxy and bind the agent to a different interface (IP address) from the same config file.