안녕하세요. Airflow 3.0 에서 EmailOperator 사용시 conn_id 를 세팅하지 않으면 smtp_default 를 기본적으로 사용하고 있어보입니다. smtp_default 세팅은 config 파일에 보니 email_conn_id(AIRFLOW__EMAIL__EMAIL__CONN__ID) 에 세팅되어 있어 EmailOperator 와 fail났을때 smtp_default를 세팅해놓으면 동시에 사용 가능한것은 아닐까요?
아래와 같은 내용을 모르고 Win11 Home 버전에서 도커 설치에 여러가지 시행 착오를 겪고 Windows 11 Home 버전에서도 Hyper-V를 활성화해서 도커 설치에 성공한 방법을 공유드립니다. Windows 10 Pro, Enterprise 및 Education 64비트 버전에서만 사용할 수 있고 Home 버전에서는 사용할 수 없습니다. 특히 Docker Desktop for Windows 설치를 위해서는 반드시 Hyper-V를 지원하는 OS가 필요하지만 Home 버전에서는 Hyper-V 기능을 사용할 수 없는 탓에 Docker Toolbox(Virtual Box)를 이용한 가상화를 통해서만 Docker를 설치할 수 있습니다. 참고 사이트 https://forbes.tistory.com/542#google_vignette 1. 도커 에러 -> WSL2 설치 -> 도커 실행 X 2. Ubuntu 실행 에러 Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x800701bc Error: 0x800701bc WSL 2? ?? ?? ?? ????? ?????. ??? ??? https://aka.ms/wsl2kernel? ??????. Press any key to continue... -> Windows 기능 켜기 -> 도커 실행 X Linux용 Windows 하위 시스템 Windows - 하이퍼바이저 플랫폼(Hyper-V) 가상 머신 플랫폼 참고 사이트 https://mi2mic.tistory.com/228 3. Hyper-V 활성화 참고 사이트 https://geekorea.com/how-to-enable-hyper-v-windows11-home/ 4. 도커 설치 완료
wsl에서 docker설치하고, airflow를 설치해서, localhost:8080으로 들어갔는데 화면에 아래와 같은 애러가 뜨면서, Dag화면이 안뜨는 상태입니다. 해결방법에 대해 말씀해주시면 감사하겠습니다. 화면 에러내용 에러내용 /home/airflow/.local/lib/python3.12/site-packages/airflow/example_dags/standard/example_external_task_parent_deferrable.py Timestamp: 2025-07-13, 06:22:35 Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/home/airflow/.local/lib/python3.12/site-packages/airflow/example_dags/standard/example_external_task_parent_deferrable.py", line 60, in <module> from tests_common.test_utils.watcher import watcher ModuleNotFoundError: No module named 'tests_common'
안녕하세요 강의 수강중인데 어떤 버전으로 진행하면되는지 문의드리고자. 현재 '섹션 2. Airflow 설치' 부분에 '5. 도커&에어플로우 설치'를 강의를 듣고 있습니다. 강의 도입부에 airflow 설치시 2.10.5 버전으로 설치 부탁하셨는데, 강의 중반부에 Airflow 3대 버전으로 영상이 업데이트 완료되어 최신 버전 docker-compose.yaml 로 설치하라고 안내해주셔서요. 어떤 버전으로 강의를 진행하면될까요?
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL. # # WARNING: This configuration is for local development. Do not use it in a production deployment. # # This configuration supports basic configuration using environment variables or an .env file # The following variables are supported: # # AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow. # Default: apache/airflow:3.0.2 # AIRFLOW_UID - User ID in Airflow containers # Default: 50000 # AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed. # Default: . # Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode # # _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account (if requested). # Default: airflow # _AIRFLOW_WWW_USER_PASSWORD - Password for the administrator account (if requested). # Default: airflow # _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers. # Use this option ONLY for quick checks. Installing requirements at container # startup is done EVERY TIME the service is started. # A better way is to build a custom image or extend the official image # as described in https://airflow.apache.org/docs/docker-stack/build.html. # Default: '' # # Feel free to modify this file to suit your needs. --- x-airflow-common: &airflow-common # In order to add custom dependencies or upgrade provider distributions you can use your extended image. # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml # and uncomment the "build" line below, Then run `docker-compose build` to build the images. image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:3.0.2} # build: . environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__AUTH_MANAGER: airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0 AIRFLOW__CORE__FERNET_KEY: '' AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true' AIRFLOW__CORE__LOAD_EXAMPLES: 'true' AIRFLOW__CORE__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:8080/execution/' # yamllint disable rule:line-length # Use simple http server on scheduler for health checks # See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server # yamllint enable rule:line-length AIRFLOW__SCHEDULER__ENABLE_HEALTH_CHECK: 'true' # WARNING: Use _PIP_ADDITIONAL_REQUIREMENTS option ONLY for a quick checks # for other purpose (development, test and especially production usage) build/extend Airflow image. _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-} # The following line can be used to set a custom config file, stored in the local config folder AIRFLOW_CONFIG: '/opt/airflow/config/airflow.cfg' volumes: - ${AIRFLOW_PROJ_DIR:-.}/airflow/dags:/opt/airflow/dags - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs - ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config - ${AIRFLOW_PROJ_DIR:-.}/airflow/plugins:/opt/airflow/plugins - ${AIRFLOW_PROJ_DIR:-.}/airflow/files:/opt/airflow/files user: "${AIRFLOW_UID:-50000}:0" depends_on: &airflow-common-depends-on redis: condition: service_healthy postgres: condition: service_healthy services: postgres_custom: image: postgres:13 environment: POSTGRES_USER: leeyujin POSTGRES_PASSWORD: leeyujin POSTGRES_DB: leeyujin volumes: - postgres-custom-db-volume:/var/lib/postgresql/data ports: - 5432:5432 networks: network_custom: ipv4_address: 172.28.0.3 postgres: image: postgres:13 environment: POSTGRES_USER: airflow POSTGRES_PASSWORD: airflow POSTGRES_DB: airflow volumes: - postgres-db-volume:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-U", "airflow"] interval: 10s retries: 5 start_period: 5s restart: always ports: - 5431:5432 networks: network_custom: ipv4_address: 172.28.0.4 redis: # Redis is limited to 7.2-bookworm due to licencing change # https://redis.io/blog/redis-adopts-dual-source-available-licensing/ image: redis:7.2-bookworm expose: - 6379 healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 30s retries: 50 start_period: 30s restart: always networks: network_custom: ipv4_address: 172.28.0.5 airflow-apiserver: <<: *airflow-common command: api-server ports: - "8080:8080" healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.6 airflow-scheduler: <<: *airflow-common command: scheduler healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8974/health"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.7 postgres 실습 때문에 yaml 파일 수정 후부터 만든 모든 파일이 web ui에 안 올라가져요.. git을 통해 로컬이나 컨테이너 각 디렉토리에는 파일들이 잘 들어가있습니다. dag 파일 코드 오류일까봐 이미 올라가져있던 파일 코드 복붙해서 test_dag.py를 만들었는데 그것도 안 올라갑니다ㅜㅜ..
로컬 Windows 환경에서 Airflow DAG 파일을 만들고 Git Push를 한 후, WSL 루트경로에서 다시 Git Pull을 받아 Docker Compose up을 하는 식으로 이해했는데요. 왜 wsl에 루트경로에서 git pull을 받나요? wsl과 windows가 분리됐다고 해도 wsl에서도 windows에서 작업했던 디렉토리에 접근할 수 있지 않나요? 그러면 git pull을 굳이 하지 않아도 되지 않나요?
BaseOperator 생성이 문제일까요? Invalid URL Error 가 나네요. *** Could not read served logs: Invalid URL 'http://:8793/log/dag_id=dags_seoul_api_corona/run_id=manual__2025-06-13T01:23:17.406645+00:00/task_id=tb_corona19_count_status/attempt=1.log': No host supplied
airflow 3.* 를 기준으로 data_interval_start 나 data_interval_end 모두 같은 시간이 나와서 기존 gitHub 코드로 실습하니 기대했던 것과는 다른 log 결과가 반환 되었습니다. 이럴 경우 어떻게 코드를 수정해야 하는지 가르쳐주실 수 있을까요? ( 혹시 섹션 19에서 다루셨다면 미리 사과드립니다 .. )
선생님 안녕하세요 airflow 업데이트에 따라서 강의도 업데이트 해주셔서 정말 감사합니다. 이전에 한번 듣고 다시 복습해서 듣고 있는데, 정말 도움이 많이 되네요 제가 아직 2.10 부분 업데이트를 안들은 상태인데, 3.0 부분 업데이트가 새로 있더라고요. 혹시 2.10 부분 업데이트 강의는 skip하고 3.0 업데이트 부분만 들어도 괜찮을까요?
안녕하세요. email operator dag을 수행하니 다음과 같이 에러가 납니다. 아래는 제 yaml 파일 설정과 dag 파일입니다. 참고로, google 계정의 보안메뉴에서 앱 비밀번호 설정 메뉴가 조금 바뀌어서 제가 나름대로 search 하여서 앱 번호를 받았습니다. 제 dag입니다. 혹시 airflow.cfg 파일에 들어가보니 SMTP 설정이 되어 있지 않습니다. 관련이 있을까요? 에어플로우 UI 메뉴에서 admin - Connections 에 들어가보았더니 connection이 아무것도 없습니다. 도와주세요!
강사님 airflow 설치 과정 중 example_bash_operator 의 dag 가 전혀보이지않아 문의드립니다 . 강의대로 따라하고 docker compose up 시, 정상작동을 하는 것같고 다른분들은 example_bash_operator의 dag이 잘보이는거 같은데, 저만 따로 보이지가 않네요.. 어떻게 해결을 하면 좋을까요?
질문이 있습니다. [Bash Operator & 외부 쉘파일 수행하기] 강의의 22:20 즈음에 설명해주시는 Unpaused 이후 Dag 의 자동 실행이 어떤 조건에 일어나는 지를 설명해주셨습니다. 그리고 여기서 Next Run 이후의 시간에 Unpause 를 해도, 동작 안하므로 Trigger 를 수동으로 클릭해야 된다고 알려주십니다. 그런데 이후에... [Python 오퍼레이터 기본] 강의의 10:30 즈음에 Unpause 를 누르자 자동으로 실행이 되는 걸 확인할 수 있습니다. 10:21 에는 분명 Next Run 이 2023-03-18, 06:30:00 이라서 분명 과거인데도 자동으로 시작이 되고 있습니다. Next Run 이후의 시간대에서 Unpause 를 하면 자동 실행이 안되서 Trigger 를 한번 해줘야되는 거 아니였나요? 여기서는 왜 실행이 된 건가요??