-2

Though i stop the all server still i am getting these error enter image description here

  • Does this answer your question? [Django Server Error: port is already in use](https://stackoverflow.com/questions/20239232/django-server-error-port-is-already-in-use) – sebtheiler Sep 07 '21 at 18:42
  • 2
    Please don't post images of code or errors; see [How to Ask](https://stackoverflow.com/help/how-to-ask). – kkgarg Sep 10 '21 at 20:29
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 11 '21 at 01:34

2 Answers2

1

You have to run this command: python manage.py migrate.

If the port is already used then first kill process of that port and try again python manage.py runserver

Sabil
  • 3,750
  • 1
  • 5
  • 16
1

To solve Error: That port is already in use, make sure that you have no other applications running that are using 127.0.0.1:8000. If you need help doing that, please see this question.

If that doesn't solve the issue, you can try killing all python process by running killall python.

If that still doesn't work, you can run the server on a different port: python manage.py runserver 7069

(you also need to run python manage.py migrate to apply your migrations)

sebtheiler
  • 2,159
  • 3
  • 16
  • 29
  • Yes but still when i stop the server and start again it's showing same error – satyam singh Sep 07 '21 at 14:04
  • @satyamsingh Did you try killing all Python processes with `killall python`? Did you try running the server on a different port with `python manage.py runserver 7069`? Did you check the question I linked to try to kill any possible process on `127.0.0.1:8000`? – sebtheiler Sep 07 '21 at 18:42