Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

You don't have permission to access that port

In my Django, when I try to run the server, it displays this error.
What should be done to fix the error?enter image description here

What should be done to fix the error?[

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This error message occurs because another process is currently using the same port. To resolve this issue, you can either change the port number in your Django development server, or stop the other process that’s using the port and try again. Here’s how to change the port in Django:

Open your settings.py file.
Look for the following line:
ALLOWED_HOSTS = [‘127.0.0.1’]
Change the port by modifying the following line:
python manage.py runserver 0.0.0.0:<new_port_number>
Save and close the file.
Restart the development server by running the command python manage.py runserver 0.0.0.0:<new_port_number>
Note: Replace <new_port_number> with the desired port number.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading