You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/06 08:54:44 UTC

[GitHub] [airflow] xawyong opened a new issue #13506: example_bash_operator always failed to run

xawyong opened a new issue #13506:
URL: https://github.com/apache/airflow/issues/13506


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**:
   ```
   [root@test ~]# airflow version
   2.0.0
   [root@test ~]# airflow config get-value core executor
   SequentialExecutor
   [root@test ~]#
   ```
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   N/A
   
   **Environment**:
   ```
   [root@test ~]# uname -a
   Linux test 3.10.0-1160.11.1.el7.x86_64 #1 SMP Mon Nov 30 13:05:31 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
   [root@test ~]# cat /etc/redhat-release
   Red Hat Enterprise Linux Server release 7.9 (Maipo)
   [root@test ~]# cat /etc/os-release
   NAME="Red Hat Enterprise Linux Server"
   VERSION="7.9 (Maipo)"
   ID="rhel"
   ID_LIKE="fedora"
   VARIANT="Server"
   VARIANT_ID="server"
   VERSION_ID="7.9"
   PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
   ANSI_COLOR="0;31"
   CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
   HOME_URL="https://www.redhat.com/"
   BUG_REPORT_URL="https://bugzilla.redhat.com/"
   
   REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
   REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
   REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
   REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
   [root@test ~]#
   ```
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   <!-- (please include exact error messages if you can) -->
   
   triggered the example_bash_operator DAG from UI, always failed with below error logs:
   ```
   *** Reading local file: /root/airflow/logs/example_bash_operator/runme_0/2021-01-06T08:32:39.457479+00:00/1.log
   [2021-01-06 03:32:47,326] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_bash_operator.runme_0 2021-01-06T08:32:39.457479+00:00 [queued]>
   [2021-01-06 03:32:47,331] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_bash_operator.runme_0 2021-01-06T08:32:39.457479+00:00 [queued]>
   [2021-01-06 03:32:47,331] {taskinstance.py:1017} INFO - 
   --------------------------------------------------------------------------------
   [2021-01-06 03:32:47,331] {taskinstance.py:1018} INFO - Starting attempt 1 of 1
   [2021-01-06 03:32:47,331] {taskinstance.py:1019} INFO - 
   --------------------------------------------------------------------------------
   [2021-01-06 03:32:47,391] {taskinstance.py:1038} INFO - Executing <Task(BashOperator): runme_0> on 2021-01-06T08:32:39.457479+00:00
   [2021-01-06 03:32:47,394] {standard_task_runner.py:51} INFO - Started process 9831 to run task
   [2021-01-06 03:32:47,407] {standard_task_runner.py:75} INFO - Running: ['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_0', '2021-01-06T08:32:39.457479+00:00', '--job-id', '9', '--pool', 'default_pool', '--raw', '--subdir', '/usr/local/lib/python3.7/site-packages/airflow/example_dags/example_bash_operator.py', '--cfg-path', '/tmp/tmpmas21jxl']
   [2021-01-06 03:32:47,408] {standard_task_runner.py:76} INFO - Job 9: Subtask runme_0
   [2021-01-06 03:32:47,487] {logging_mixin.py:103} INFO - Running <TaskInstance: example_bash_operator.runme_0 2021-01-06T08:32:39.457479+00:00 [running]> on host test.ma.platformlab.ibm.com
   [2021-01-06 03:32:47,618] {taskinstance.py:1396} ERROR - (sqlite3.OperationalError) near ",": syntax error
   [SQL: DELETE FROM rendered_task_instance_fields WHERE rendered_task_instance_fields.dag_id = ? AND rendered_task_instance_fields.task_id = ? AND (rendered_task_instance_fields.dag_id, rendered_task_instance_fields.task_id, rendered_task_instance_fields.execution_date) NOT IN (SELECT rendered_task_instance_fields.dag_id, rendered_task_instance_fields.task_id, rendered_task_instance_fields.execution_date 
   FROM rendered_task_instance_fields 
   WHERE rendered_task_instance_fields.dag_id = ? AND rendered_task_instance_fields.task_id = ? ORDER BY rendered_task_instance_fields.execution_date DESC
    LIMIT ? OFFSET ?)]
   [parameters: ('example_bash_operator', 'runme_0', 'example_bash_operator', 'runme_0', 30, 0)]
   (Background on this error at: http://sqlalche.me/e/13/e3q8)
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
       cursor.execute(statement, parameters)
   sqlite3.OperationalError: near ",": syntax error
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1086, in _run_raw_task
       self._prepare_and_execute_task_with_callbacks(context, task)
     File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1226, in _prepare_and_execute_task_with_callbacks
       RenderedTaskInstanceFields.delete_old_records(self.task_id, self.dag_id)
     File "/usr/local/lib/python3.7/site-packages/airflow/utils/session.py", line 65, in wrapper
       return func(*args, session=session, **kwargs)
     File "/usr/local/lib/python3.7/site-packages/airflow/models/renderedtifields.py", line 151, in delete_old_records
       ).delete(synchronize_session=False)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3926, in delete
       delete_op.exec_()
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1697, in exec_
       self._do_exec()
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1928, in _do_exec
       self._execute_stmt(delete_stmt)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1702, in _execute_stmt
       self.result = self.query._execute_crud(stmt, self.mapper)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3568, in _execute_crud
       return conn.execute(stmt, self._params)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
       return meth(self, multiparams, params)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
       distilled_params,
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
       e, statement, parameters, cursor, context
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
       sqlalchemy_exception, with_traceback=exc_info[2], from_=e
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) near ",": syntax error
   [SQL: DELETE FROM rendered_task_instance_fields WHERE rendered_task_instance_fields.dag_id = ? AND rendered_task_instance_fields.task_id = ? AND (rendered_task_instance_fields.dag_id, rendered_task_instance_fields.task_id, rendered_task_instance_fields.execution_date) NOT IN (SELECT rendered_task_instance_fields.dag_id, rendered_task_instance_fields.task_id, rendered_task_instance_fields.execution_date 
   FROM rendered_task_instance_fields 
   WHERE rendered_task_instance_fields.dag_id = ? AND rendered_task_instance_fields.task_id = ? ORDER BY rendered_task_instance_fields.execution_date DESC
    LIMIT ? OFFSET ?)]
   [parameters: ('example_bash_operator', 'runme_0', 'example_bash_operator', 'runme_0', 30, 0)]
   (Background on this error at: http://sqlalche.me/e/13/e3q8)
   [2021-01-06 03:32:47,626] {taskinstance.py:1440} INFO - Marking task as FAILED. dag_id=example_bash_operator, task_id=runme_0, execution_date=20210106T083239, start_date=20210106T083247, end_date=20210106T083247
   [2021-01-06 03:32:47,694] {local_task_job.py:118} INFO - Task exited with return code 1
   ```
   **What you expected to happen**:
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #13506: example_bash_operator always failed to run

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #13506:
URL: https://github.com/apache/airflow/issues/13506#issuecomment-755181027


   Please upgrade SQLite.  Minimum supported version of sqlite is 3.15.0.  To check sqlite version, run `airlfow info`.
   
   See: https://github.com/apache/airflow/pull/13496


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #13506: example_bash_operator always failed to run

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13506:
URL: https://github.com/apache/airflow/issues/13506#issuecomment-755171459


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj closed issue #13506: example_bash_operator always failed to run

Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #13506:
URL: https://github.com/apache/airflow/issues/13506


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org