It looks like airflow initdb and airflow connections ... are executed not sequentially (see timestamps in the attached log), so when adding a new connection database is not yet ready.
Manually removing airflow.db and rerunning these two commands fixed the problem.
Log with errors
[2019-11-01 10:46:02.128] [info] /Applications/scidap-satellite.app/Contents/Resources/Services/satellite/bin
[2019-11-01 10:51:38.633] [info] init
[2019-11-01 10:51:38.635] [info] init airflowSettings: {
AIRFLOW_HOME: '/Users/kot4or/Library/Application Support/scidap-satellite/airflow',
init_commands: [
'airflow initdb',
'airflow connections -a --conn_id process_report --conn_uri http://localhost:3069 --conn_extra "{"endpoint":"/airflow/"}"'
]
}
[2019-11-01 10:51:38.636] [info] init satelliteSettings: {
port: 3069,
scidapRoot: '/Users/kot4or/scidap',
scidapSSLPort: 3070,
airflowAPIPort: 8080,
aria2cPort: 6800,
mongoPort: 27017,
pm2Port: 9615,
baseUrl: 'http://localhost:3069/',
sslCert: '',
sslKey: '',
triggerDag: 'http://127.0.0.1:8080/api/experimental/dags/{dag_id}/dag_runs',
localFiles: false
}
[2019-11-01 10:51:38.636] [info] airflow initdb
[2019-11-01 10:51:38.646] [info] airflow connections -a --conn_id process_report --conn_uri http://localhost:3069 --conn_extra "{\"endpoint\":\"/airflow/\"}"
[2019-11-01 10:51:38.654] [error] Error: ENOENT: no such file or directory, open '/Users/kot4or/Library/Application Support/scidap-satellite/airflow/airflow.cfg'
at Object.openSync (fs.js:447:3)
at Object.func (electron/js2c/asar.js:138:31)
at Object.func [as openSync] (electron/js2c/asar.js:138:31)
at Object.readFileSync (fs.js:349:35)
at Object.fs.readFileSync (electron/js2c/asar.js:540:40)
at Object.fs.readFileSync (electron/js2c/asar.js:540:40)
at SatelliteApp.<anonymous> (/Applications/scidap-satellite.app/Contents/Resources/app/electron/SatelliteApp.js:622:62)
at step (/Applications/scidap-satellite.app/Contents/Resources/app/electron/SatelliteApp.js:43:23)
at Object.next (/Applications/scidap-satellite.app/Contents/Resources/app/electron/SatelliteApp.js:24:53)
at fulfilled (/Applications/scidap-satellite.app/Contents/Resources/app/electron/SatelliteApp.js:15:58)
[2019-11-01 10:51:39.949] [info] init
[2019-11-01 10:51:39.950] [info] init airflowSettings: {
AIRFLOW_HOME: '/Users/kot4or/Library/Application Support/scidap-satellite/airflow',
init_commands: [
'airflow initdb',
'airflow connections -a --conn_id process_report --conn_uri http://localhost:3069 --conn_extra "{"endpoint":"/airflow/"}"'
]
}
[2019-11-01 10:51:39.950] [info] init satelliteSettings: {
port: 3069,
scidapRoot: '/Users/kot4or/scidap',
scidapSSLPort: 3070,
airflowAPIPort: 8080,
aria2cPort: 6800,
mongoPort: 27017,
pm2Port: 9615,
baseUrl: 'http://localhost:3069/',
sslCert: '',
sslKey: '',
triggerDag: 'http://127.0.0.1:8080/api/experimental/dags/{dag_id}/dag_runs',
localFiles: false
}
[2019-11-01 10:51:39.951] [info] airflow initdb
[2019-11-01 10:51:39.956] [info] airflow connections -a --conn_id process_report --conn_uri http://localhost:3069 --conn_extra "{\"endpoint\":\"/airflow/\"}"
[2019-11-01 10:51:39.995] [info] Pm2 started!
[2019-11-01 10:51:40.388] [info] pm2 god spawn: { msg: 'pong' }
[2019-11-01 10:51:40.395] [info] pm2 god spawned
[2019-11-01 10:51:43.079] [info] init command exited with code 1
[2019-11-01 10:51:43.079] [info] init stderr undefinedTraceback (most recent call last):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: connection
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./app_packages/bin/airflow", line 32, in <module>
args.func(args)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/cli.py", line 74, in wrapper
return f(*args, **kwargs)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/bin/cli.py", line 1246, in connections
.filter(Connection.conn_id == new_conn.conn_id).first()):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3240, in first
ret = list(self[0:1])
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3018, in __getitem__
return list(res)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3342, in __iter__
return self._execute_and_instances(context)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3367, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
e, statement, parameters, cursor, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: connection
[SQL: SELECT connection.password AS connection_password, connection.extra AS connection_extra, connection.id AS connection_id, connection.conn_id AS connection_conn_id, connection.conn_type AS connection_conn_type, connection.host AS connection_host, connection.schema AS connection_schema, connection.login AS connection_login, connection.port AS connection_port, connection.is_encrypted AS connection_is_encrypted, connection.is_extra_encrypted AS connection_is_extra_encrypted
FROM connection
WHERE connection.conn_id = ?
LIMIT ? OFFSET ?]
[parameters: ('process_report', 1, 0)]
(Background on this error at: http://sqlalche.me/e/e3q8)
[2019-11-01 10:51:43.085] [info] init command exited with code 1
[2019-11-01 10:51:43.085] [info] init stderr undefinedTraceback (most recent call last):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: connection
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./app_packages/bin/airflow", line 32, in <module>
args.func(args)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/cli.py", line 74, in wrapper
return f(*args, **kwargs)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/bin/cli.py", line 1246, in connections
.filter(Connection.conn_id == new_conn.conn_id).first()):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3240, in first
ret = list(self[0:1])
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3018, in __getitem__
return list(res)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3342, in __iter__
return self._execute_and_instances(context)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/orm/query.py", line 3367, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
e, statement, parameters, cursor, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: connection
[SQL: SELECT connection.password AS connection_password, connection.extra AS connection_extra, connection.id AS connection_id, connection.conn_id AS connection_conn_id, connection.conn_type AS connection_conn_type, connection.host AS connection_host, connection.schema AS connection_schema, connection.login AS connection_login, connection.port AS connection_port, connection.is_encrypted AS connection_is_encrypted, connection.is_extra_encrypted AS connection_is_extra_encrypted
FROM connection
WHERE connection.conn_id = ?
LIMIT ? OFFSET ?]
[parameters: ('process_report', 1, 0)]
(Background on this error at: http://sqlalche.me/e/e3q8)
[2019-11-01 10:51:48.329] [info] init command exited with code 1
[2019-11-01 10:51:48.330] [info] init stderr undefinedINFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./app_packages/bin/airflow", line 32, in <module>
args.func(args)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/bin/cli.py", line 1102, in initdb
db.initdb(settings.RBAC)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/db.py", line 106, in initdb
upgradedb()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/db.py", line 377, in upgradedb
command.upgrade(config, 'heads')
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/util/compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/migrations/env.py", line 92, in <module>
run_migrations_online()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/migrations/env.py", line 86, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/migration.py", line 499, in run_migrations
self._ensure_version_table()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/migration.py", line 440, in _ensure_version_table
self._version.create(self.connection, checkfirst=True)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/schema.py", line 870, in create
bind._run_visitor(ddl.SchemaGenerator, self, checkfirst=checkfirst)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1615, in _run_visitor
visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/visitors.py", line 138, in traverse_single
return meth(obj, **kw)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/ddl.py", line 826, in visit_table
include_foreign_key_constraints,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1050, in _execute_ddl
compiled,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
e, statement, parameters, cursor, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL:
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
)
]
(Background on this error at: http://sqlalche.me/e/e3q8)
[2019-11-01 10:51:48.335] [info] init command exited with code 1
[2019-11-01 10:51:48.335] [info] init stderr undefinedINFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./app_packages/bin/airflow", line 32, in <module>
args.func(args)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/bin/cli.py", line 1102, in initdb
db.initdb(settings.RBAC)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/db.py", line 106, in initdb
upgradedb()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/utils/db.py", line 377, in upgradedb
command.upgrade(config, 'heads')
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/util/compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/migrations/env.py", line 92, in <module>
run_migrations_online()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/airflow/migrations/env.py", line 86, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/migration.py", line 499, in run_migrations
self._ensure_version_table()
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/alembic/runtime/migration.py", line 440, in _ensure_version_table
self._version.create(self.connection, checkfirst=True)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/schema.py", line 870, in create
bind._run_visitor(ddl.SchemaGenerator, self, checkfirst=checkfirst)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1615, in _run_visitor
visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/visitors.py", line 138, in traverse_single
return meth(obj, **kw)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/ddl.py", line 826, in visit_table
include_foreign_key_constraints,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1050, in _execute_ddl
compiled,
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
e, statement, parameters, cursor, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
cursor, statement, parameters, context
File "/Applications/scidap-satellite.app/Contents/Resources/Services/cwl-airflow/Resources/app_packages/sqlalchemy/engine/default.py", line 580, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL:
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
)
]
(Background on this error at: http://sqlalche.me/e/e3q8)
It looks like
airflow initdb
andairflow connections ...
are executed not sequentially (see timestamps in the attached log), so when adding a new connection database is not yet ready.Manually removing
airflow.db
and rerunning these two commands fixed the problem.Log with errors