본문 바로가기
공부/프로그래밍

[airflow] mac에서 DAG실행 시 오류날 때

by demonic_ 2020. 9. 1.
반응형

 airflow로 dag를 수행하는데 test를 수행하면 잘 되던것이 web이나 trigger로 실행하면 다음과 같이 에러가 발생한다.

 

찾고 찾다가 다음의 사이트를 발견했다.

https://stackoverflow.com/questions/59821777/airflow-task-running-tweepy-exits-with-return-code-6

 

Airflow task running tweepy exits with return code -6

I have a simple Airflow DAG which has only one task - stream_from_twitter_to_kafka Here is the code for the DAG: default_args = { "owner": "me", "depends_on_past": False, "start_date":

stackoverflow.com

 

내용을 요약하자면 테스트는 프로세스 내에서 작업하기 때문에 상관없지만 스케줄러는 fork를 호출하는데 High Sierra는 for() 사용을 중단하는 보안사항을 도입했다는 것이다.

 

이것을 해결하는 방법은 간단하다.

터미널(또는 환경변수)에 다음 설정을 변경하는 것이다.

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

 

 

스케쥴을 수행할 터미널에서 위의 환경변수를 설정해두어야 한다.

 

 

끝.

 

반응형

댓글