skip to Main Content

Terminal screenshot

use lsof to show a port, but every port return same info…

[kfadmin@master fundrisksys]$ lsof -i:136
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0

[kfadmin@master fundrisksys]$ lsof -i:7895
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0
24223   /usr/bin/bash   /dev/pts/0

I can’t use any port, it shows same info:
Bind for 0.0.0.0:8001 failed: port is already allocated

I try to kill the pid, but the terminal will be killed

2

Answers


  1. Did you try to run a docker ps -a?
    Maybe you have a stopped container that has reserved this port.

    Login or Signup to reply.
  2. Use netstat -tulpn or ss -tulpn and look at used ports. Find app and pid that uses this port.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search