위지원의 데이터 일기 🐈
Home
  • 분류 전체보기 (563)
    • ✎ 2025년 (4)
    • 2024년 (16)
    • 2023년 (6)
    • 2022년 (35)
      • Developement (22)
      • Error (9)
    • 2021년 (68)
      • ERROR (9)
      • 알고리즘 (11)
      • 개발공부 (21)
      • Data (15)
      • 21.下 (12)
    • 2020년 (164)
      • 코테 (84)
      • Development (29)
      • 정처기 (41)
    • 2019년 (27)
    • 2018년 (89)
      • English Speaking (8)
      • Error (12)
      • C, Java, FileSystem (13)
      • DataBase (15)
      • Java (2)
      • 지식 (16)
      • Go (3)
      • spark (9)
      • 영어 (5)
      • 알고리즘 (6)
    • 2017년 (143)
      • Error (17)
      • machine learning (16)
      • Spark (20)
      • Database (19)
      • Python (17)
      • Spring (9)
      • etc. (10)
      • 백준 (5)
      • Google Platform (12)
      • web Development (7)
      • Docker (3)
      • Linux (8)
Home
  • 분류 전체보기 (563)
    • ✎ 2025년 (4)
    • 2024년 (16)
    • 2023년 (6)
    • 2022년 (35)
      • Developement (22)
      • Error (9)
    • 2021년 (68)
      • ERROR (9)
      • 알고리즘 (11)
      • 개발공부 (21)
      • Data (15)
      • 21.下 (12)
    • 2020년 (164)
      • 코테 (84)
      • Development (29)
      • 정처기 (41)
    • 2019년 (27)
    • 2018년 (89)
      • English Speaking (8)
      • Error (12)
      • C, Java, FileSystem (13)
      • DataBase (15)
      • Java (2)
      • 지식 (16)
      • Go (3)
      • spark (9)
      • 영어 (5)
      • 알고리즘 (6)
    • 2017년 (143)
      • Error (17)
      • machine learning (16)
      • Spark (20)
      • Database (19)
      • Python (17)
      • Spring (9)
      • etc. (10)
      • 백준 (5)
      • Google Platform (12)
      • web Development (7)
      • Docker (3)
      • Linux (8)
블로그 내 검색
포트폴리오

위지원의 데이터 일기 🐈

데이터를 사랑하고 궁금해하는 기록쟁이입니다! 😉 Super Data Girl이 되는 그날까지🏃‍♀️ 화이팅!

  • 🖥 깃블로그
  • 🌍 위키원
  • 📑 내맘대로 스크랩
  • 💌 메일
  • 2021년/21.下

    airflow log가 제대로 안나올 때

    2021. 11. 5. 15:40

    by. 위지원

    아래처럼만 나오고 제대로된 log가 안뜬다.. 

    *** Log file does not exist: /opt/bitnami/airflow/logs/tutorial/hello_task/2021-11-05T06:36:04.378967+00:00/1.log
    *** Fetching from: http://ac8721e912e5:8793/log/tutorial/hello_task/2021-11-05T06:36:04.378967+00:00/1.log
    *** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers and workers) have the same 'secret_key' configured in 'webserver' section !!!!!
    ****** See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key
    ****** Failed to fetch log file from worker. 403 Client Error: FORBIDDEN for url: http://ac8721e912e5:8793/log/tutorial/hello_task/2021-11-05T06:36:04.378967+00:00/1.log
    For more information check: https://httpstatuses.com/403

     

    아래 링크에 가면 그냥 Environment Variables만 알려주고 무슨 값을 넣어야하는지도 안알려준다. ㅡㅡ

     

    https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key

     

    Configuration Reference — Airflow Documentation

     

    airflow.apache.org

     

    그러던 와중에 아래 사이트에서 그냥 진짜 랜덤값 넣어주면 돼! 라고했다.

    https://serverfault.com/questions/947745/in-airflows-configuration-file-airflow-cfg-what-is-the-secret-key-and-do-i

     

    In airflow's configuration file `airflow.cfg` what is the `secret_key`, and do I have to set it?

    As a comment above the value, it says # Secret key used to run your flask app, but that doesn't tell me much. Currently it is set to secret_key = temporary_key, but that seems unsafe. We have set up

    serverfault.com

    그냥 아래 명령어로 랜덤값을 얻어서 Environment Variables에 입력한다.

    python -c 'import os; print(os.urandom(16))'

    [후략...]에어 플로우에 관련된 모든 컴포넌트 동일

     

    그럼 아래와같이 잘 뜬다.

    [생략..]
    [2021-11-05, 06:39:15 UTC] {python.py:152} INFO - Done. Returned value was: Hello world!
    [2021-11-05, 06:39:15 UTC] {taskinstance.py:1270} INFO - Marking task as SUCCESS. dag_id=tutorial, task_id=hello_task, execution_date=20211105T063913, start_date=20211105T063915, end_date=20211105T063915
    [2021-11-05, 06:39:15 UTC] {local_task_job.py:154} INFO - Task exited with return code 0
    [2021-11-05, 06:39:15 UTC] {local_task_job.py:264} INFO - 2 downstream tasks scheduled from follow-on schedule check
    저작자표시 (새창열림)

    '2021년 > 21.下' 카테고리의 다른 글

    Build a Steam Game Recomend Model (1/?) - 데이터 수집 경로 결정하기  (5) 2021.12.08
    airflow 설치 기록용...  (0) 2021.11.05
    windows 10에서 ubutu 사용하기  (0) 2021.11.04
    [docker error] WSL 2 installation is incomplete.  (0) 2021.11.04
    Prefect  (0) 2021.10.18

    잠깐만요~! 읽으신김에 이런 글들은 어떠세요? 👀

    • Build a Steam Game Recomend Model (1/?) - 데이터 수집 경로 결정하기 2021.12.08
    • airflow 설치 기록용... 2021.11.05
    • windows 10에서 ubutu 사용하기 2021.11.04
    • [docker error] WSL 2 installation is incomplete. 2021.11.04
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

열정! 열정! 열정! 🔥

Designed by Nana
블로그 이미지
위지원
데이터 엔지니어로 근무 중에 있으며 데이터와 관련된 일을 모두 좋아합니다!. 특히 ETL 부분에 관심이 가장 크며 데이터를 빛이나게 가공하는 일을 좋아한답니다 ✨

티스토리툴바

티스토리툴바