코딩/에러

[Django 에러] 장고에러 Error: [Errno 11001] getaddrinfo failed

유어노우 2020. 12. 15. 00:01

 

장고를 실행 하였더니 장고 에러 발생

Error: [Errno 11001] getaddrinfo failed

 

여기서 힌트를 얻었다

gitter.im/DjangoGirls/tutorial?at=5dffcc8f090f13796834246d

 

DjangoGirls/tutorial

@mezaacor: Hello, I am working with djangogirls/tutorial in mi computer every thing working, but in pythonanywhere the pages look differents, I think that the data base is not updated. Some one have a similar problem? Please, let me know, thanks a lot

gitter.im

 

대화 내용 일부를 복사 해왔다.

Nollonpollon @Nollonpollon 12월 26 2019 01:33
Hi, I'm running through the tutorial and trying to deploy the server. But I'm getting this error when I try to run it: "Error: [errno 11001] getaddrinfo failed"

dtomlinson91 @dtomlinson91 12월 26 2019 10:00
@Nollonpollon did you fill in ALLOWED_HOSTS in your mysite/settings.py file? Or is it an empty list?

Nollonpollon @Nollonpollon 12월 26 2019 11:33
@dtomlinson91 Hi, I tried both filling it out and keeping it empty 🙂

dtomlinson91 @dtomlinson91 12월 26 2019 11:45
Do you know if you are behind a proxy? This error is raised from the socket package: https://docs.python.org/3.5/library/socket.html#socket.getaddrinfo and could be for many reasons, I've seen it if it cannot resolve a hostname when I'm behind a proxy server.

Are you trying to start the webserver locally, or are you trying to host on pythonanywhere?


Nollonpollon @Nollonpollon 12월 26 2019 12:02
Makes sense, but i'm not behind a proxy. I'm just trying to host it locally for now

읽다가 보면 어쩌구 locally ~

 

내가 실행한 명령어 이다.

이러면 외부접속이 가능한데 여기서 에러가 났나보다 

python manage.py runserver 0:8000

 

그래서 아래와 같이 실행 했더니 정상적으로 실행

python manage.py runserver

 

 

흠... 맥북에선는

 

ALLOWED_HOSTS = ['*'] 에 포트포워딩만 하면 가능했는데 

 

내가 무엇을 놓쳤는가...