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/07/19 02:08:40 UTC

[GitHub] [airflow] uranusjr opened a new issue #17072: MSSQL on CI has been consistently failing

uranusjr opened a new issue #17072:
URL: https://github.com/apache/airflow/issues/17072


   Since #16311 was merged, the MSSQL check has been pretty consistenyl failing with
   
   ```
     Traceback (most recent call last):
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'upgrade') because it is not currently held. (1223) (SQLExecDirectW)")
     
     The above exception was the direct cause of the following exception:
     
     Traceback (most recent call last):
       File "/opt/airflow/airflow/utils/session.py", line 95, in create_global_lock
         yield None
       File "/opt/airflow/airflow/utils/db.py", line 579, in initdb
         upgradedb()
       File "/opt/airflow/airflow/utils/session.py", line 70, in wrapper
         return func(*args, session=session, **kwargs)
       File "/opt/airflow/airflow/utils/db.py", line 721, in upgradedb
         add_default_pool_if_not_exists()
       File "/usr/local/lib/python3.6/contextlib.py", line 88, in __exit__
         next(self.gen)
       File "/opt/airflow/airflow/utils/session.py", line 107, in create_global_lock
         session.connection().execute(f"sp_releaseapplock @Resource = '{lock_name}';")
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1003, in execute
         return self._execute_text(object_, multiparams, params)
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1178, in _execute_text
         parameters,
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
         e, statement, parameters, cursor, context
       File "/usr/local/lib/python3.6/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.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
         raise exception
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'upgrade') because it is not currently held. (1223) (SQLExecDirectW)")
     [SQL: sp_releaseapplock @Resource = 'upgrade';]
     (Background on this error at: http://sqlalche.me/e/13/f405)
     
     During handling of the above exception, another exception occurred:
     
     Traceback (most recent call last):
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'init') because it is not currently held. (1223) (SQLExecDirectW)")
     
     The above exception was the direct cause of the following exception:
     
     Traceback (most recent call last):
       File "/opt/airflow/airflow/utils/session.py", line 95, in create_global_lock
         yield None
       File "/opt/airflow/airflow/utils/db.py", line 735, in resetdb
         initdb()
       File "/opt/airflow/airflow/utils/session.py", line 70, in wrapper
         return func(*args, session=session, **kwargs)
       File "/opt/airflow/airflow/utils/db.py", line 593, in initdb
         Base.metadata.create_all(settings.engine)
       File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
         self.gen.throw(type, value, traceback)
       File "/opt/airflow/airflow/utils/session.py", line 107, in create_global_lock
         session.connection().execute(f"sp_releaseapplock @Resource = '{lock_name}';")
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1003, in execute
         return self._execute_text(object_, multiparams, params)
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1178, in _execute_text
         parameters,
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
         e, statement, parameters, cursor, context
       File "/usr/local/lib/python3.6/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.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
         raise exception
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'init') because it is not currently held. (1223) (SQLExecDirectW)")
     [SQL: sp_releaseapplock @Resource = 'init';]
     (Background on this error at: http://sqlalche.me/e/13/f405)
     
     During handling of the above exception, another exception occurred:
     
     Traceback (most recent call last):
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'reset') because it is not currently held. (1223) (SQLExecDirectW)")
     
     The above exception was the direct cause of the following exception:
     
     Traceback (most recent call last):
       File "/usr/local/bin/airflow", line 33, in <module>
         sys.exit(load_entry_point('apache-airflow', 'console_scripts', 'airflow')())
       File "/opt/airflow/airflow/__main__.py", line 40, in main
         args.func(args)
       File "/opt/airflow/airflow/cli/cli_parser.py", line 48, in command
         return func(*args, **kwargs)
       File "/opt/airflow/airflow/cli/commands/db_command.py", line 39, in resetdb
         db.resetdb()
       File "/opt/airflow/airflow/utils/session.py", line 70, in wrapper
         return func(*args, session=session, **kwargs)
       File "/opt/airflow/airflow/utils/db.py", line 735, in resetdb
         initdb()
       File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
         self.gen.throw(type, value, traceback)
       File "/opt/airflow/airflow/utils/session.py", line 107, in create_global_lock
         session.connection().execute(f"sp_releaseapplock @Resource = '{lock_name}';")
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1003, in execute
         return self._execute_text(object_, multiparams, params)
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1178, in _execute_text
         parameters,
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
         e, statement, parameters, cursor, context
       File "/usr/local/lib/python3.6/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.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
         raise exception
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
         cursor, statement, parameters, context
       File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
         cursor.execute(statement, parameters)
     sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot release the application lock (Database Principal: 'public', Resource: 'reset') because it is not currently held. (1223) (SQLExecDirectW)")
     [SQL: sp_releaseapplock @Resource = 'reset';]
     (Background on this error at: http://sqlalche.me/e/13/f405)
     
     Error: check_environment returned 1. Exiting.
   ```
   
   I have not looked into exact what the cause is, but since #16311 was aimed to resolve issue when Airflow is deployed, it probably also makes sense to just disable locking altogether on CI.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] eladkal commented on issue #17072: MSSQL on CI has been consistently failing

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #17072:
URL: https://github.com/apache/airflow/issues/17072#issuecomment-919470650


   solved by https://github.com/apache/airflow/pull/17078


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] eladkal closed issue #17072: MSSQL on CI has been consistently failing

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #17072:
URL: https://github.com/apache/airflow/issues/17072


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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