Reputation: 21
(base) osx@localhost Api_test % python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
July 16, 2020 - 05:36:03
Django version 3.0.8, using settings 'Api_test.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.
(base) osx@localhost Api_test %
Upvotes: 1
Views: 138
Reputation: 1306
I've ran into this problem for a while now and I always use the code below:
fuser -k 8000/tcp
I'm on Ubuntu and I have this issue...even tried VSCode's and Pycharm's terminals but got no answer then tried above code and it worked for me.
Upvotes: 0
Reputation: 6234
if you're using mac try any of the following:
lsof -n -i4TCP:8000
sudo lsof -i tcp:8000
npx kill-port 8000
if you are using linux:
sudo fuser -k 8000/tcp
Upvotes: 1