뚜벅이

[Salesforce/WINDOW] Authorize하다 뜨는 1717 에러 빠르게 잡는법(2) - feat. chatGPT 본문

카테고리 없음

[Salesforce/WINDOW] Authorize하다 뜨는 1717 에러 빠르게 잡는법(2) - feat. chatGPT

ZZM 2024. 7. 25. 05:32

 

To find the process ID (PID) of a process that is using a specific port number on a Windows system, you can use the command-line tool netstat along with some additional scripting to filter and extract the relevant information. The port number you've mentioned is 1717, so I'll guide you through the steps to find the PID associated with this port.

You can execute the following steps using the Command Prompt or PowerShell:

Using Command Prompt

  1. Open Command Prompt as an administrator.
  2. Type the following command:
netstat -aon | findstr :1717

This command will list all connections and listening ports along with the PIDs that are using port 1717.

Using PowerShell

PowerShell offers a more powerful scripting environment, which can be useful if you want to extract or manipulate the output further.

  1. Open PowerShell as an administrator.
  2. Execute the following command:
Get-NetTCPConnection -LocalPort 1717

//This command uses the Get-NetTCPConnection cmdlet to fetch all TCP connections 
that are using the local port 1717. 
It will provide details including the PID.

Example of Automating in a Script

If you frequently need to check for PIDs by port and perhaps take actions based on those PIDs, you might consider automating the process with a script. Here’s a simple PowerShell script example:

//Powershell
$port = 1717 $connections = Get-NetTCPConnection -LocalPort $port foreach ($conn in $connections) { $process = Get-Process -Id $conn.OwningProcess Write-Output "PID: $($process.Id) - Process Name: $($process.ProcessName)" }

This script retrieves all TCP connections using the specified port and fetches the process details for each connection found.

Further Reading and Official Documentation

For more detailed information about the netstat command and its usage, you can refer to the Microsoft documentation: Netstat.

For PowerShell and its networking cmdlets, check out: Get-NetTCPConnection.

 

 

 

 

 

 

 

https://chatgpt.com/share/a33cad5a-82c5-4ac0-a4ff-675d6ba8bdde