-2

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

Gaël J
  • 11,274
  • 4
  • 17
  • 32
  • 1
    Please [don't show images of text](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors). Copy-paste text *as text* into your questions. Also please take some time to read [the help pages](http://stackoverflow.com/help), take the SO [tour], read [ask], as well as [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Mar 21 '23 at 07:59
  • 1
    Please explain why this question is tagged with C++ – paddy Mar 21 '23 at 08:01

2 Answers2

1

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

luk2302
  • 55,258
  • 23
  • 97
  • 137
Hytrax
  • 168
  • 5
1

Use netstat -tulpn or ss -tulpn and look at used ports. Find app and pid that uses this port.