250x250
반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- macbook
- axios
- MongoDB
- fastapi
- webhook
- docker
- Spring
- python
- AWS EC2
- error
- github
- Jenkins
- Github Actions
- RDS
- linux
- MUI
- AWS
- js
- EC2
- deploy
- ngrok
- springboot
- javascript
- React
- Java
- Troubleshooting
- nodejs
- 500
- Express
- TypeScript
Archives
- Today
- Total
BEAT A SHOTGUN
[TROUBLESHOOTING] ConnectionRefusedError: [WinError 10061] No connection ... or DoesNotExist: Site matching query does not exist. 본문
TROUBLESHOOTING
[TROUBLESHOOTING] ConnectionRefusedError: [WinError 10061] No connection ... or DoesNotExist: Site matching query does not exist.
thovy 2023. 7. 5. 16:25728x90
반응형
SMALL
Django 를 이용해 User Create 를 시도하고 있었다.
Database 에 잘 저장되지만, 에러페이지를 출력했다.ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it 혹은DoesNotExist: Site matching query does not exist 라는 에러.


어떤 상황에서 어떻게 해결할 수 있는지 한 번 알아보자.
시작
우선 현재 환경은Django 를 사용해서 서버를 만들고 있는 중이다.Djangorestframework 를 사용하고dj-rest-auth, allauth 를 사용하고 있다.
email 항목
우선 user 에서 email 항목을 받지 않는다면 두 에러는 발생하지 않는다.
하지만 email을 받아야한다면,
site matching error
settings.py 에 SITE_ID = {num} 가 없으면 Site matching error 가 발생하는 것을 알 수 있다.

Connection Refused Error
settings.py에 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 가 없으면 Connection refused Error 가 발생한다.

SOLUTION ✅
settings.py 에 두 항목을 넣어주자.
/settings.py
...
SITE_ID = 1
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
...
여담.
email 주소가 이상한 것과는 상관없다. (ex. emailtest1@test.com)
없거나. 저 항목들을 추가하거나.
끝

728x90
반응형
LIST
'TROUBLESHOOTING' 카테고리의 다른 글
| [TROUBLESHOOTING] Another CORS ERROR (0) | 2023.08.22 |
|---|---|
| [TROUBLESHOOTING] selenium error (0) | 2023.07.13 |
| [TROUBLESHOOTING] Flutter web CORS (0) | 2023.05.14 |
| [TROUBLESHOOTING] Flutter Doctor - Visual Studio - develop for Windows (0) | 2023.04.25 |
| [TROUBLESHOOTING] http 페이지를 https 로 Redirection 하고 싶나요? (0) | 2023.04.07 |
Comments