묻고 답해요
156만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
병렬처리 질문드립니다.
안녕하세요 선생님 🙂 airflow 실습중에 airflow의 병렬처리에서 메시지 큐가 어떻게 처리되는지 궁금하여 질문드립니다!celery와 k8s를 병렬처리에 사용함에 있어서 메시지 큐를 별도로 설정하지 않는것 같은데요. 이 둘은 메시지 큐를 알아서 처리해주는건거요? celery와 k8s를 사용한 병렬 처리방식은 이해못해서 일단은 concurrent 패키지의 ThreadPoolExecutor 사용하여 병렬 처리를 하였습니다. airflow에서 병렬처리시 일반적으로 threadPool을 사용하는지도 궁금합니다. threadPool이 일반적이지 않다면 어떤 방식으로 병렬 처리를 하는지 궁금합니다!항상 감사합니다! 🙂
-
해결됨Airflow 마스터 클래스
색션8 postgres
안녕하세요 선생님색션8 2장에서 docker-compose.yaml파일을 수정 하고sudo docker compose up 하니 docker-compose.yaml: services.airflow-scheduler.depends_on.networks condition is required라는 오류가 납니다. 코드는# 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:2.7.3 # 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. --- version: '3.8' x-airflow-common: &airflow-common # In order to add custom dependencies or upgrade provider packages 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:2.7.3} # build: . environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow # For backward compatibility, with Airflow <2.3 AIRFLOW__CORE__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__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session' # 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:-} AIRFLOW__SMTP__SMTP_HOST: 'smtp.gmail.com' AIRFLOW__SMTP__SMTP_USER: '' AIRFLOW__SMTP__SMTP_PASSWORD: '' AIRFLOW__SMTP__SMTP_PORT: 587 AIRFLOW__SMTP__SMTP_MAIL_FROM: '' 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: userbbs POSTGRES_PASSWORD: userbbs POSGRES_DB: userbbs TZ: Asia/Seoul 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: image: redis:latest 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-webserver: <<: *airflow-common command: webserver ports: - "8080:8080" healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8080/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.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 airflow-worker: <<: *airflow-common command: celery worker healthcheck: # yamllint disable rule:line-length test: - "CMD-SHELL" - 'celery --app airflow.providers.celery.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}" || celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"' interval: 30s timeout: 10s retries: 5 start_period: 30s environment: <<: *airflow-common-env # Required to handle warm shutdown of the celery workers properly # See https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation DUMB_INIT_SETSID: "0" restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.8 airflow-triggerer: <<: *airflow-common command: triggerer healthcheck: test: ["CMD-SHELL", 'airflow jobs check --job-type TriggererJob --hostname "$${HOSTNAME}"'] 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.9 airflow-init: <<: *airflow-common entrypoint: /bin/bash # yamllint disable rule:line-length command: - -c - | function ver() { printf "%04d%04d%04d%04d" $${1//./ } } airflow_version=$$(AIRFLOW__LOGGING__LOGGING_LEVEL=INFO && gosu airflow airflow version) airflow_version_comparable=$$(ver $${airflow_version}) min_airflow_version=2.2.0 min_airflow_version_comparable=$$(ver $${min_airflow_version}) if (( airflow_version_comparable < min_airflow_version_comparable )); then echo echo -e "\033[1;31mERROR!!!: Too old Airflow version $${airflow_version}!\e[0m" echo "The minimum Airflow version supported: $${min_airflow_version}. Only use this or higher!" echo exit 1 fi if [[ -z " 입니다. 어디서 잘못 된걸까요?
-
미해결Airflow 마스터 클래스
postgres port 설정 질문있습니다
안녕하세요 선생님!지금 DBeaver에 DB 연결하는 과정 진행중에있는데, 제가 기존에 5432포트를 사용하고있어서 그런지 아래와같이 에러가 발생합니다.이런 경우에는 yaml 파일에서 포트를 임의로 수정해도 괜찮을까요? 임의로 수정했을때 혹시 이후의 과정에서 문제가 없는지 궁금합니다.그리고 동일번호의 포트는 DBeaver에서 2개 이상 쓸수없는게 맞는지도 궁금합니다
-
해결됨Airflow 마스터 클래스
section 8 postgres 연결 안됨
선생님 안녕하세요좋은 강의 감사합니다. section 8, connection 과 hook 강의 9분 대에서 처음으로 postgres 서버와 연결하는 부분에서 연결이 안된다고 에러가 뜨는데요 에러내용은 아래와 같습니다.참고로 저는 5432 포트 대신 5429 포트를 사용했고, dbeaver 상에 postgres도 제대로 연결이 되었고, py_opr_drct_insrt 테이블도 제대로 만들어졌습니다.오류 내용 중에 이런 내용이 있던데conn = _connect(dsn, connection_factory=connection_factory, **kwasync)psycopg2.OperationalError: connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections? postgres 설정에 무슨 문제가 있는 것일까요? 891c9ef91a84*** Found local files:*** * /opt/airflow/logs/dag_id=dags_python_with_postgres/run_id=manual__2024-01-01T05:58:04.315802+00:00/task_id=insrt_postgres/attempt=1.log[2024-01-01, 14:58:06 KST] {taskinstance.py:1103} INFO - Dependencies all met for dep_context=non-requeueable deps ti=<TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [queued]>[2024-01-01, 14:58:06 KST] {taskinstance.py:1103} INFO - Dependencies all met for dep_context=requeueable deps ti=<TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [queued]>[2024-01-01, 14:58:06 KST] {taskinstance.py:1308} INFO - Starting attempt 1 of 1[2024-01-01, 14:58:06 KST] {taskinstance.py:1327} INFO - Executing <Task(PythonOperator): insrt_postgres> on 2024-01-01 05:58:04.315802+00:00[2024-01-01, 14:58:07 KST] {standard_task_runner.py:57} INFO - Started process 80 to run task[2024-01-01, 14:58:07 KST] {standard_task_runner.py:84} INFO - Running: ['***', 'tasks', 'run', 'dags_python_with_postgres', 'insrt_postgres', 'manual__2024-01-01T05:58:04.315802+00:00', '--job-id', '447', '--raw', '--subdir', 'DAGS_FOLDER/9. dags_python_with_postgres.py', '--cfg-path', '/tmp/tmp7_5f243h'][2024-01-01, 14:58:07 KST] {standard_task_runner.py:85} INFO - Job 447: Subtask insrt_postgres[2024-01-01, 14:58:07 KST] {task_command.py:410} INFO - Running <TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [running]> on host 891c9ef91a84[2024-01-01, 14:58:07 KST] {taskinstance.py:1547} INFO - Exporting env vars: AIRFLOW_CTX_DAG_OWNER='***' AIRFLOW_CTX_DAG_ID='dags_python_with_postgres' AIRFLOW_CTX_TASK_ID='insrt_postgres' AIRFLOW_CTX_EXECUTION_DATE='2024-01-01T05:58:04.315802+00:00' AIRFLOW_CTX_TRY_NUMBER='1' AIRFLOW_CTX_DAG_RUN_ID='manual__2024-01-01T05:58:04.315802+00:00'[2024-01-01, 14:58:07 KST] {taskinstance.py:1824} ERROR - Task failed with exceptionTraceback (most recent call last):File "/home/airflow/.local/lib/python3.7/site-packages/airflow/operators/python.py", line 181, in executereturn_value = self.execute_callable()File "/home/airflow/.local/lib/python3.7/site-packages/airflow/operators/python.py", line 198, in execute_callablereturn self.python_callable(*self.op_args, **self.op_kwargs)File "/opt/airflow/dags/9. dags_python_with_postgres.py", line 16, in insrt_postgreswith closing(psycopg2.connect(host=ip, dbname=dbname, user=user, password=passwd, port=int(port))) as conn:File "/home/airflow/.local/lib/python3.7/site-packages/psycopg2/__init__.py", line 122, in connectconn = _connect(dsn, connection_factory=connection_factory, **kwasync)psycopg2.OperationalError: connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections?[2024-01-01, 14:58:07 KST] {taskinstance.py:1350} INFO - Marking task as FAILED. dag_id=dags_python_with_postgres, task_id=insrt_postgres, execution_date=20240101T055804, start_date=20240101T055806, end_date=20240101T055807[2024-01-01, 14:58:07 KST] {standard_task_runner.py:109} ERROR - Failed to execute job 447 for task insrt_postgres (connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections?; 80)[2024-01-01, 14:58:07 KST] {local_task_job_runner.py:225} INFO - Task exited with return code 1[2024-01-01, 14:58:07 KST] {taskinstance.py:2653} INFO - 0 downstream tasks scheduled from follow-on schedule check 같은 강의 15:00 부분 connection 부분 실습에서 test를 누르면 아래와 같은 에러가 뜹니다. 아마 같은게 아닐까 싶습니다connection to server at "172.28.0.3", port 5429 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? dags_python_with_postgres 파일에서 구간마다 print 를 해서 실행되는지 여부를 확인해본 결과 print('실행1')with closing(psycopg2.connect(host=ip, dbname=dbname, user=user, password=passwd, port=int(port))) as conn:print('conn', conn) '실행1' 은 프린트가 되는데 conn은 프린트가 안됩니다.그런데 ip, port, dbname, user, passwd, **kwargs 모두 정확하게 들어갔거든요 ㅠ
-
미해결Airflow 마스터 클래스
스케줄링과 관련된 질문입니다.
섹션3, 첫번째 강의에서 스케줄에 관한 질문입니다. 강의에서, start_date = 2023.1.1schedule = "30 6 * * *"next_run = 2023 03 18 6:30그리고 현재 날짜는 2023 03 19 인것으로 봤는데, next_run이 현재날짜보다 뒤에 있으니 pause -> unpause 를 하게되면 자동실행이 안되어야 하는거 아닌가요? 강의에서는 자동으로 실행되는것으로 봐서요. 감사합니다.
-
해결됨Airflow 마스터 클래스
섹션 7 custom operator 실습 질문 (variable)
선생님 안녕하세요좋은 강의 감사드립니다. 섹션 7 custom operator 실습 강의에서 계속 오류가 나서, 이런 저런 시도를 해보던 도중에 variable 에 문제가 있다는 것을 알고 수정해서 해결을 했는데요. 강의대로 했는데 안되는 이유를 모르겠습니다. 아래는 저의seoul_api_to_csv_operator.py 파일인데요 class SeoulApiToCsvOperator(BaseOperator): template_fields = ('endpoint', 'path','file_name','base_dt') def init(self, dataset_nm, path, file_name, base_dt=None, **kwargs): super().__init__(**kwargs) self.http_conn_id = 'openapi.seoul.go.kr' self.path = path self.file_name = file_name self.endpoint = '{{var.value.apikey_openapi_seoul_go_kr}}/json/' + dataset_nm self.base_dt = base_dt self.endpoint = '{{var.value.apikey_openapi_seoul_go_kr}}/json/' + dataset_nm 부분을self.endpoint = 'api key 직접 입력/json' + dataset_nm 으로 바꾸니까 코드가 정상적으로 실행이 되었습니다. 그런데 이해가 안되는것이 airflow admin --> variable 에 들어가서 강의에 나오는대로 그대로 입력을 했거든요. Val 부분에 정확한 api key가 입력된 것도 수차례 확인했습니다. 어디에서 문제가 있는걸까요??
-
해결됨Airflow 마스터 클래스
docker 폴더 관련 질문
안녕하세요좋은 강의 감사드립니다. 섹션 7 custom operator 실습(마지막 강의) 16:11 부분에 보시면요폴더 구조를 아래와 같이 만들어놓으셨더라고요 조금 이해가 안되는게, 왜 dags 폴더를 airflow 바깥에도 만들어놓시고 안에도 만들어놓으신거죠?logs는 또 airflow 폴더 밖에 있고요. 강의 16:16 에 보면, dags는 airflow 안에 있는 것을 사용하고 계신것 같은데, (2) airflow 밖에 있는 dags 폴더를 만드신 이유, 그리고 (2) 왜 logs 폴더는 dags, plugins 와 다르게 airflow 밖에 만드셨는지 가 궁금합니다.
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
connection 정보 이전 방법 질문드립니다.
안녕하세요 선생님 🙂 connection 정보를 새로운 환경에 이식 방법 질문드립니다.stackoverflow 등을 찾아보니 csv파일 또는 sh 파일로 구축하여 사용하는 것같은데요이 같은 방법은 보안에 취약할수있겠다는 생각이 들어서 어떤 방식으로 이식가능한 connection 정보를 저장하는것이 좋은지 질문드립니다. stackover reference - https://stackoverflow.com/questions/55626195/export-all-airflow-connections-to-new-environment즐거운 크리스마스 연휴되세요!감사합니다! 🙂
-
미해결Airflow 마스터 클래스
scheduled slot의 개수도 제한이 있나요?
예전에 airflow를 쓰면서 DAG의 task가 스케쥴에 따라서 실행되지 않았던 적이 있습니다. 실행될 시간인데 scheduled상태로도 들어가지 않고 아예 사라졌다가 한참 후에 다시 scheduled되어서 중간에 실행되지 않는 시간이 많이 생겼습니다. 당시에는 pool의 slot수를 늘리니 해결이 되긴 했습니다. 그런데 강의에 따르면 slot수에 scheduled는 영향을 주지 않는 것으로 이해가 됐습니다.혹시 scheduled도 따로 slot개수를 가지게 되는건가요? p.s. 그때는 몰랐지만 airflow가 너무 자주 실행하는 경우에는 적합하지 않다는 거는 알게된 경험이었습니다. 당시 스케쥴은 1분마다 실행시키는 DAG들을 많이 만들었거든요
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
PostgresOperator로 대량의 데이터 업로드 방법 질문드립니다.
안녕하세요 선생님 🙂 PostgresOperator 질문 드립니다. DB table에 데이터를 갱신하는 task를 혼자 만들어보고 있는데요.PostgresOperator는 executemany와 같은 기능을 지원하지 않는 것으로 확인했습니다. airflow에서 대량의 데이터를 insert / update 하는 방법이 있을까요..?
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
강의 할인 프로모션 질문입니다..
선생님 완강 이후 커뮤니티 이벤트 참여 신청했는데요이벤트 끝난건가요? ㅠ https://www.inflearn.com/course/%EC%8B%A4%EB%A6%AC%EC%BD%98%EB%B0%B8%EB%A6%AC-%EC%97%94%EC%A7%80%EB%8B%88%EC%96%B4%EC%99%80-%ED%95%A8%EA%BB%98%ED%95%98%EB%8A%94-apache-airflow/news
-
미해결Airflow 마스터 클래스
2-4 fruit operator 관련 오류 질문
선생님 안녕하세요 좋은 강의 감사합니다. 2-4 강의에서 select fruit 하는 부분에서 오류가 생겨서 질문 드립니다. 참고로 저는 리눅스가 아니라 docker on window를 사용하고 있습니다.윈도우 상에서 bash 를 사용하는데 오류가 발생하는 것 같은데 해결방법을 모르겠어서요 저의 select_fruit.sh 는 아래와 같고요FRUIT=$1if [ $FRUIT == APPLE ];then echo "You selected Apple!"elif [ $FRUIT == ORANGE ];then echo "you selected Orange!"elif [ $FRUIT == GRAPE ];then echo "You selected Grape!"else echo "You selected other fruits!"fi 이것을 git bash 상에서 돌려보면 잘 돌아갑니다. 그런데, 윈도우 cmd에서 bash 로 돌리면 apple과 orange에 대해서도 다른 과일을 골랐다는 오류가 뜨고요 그리고 airflow dag을 실행시켜도 같은 오류가 뜹니다. git bash에서 제대로 결과가 나오는걸 보면 sh 파일 자체에는 문제가 없는것 같은데, airflow 상에서 실행이 안되는 이유가 무엇일까요 ㅠ
-
미해결Airflow 마스터 클래스
aws ec2 로 해도 되나요
안녕하세요혹시 wsl이 아니로 aws에 ec2로 우분투 서버를 만들어서 강의를 진행해도되나요? 혹시 강의 뒷부분에서 문제?가 생길만한 여지나 부분이 있는지 궁금합니다 (예를 들어, vscode와 연결하는 등에서요) 그리고 혹시 docker on desktop 을 사용하지 않으신 이유가 따로 있으신가요..?
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
hook 질문드립니다.
안녕하세요 선생님 hook 사용에 대한 질문드립니다! [질문] connection 기능을 사용해서 DB에 연결하여 데이터 처리도 가능할 것으로 보이는데요. hook을 사용하는 이유가 궁금 합니다. 사용 이유가 있다면 어떤 경우에 사용하면 좋은지도 궁금합니다. 감사합니다 🙂
-
미해결Airflow 마스터 클래스
postgreSQL과 연결 시 오류
- connection 설정- password authentication failed for user "xnaud" docker-compose.yaml 파일 설정dags코드 이렇게 설정했는데 dags를 실행 시 password authentication failed for user "xnaud" 라는 메세지가 계속 뜨고 있습니다 ㅠ 혹시 원인이 뭘까요?
-
미해결실리콘밸리 엔지니어와 함께하는 Apache Airflow
section 2-hook 강의 질문
docker on window를 사용하고 있습니다.docker 에 airflow를 올리면, 자체적으로 postgres db 가 올라가는데요. 강의 8:05 에서 말씀하시는게 이것인듯 한데요. 이것과 dbeaver를 연결하려고 하면 에러가 납니다. docker yaml 파일에 나와있는대로host : localhost ( 이것을 host.docker.internal 로 바꾸어도 같은 에러가 납니다)database: airflowusername : airflowpassword: airflow 으로 하고 테스트 커넥션을 하면 아래와 같은 에러가 납니다. 별도로 postgres db를 만들어서 연결하는 건 정상적으로 되는데, 왜 airflow 자체적으로 만들어지는 postgres db에 접속하는것만 오류가 나는 것일까요? 이 db에 접속을 해야 강의 8:09에 보이는 각종 table 들에 접근이 가능한 것 같은데요
-
미해결Airflow 마스터 클래스
'[섹션 8. Connection & Hook] Postgres 컨테이너 올리기' 강의에서 sudo docker compose up 명령어가 제대로 실행되지 않습니다.
이전까지는 도커 서비스를 잘 수행이 됐었습니다. 이번 강의에서 docker-compose.yaml파일을 수정 후 서비스를 내렸다가 다시 올리려고 하니 사진처럼 해당 로그까지만 찍힌 후에 더 이상 진행이 되지 않고 있습니다. 계속 기다려봐도 상태가 그대로인 것을 보아하니 어딘가 문제가 생긴 것 같습니다.yaml파일은 올려주신 파일과 비교해봤을 때 오타나 다른 문제는 없는 것 같습니다. 원래의 docker-compose.yaml로 교체하면 잘 실행이 되는 상태입니다. 뭐가 문제일까요?
-
미해결Airflow 마스터 클래스
Email Operator 메일전송 실패 원인이 알수 없네요
강의 내용대로 gmail 세팅 / docker-compose.yaml 적용 후 airflow dag 작성후, 실행을 했는데.. 'smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.' 로 Error가 납니다. airflow 실행로그 첨부합니다. 답변 기다리겠습니다. 감사합니다.
-
해결됨Airflow 마스터 클래스
[ERROR] Max retries exceeded with url
task실행 하면 api호출이 안되고 requests에서 에러가 나옵니다requests.exceptions.ConnectionError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //openapi.seoul.go.kr:8088/***/json/TbCorona19CountStatus/1/1000/?Content-Type=application%2Fjson&charset=utf-8&Accept=%2A%2F%2A (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fbc7dac3fa0>: Failed to establish a new connection: [Errno -2] Name or service not known')) 그런데 postman이든 브라우저든 다른 곳에서는 정상척으로 호출하고 이전에 SimpleHttpOperator도 정상적으로 모두 호출합니다.왜 연결이 안되고 Max retries가 뜨는지 잘 모르겠어요 ㅠ혹시 while문에서 너무 빨리호출하나 싶어서 time.sleep도 넣어봤지만 차이 없네요
-
미해결실리콘밸리 엔지니어와 함께하는 Apache Airflow
airflow tasks test 질문드립니다!
안녕하세요 선생님! 🙂provider 강의에서 airflow tasks test 질문드립니다.airflow docker-compose와 postgres docker-compose를 up 한 후에 (airflow, postgres 정상적으로 구동됨)airflow tasks test postgres_loader execute_sql_query 2023-01-01터미널에서 실행시 zsh: command not found: airflow 에러가 발생합니다.실습환경은 강의와 동일하게 docker compose로 구축하였고로컬환경에는 airflow를 설치하지 않은 상태입니다.로컬환경에 airflow를 설치해야하나요..? ㅠㅠ