What can I do when OneAgent blocks a port I need?

Dynatrace OneAgent consists of different processes that communicate via a TCP port with a watchdog. At startup Dynatrace OneAgent attempts to open the first available port between port 50000 and 50100. In some cases you may need this port for your own applications that are started after Dynatrace OneAgent. In such cases, you can change the port range that the Dynatrace OneAgent watchdog uses by modifying the file watchdoguserconfig.conf.

The file watchdoguserconfig.conf is located in the following directory:

  • On Linux at /var/lib/dynatrace/oneagent/agent/config
  • On Windows at %ProgramData%\dynatrace\oneagent\agent\config

You can change the watchdog listening port by modifying the following line in the file:

From, for example: -portrange=50100:50100

To: -portrange=3000:3010

Be sure to restart Dynatrace OneAgent service following your changes.