[ https://issues.apache.org/jira/browse/AIRFLOW-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686437#comment-16686437 ]
Ikar Pohorsky commented on AIRFLOW-3339: ---------------------------------------- My dag&task that fails: {code} from datetime import datetime from airflow import DAG from airflow.operators.bash_operator import BashOperator from core.path import REPO_PATH dag_id = "test.replica_set" path = "{}/utils/scripts".format(REPO_PATH) bash_command = """ cd {{ params.path }}; \ MESSAGE=`python3 {{ params.script }}` && \ slack.sh "$MESSAGE" "sys-messages" "hear_no_evil" || \ (slack.sh "$MESSAGE" "development-platform" "hear_no_evil" && false) """ script_name = "check_replica_status.py" print("creating dag: {}".format(dag_id)) with DAG( dag_id=dag_id, schedule_interval="0 14 * * *", default_args={'start_date': datetime(2017, 8, 29, hour=1)} ) as dag: BashOperator( task_id=dag_id, bash_command=bash_command, params={'path': path, 'script': script_name}, ) {code} > Fix timezone error > ------------------ > > Key: AIRFLOW-3339 > URL: https://issues.apache.org/jira/browse/AIRFLOW-3339 > Project: Apache Airflow > Issue Type: Bug > Components: scheduler > Affects Versions: 1.10.1 > Reporter: Ikar Pohorsky > Priority: Blocker > > From slack: > nicor88 8:34 AM > {quote} > Hey all, we are having issue with our scheduler, in the latest release 1.10.1 > due to this error: > {noformat} > Process DagFileProcessor94249-Process: > Traceback (most recent call last): > File "/usr/local/lib/python3.6/multiprocessing/process.py", line 258, in > _bootstrap > self.run() > File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run > self._target(*self._args, **self._kwargs) > File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 389, in > helper > pickle_dags) > File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, > in wrapper > return func(*args, **kwargs) > File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 1846, in > process_file > self._process_dags(dagbag, dags, ti_keys_to_schedule) > File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 1426, in > _process_dags > dag_run = self.create_dag_run(dag) > File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, > in wrapper > return func(*args, **kwargs) > File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 835, in > create_dag_run > next_start = dag.following_schedule(now) > File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 3396, > in following_schedule > tz = pendulum.timezone(self.timezone.name) > AttributeError: 'NoneType' object has no attribute 'name' > {noformat} > We have a timezone setup in the config > {quote} > eamon [Today at 9:41 AM] > {quote} > @nicor88 I saw that in the logs also, fwiw it seemed to fail at the first > dag run but then subsequent attempts seemed to work. > {quote} >  > nicor88 [3 hours ago] > {quote} > I tried but the daily jobs are stacked > {quote} >  > eamon [2 hours ago] > {quote} > so nothing getting scheduled? This is the behaviour I've observed also. When > I saw that particular error, it seemed to correct itself so I discounted that > as the root cause but could be it. > {quote} >  > eamon [2 hours ago] > {quote} > maybe try a task without a timezone. > {quote} >  > porn [1 hour ago] > {quote} > dammit, same problem here ({{1.10.1-rc1}}) > {quote} >  > nicor88 [1 hour ago] > {quote} > we have timezone setup as utc in the config, and the start_date is setup > like: datetime(2018, 7, 23) > {quote} >  > nicor88 [1 hour ago] > {quote} > we reverted to the stable release 1.10.0 > {quote} >  > porn [1 hour ago] > {quote} > {{default_timezone = utc}} in config too, > the DAG parameters: > {noformat} > schedule_interval = "0 14 * * *", > start_date = datetime(2017, 8, 29, hour=1) > {noformat} > {quote} >  > porn [1 hour ago] > {quote} > I need to add that this happened to me only when tried to manually execute > (from UI) the task that is periodical, but haven't ran yet. Can you @nicor88 > confirm this was your case too? > {quote} >  > nicor88 [1 hour ago] > {quote} > in our case the daily jobs were not scheduled at all > {quote} >  > nicor88 [1 hour ago] > {quote} > that’s why I got suspiscious and check (edited) > {quote} >  > nicor88 [1 hour ago] > {quote} > we install Airflow from Github directly, pointing to the stable branch. Now > we recovered pointing to a specific release > {quote} >  > porn [1 hour ago] > {quote} > it is a pre-release actually > {quote} > nicor88 [1 hour ago] > {quote} > it’s my bad that we use the v1-10-stable branch from Github > {quote} >  > nicor88 [1 hour ago] > {quote} > instead of using the tagged release (edited) > {quote} >  > nicor88 [1 hour ago] > {quote} > lesson learned > {quote} >  > porn [14 minutes ago] > {quote} > ok, just downgraded to {{v1.10.1b1}} and got the same error > {quote} -- This message was sent by Atlassian JIRA (v7.6.3#76005)