F
F
fleksss_pod_papicha2021-01-08 18:41:48
Django
fleksss_pod_papicha, 2021-01-08 18:41:48

Why is access to port 8000 denied?

after installing This package
The system started listening on port 8000, which is used by django by default.
I want to release port 8000, how can I do it now?
5ff87d331ffff046717801.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2021-01-08
@bacon

which by standard uses django
no, by default, not by standard, just run runserver on any other port.

C
cgamadeus, 2021-01-11
@cgamadeus

It's just that someone has already occupied the port. If you are sure that there is nothing important, then just drop this process. I wrote a function like this

kill_on_port() {
    port=$(lsof -t -i:$1)
    echo "KILL PROCESS:" $port
    sudo kill -9 $port
}
alias killonport="kill_on_port [email protected]"

Although, if you have Windows, then you need something similar for Windows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question