게시글
질문&답변
Email operator로 메일 전송하기 오류 내용에 대한 도움 부탁드립니다.
안녕하세요. 선생님.회사 네트워크에서는 위와 같이 실패를 했는데,집에서 네트워크 접속해서 시도하니 성공했습니다.회사 네트워크에서 구글 smtp 관련 차단 되었는 모양이네요.
- 0
- 3
- 31
질문&답변
Email operator로 메일 전송하기 오류 내용에 대한 도움 부탁드립니다.
docker-compose.yaml 파일 과 dag 파일 내용은 아래와 같습니다.(사진) (사진)
- 0
- 3
- 31
질문&답변
Email operator로 메일 전송하기 오류 내용에 대한 도움 부탁드립니다.
[2025-02-19, 14:59:44 KST] {warnings.py:112} WARNING - /home/***/.local/lib/python3.12/site-packages/***/utils/email.py:155: RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) [2025-02-19, 14:59:44 KST] {email.py:272} INFO - Email alerting: attempt 1 [2025-02-19, 15:00:14 KST] {email.py:272} INFO - Email alerting: attempt 2 [2025-02-19, 15:00:44 KST] {email.py:272} INFO - Email alerting: attempt 3 [2025-02-19, 15:01:14 KST] {email.py:272} INFO - Email alerting: attempt 4 [2025-02-19, 15:01:45 KST] {email.py:272} INFO - Email alerting: attempt 5 [2025-02-19, 15:02:15 KST] {taskinstance.py:3311} ERROR - Task failed with exception Traceback (most recent call last): File "/usr/local/lib/python3.12/smtplib.py", line 398, in getreply line = self.file.readline(_MAXLINE + 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/socket.py", line 720, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ TimeoutError: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 767, in executetask result = executecallable(context=context, **execute_callable_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 733, in executecallable return ExecutionCallableRunner( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/operator_helpers.py", line 252, in run return self.func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/baseoperator.py", line 422, in wrapper return func(self, args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/email.py", line 79, in execute send_email( File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 80, in send_email return backend( ^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 155, in send_email_smtp send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 274, in send_mime_email smtp_conn = getsmtp_connection(smtp_host, smtp_port, smtp_timeout, smtp_ssl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 318, in getsmtp_connection return smtplib.SMTP(host=host, port=port, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/smtplib.py", line 255, in init (code, msg) = self.connect(host, port) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/smtplib.py", line 343, in connect (code, msg) = self.getreply() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/smtplib.py", line 401, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed: " smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out
- 0
- 3
- 31