How to resolve port conflicts between XProtect and third-party software

Port conflicts can prevent XProtect® components from running properly. This article describes how to identify processes causing a port conflict, and then resolve them.

13-09-2019How To
Article Details
Article Number: 000018052
Version: 1
Audience: Professional
First Published: 2019-9-13
Last Modified: 2019-9-13

Overview

If you suspect a port conflict, you need to find the process using the specific port. The process can be found via its process ID (PID). When found, the process can be terminated to free the port. Eventually, the resolution must be made permanent:

  • Step 1: Finding the process ID (PID).
  • Step 2: Checking which process is using the port.
  • Step 3: Terminating the blocking process.
  • Step 4: Preventing future port conflicts.

Step 1: Finding the process ID (PID)

  1. Open the command prompt (Start menu or Windows key + R, type "cmd").
  2. Type: netstat -aon | find ":[port_number]".
    Replace the [port_number] with the actual port number that you want to check and press Enter.
  3. If the port is being used by any process, then its PID will be shown in the last field of the line. Make note of this.

Example: The port number 7563 is used by the process with the PID 4828.
C:\windows\system32>netstat -aon | find ":7563"
  TCP    0.0.0.0:7563           0.0.0.0:0              LISTENING       4828

Step 2: Checking which process is using the port

This step is not actually necessary to terminate the process. But it is useful to identify the software which has started the process, and then either uninstall, disable, or reconfigure the software to use another port.

There are two ways to identify a process by its PID: a) using the tasklist command, or b) using the Task Manager.

a) Using the tasklist command:

  1. Type tasklist | find "[PID]".
    Replace the [PID] with the number from the above step and hit Enter.
  2. You’ll be shown the application name that is using your port number.

b) Using the Task Manager:

  1. Open the Task Manager.
  2. Go to the "Details" tab.
  3. Sort the processes by their PID and find the process in question.
  4. If you want to see the location of the command on the disk, make the columns "Image path name" or "Command line" visible.

Example for using the tasklist command: The PID 4828 belongs to the Recording Server.
C:\windows\system32>tasklist | find "4828"
VideoOS.Recorder.Service.     4828 Services                   0    126.248 K
(Note that the tasklist command truncates long process names!)

Step 3: Terminating the blocking process

Once you have the PID, you can terminate the process. There are two ways of terminating a process: a) using the taskkill command, or b) using the Task Manager.

a) Using the taskkill command:

  • Open an elevated command prompt (Administrator).
  • Run the following command: taskkill /f /pid [PID] 
    (replace [PID] with the actual PID).
  • Important: If the process has spawned child processes, you must also terminate them.

b) Using the Task Manager:

  • Open the Task Manager and go to "Details".
  • Sort the processes by their PID and find the process in question.
  • Right-click on the process in question and select "End process tree". It will terminate the process itself and all processes spawned by it.

When you get the PID of the application using the port, open Task Manager, go to Services, then search for the PID in the list and see what application is using the port. Then you can change the port number that it is using.

Step 4: Preventing future port conflicts

So far the port conflict has been resolved temporarily. To solve the conflict permanently, do either of the following:

  • Uninstall the software which you identified in step 2.
  • If the software found in step 2 runs as a service, you can disable it.
  • If you know how to do it, you could reconfigure the software found in step 2 to use another port number. (It is recommended that you contact the software vendor to confirm the process and any adverse effects this may have, if any.)
  • If none of the above is an option, you might consider reconfiguring XProtect to use other ports.
Go to top