Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)

I am encountering an error message while trying to start the server using the command prompt:

python manage.py runserver 0.0.0.0:8000

The error message is:

C:\abc>python manage.py runserver 0.0.0.0:8000

Validating models...

0 errors found

Django version 1.4.9, using settings 'abc.settings'

Development server is running at http://0.0.0.0:8000/

Quit the server with CTRL-BREAK.

But I can't access in the browser via http://127.0.0.1:8000

It is showing :

Unable to connect

Firefox can't establish a connection to the server at 127.0.0.1:8000.

The site could be temporarily unavailable or too busy. Try again in a few moments.

If you are unable to load any pages, check your computer's network connection.

If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

But when I am attempting the same by:

python manage.py runserver 

It is working fine. What can be the issue?

1 Answer

0 votes
by (108k points)

I think that the Port 8000 is currently used by your external IP. I would suggest you check if the process is running or not, if it is running then kill it.

You can check that by opening the ports with:

netstat -a 

In Debian you will get the PID with:

 netstat -tulpn | grep 8000

 The last line will show you something like 1234/python. Now kill it with:

 kill 1234

The other option will just restart your system.

Related questions

0 votes
4 answers
asked Apr 11, 2021 in Python by laddulakshana (16.4k points)
0 votes
1 answer
asked Feb 25, 2021 in Python by laddulakshana (16.4k points)
0 votes
1 answer

Browse Categories

...