尝试使用命令启动服务器时遇到问题
I am facing problem while trying to start the server using the command
python manage.py runserver 0.0.0.0:8000正在显示
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 0.0.0.0:8000/ Quit the server with CTRL-BREAK.但是无法通过在浏览器中访问127.0.0.1:8000
显示为:
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.但是当我尝试通过
python manage.py runserver工作正常。我可以访问应用程序 127.0.0.1:8000
it is working fine. i can access the application 127.0.0.1:8000
可能是问题所在。
推荐答案您的外部IP似乎正在使用端口8000。请查看进程是否正在运行并杀死它。
It looks like Port 8000 is in use by your external IP. Please have a look if a process is running and kill it.
您可以使用 netstat -a 。在Debian中,您可以通过 netstat -tulpn获得PID。 grep 8000 。最后一行应显示类似 1234 / python 的内容。现在,用 kill 1234 杀死它。
You can check the open ports with netstat -a. In Debian you get the PID with netstat -tulpn | grep 8000. The last line should display something like 1234/python. Now kill it with kill 1234.
或者,您可以重新启动系统;-)
Alternative you could restart your system ;-)
更多推荐
Django manage.py runserver无法正常工作
发布评论