The default port for a FineDataLink project is 8068. The FineDataLink project will fail to start if port 8068 is occupied before project deployment. This document describes how to check whether a port is occupied or not.
lsof Command Introduction
lsof (List Open Files) is a utility that lists files currently open by the system.
lsof -i is used to display process information matching specified conditions. The command should be run with root privileges, as shown in the following figure.
Step
lsof -i:Port number is used to check the usage of a specific port. For example, to check port 8080, use lsof -i:8080, as shown in the following figure.
According to the output above, the process occupying port 8080 is a Java process with a process ID (PID) of 22936.
netstat Command Introduction
The netstat -tunlp command is used to check process information associated with a specific port, as shown in the following figure.
netstat -tunlp|grep Port number is used to check process information associated with a specific port. For example, to check port 8080, execute netstat -tunlp|grep 8080, as shown in the following figure.
netstat -ano lists the status of all ports.
netstat -aon|findstr "Port number" checks the status of a specified port. For example, to check port 8075, run netstat -aon|findstr "8075", as shown in the following figure.
The last column displays corresponding PIDs. You can check applications associated with these PIDs in Task Manager.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy