Back

lsof

Ports left open after processes stop or die can be resolved.

Netstat - to identify ports

netstat -ap | grep <port>

This should show a pid number at the very end.
If there is no PID you may see FIN_WAIT1.
This is a TCP issue which you can fix by changing the tcp_orphan_retries value.
You must set the value back after the FIN_WAIT1 have all closed.

sysctl -a | grep max_orphans
sysctl -w net.ipv4.tcp_max_orphans=0
  • linux/lsof.txt
  • Last modified: 2018/05/25 13:05
  • (external edit)