How to check which program is using a specific port
Or: How to find if a port is used by a different service
It may be necessary to verify what ports are being used by what product (Qlik product or 3rd party). There are different methods to check currently bound ports, most using 3rd party products native to Windows. Note that there are different methods to verify what ports are in use, from 3rd party tools to native Windows such as netsh or various PowerShell commands.
As an administrator, open the Windows command prompt and execute the following command:
This lists active connections including the port numbers, but will not show the program:
Proto Local Address Foreign Address State PID
TCP [::]:5151 [::]:0 LISTENING 1688
To identify what program uses the port, use the PID from the first output and run this command
tasklist /fi "pid eq 1688"
"tasklist | find "[PID_number]"
This will return the service name:
anothersoftware.exe 1688 Services 0 66,192 K
The same can be accomplished using PowerShell. Open PowerShell and execute:
PS> netstat -noa | sls 443
This will return:
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4
Where the last number (in our cases 4) is the Process ID (PID).
The same can be accomplished using Command prompt. 1. Open a command prompt as an administrator. 2. Create a text file named file.txt with the netstat command. 3. Type: netstat -naob > c:\file.txt 4. Open the text file with the following command: C:\file.txt
If ports are enabled it provides you an information that it is listening on port 443 and its service name. For example: TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 7036 [Proxy.exe]