반응형
명령을 사용하여 서버를 시작하는 동안 문제가 발생했습니다.
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 http://0.0.0.0:8000/
Quit the server with CTRL-BREAK.
그러나 http://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
잘 작동합니다. 응용 프로그램 http://127.0.0.1:8000
에 액세스 할 수 있습니다.
무엇이 문제 일 수 있습니다.
해결 방법
외부 IP에서 포트 8000을 사용중인 것 같습니다. 프로세스가 실행 중인지 확인하고 종료하십시오.
netstat -a
로 열린 포트를 확인할 수 있습니다. 데비안에서는 netstat -tulpn | grep 8000
. 마지막 줄은 1234 / python
과 같이 표시되어야합니다. 이제 kill 1234
로 그것을 죽이십시오.
또는 시스템을 다시 시작할 수 있습니다 ;-)
참조 페이지 https://stackoverflow.com/questions/21374912
반응형
'파이썬' 카테고리의 다른 글
파이썬 Python에서 변수를 사용하여 클래스의 인스턴스 만들기 (0) | 2020.12.25 |
---|---|
파이썬 Windows 8에 Python 2.7 설치 (0) | 2020.12.25 |
파이썬 Python에서 두 개의 타임 스탬프 비교 (0) | 2020.12.24 |
파이썬 디렉토리에있는 파일 만 가져 오는 방법은 무엇입니까? (0) | 2020.12.24 |
파이썬 scipy의 버전을 확인하는 방법 (0) | 2020.12.24 |
댓글