czcorpus / kontext

An advanced, extensible web front-end for the Manatee-open corpus search engine
GNU General Public License v2.0
60 stars 22 forks source link

Running Docker basic configuration errors out #5057

Open drrasic opened 2 years ago

drrasic commented 2 years ago

Hello, Running docker-compose up errors out on _kontext1 and _rq-worker1 containers.

Docker version 20.10.14, build a224086 Docker-compose version 1.28.4, build cabd5cfb

Output:

rq-scheduler_1  | 19:10:00 Registering birth
kontext_1       | 2022-04-27 19:10:01,849 [plugins] INFO: installing plug-in db
kontext_1       | 2022-04-27 19:10:01,851 [plugins] INFO: installing plug-in integration_db
kontext_1       | 2022-04-27 19:10:01,851 [action.plugin.initializer] INFO: Plug-in DefaultIntegrationDb is waiting for environment
kontext_1       | 2022-04-27 19:10:01,851 [action.plugin.initializer] INFO: Plug-in DefaultIntegrationDb environment OK
kontext_1       | 2022-04-27 19:10:01,852 [plugins] INFO: installing plug-in sessions
kontext_1       | 2022-04-27 19:10:01,862 [plugins] INFO: installing plug-in settings_storage
kontext_1       | 2022-04-27 19:10:01,869 [plugins] INFO: installing plug-in auth
kontext_1       | 2022-04-27 19:10:01,880 [action.plugin.initializer] CRITICAL: Failed to initiate plug-in query_persistence: '_ctypes.UnionType' object is not subscriptable
kontext_1       | 2022-04-27 19:10:01,881 [action.plugin.initializer] ERROR: Traceback (most recent call last):
kontext_1       |   File "/opt/kontext/public/../lib/action/plugin/initializer.py", line 52, in init_plugin
kontext_1       |     plugin_module = plugins.load_plugin_module(settings.get('plugins', name)['module'])
kontext_1       |   File "/opt/kontext/public/../lib/plugins/__init__.py", line 239, in load_plugin_module
kontext_1       |     _tmp = __import__('plugins', fromlist=[name])
kontext_1       |   File "/opt/kontext/public/../lib/plugins/default_query_persistence/__init__.py", line 178, in <module>
kontext_1       |     class DefaultQueryPersistence(AbstractQueryPersistence):
kontext_1       |   File "/opt/kontext/public/../lib/plugins/default_query_persistence/__init__.py", line 183, in DefaultQueryPersistence
kontext_1       |     def __init__(self, db: KeyValueStorage, auth: AbstractAuth, ttl_days: int, anonymous_ttl_days: int, archive_backend: Union[DbPluginArchBackend, Sqlite3ArchBackend]):
kontext_1       | TypeError: '_ctypes.UnionType' object is not subscriptable
kontext_1       | 
kontext_1       | 2022-04-27 19:10:02,168 [plugins] INFO: installing plug-in db
kontext_1       | 2022-04-27 19:10:02,169 [plugins] INFO: installing plug-in integration_db
kontext_1       | 2022-04-27 19:10:02,169 [action.plugin.initializer] INFO: Plug-in DefaultIntegrationDb is waiting for environment
kontext_1       | 2022-04-27 19:10:02,169 [action.plugin.initializer] INFO: Plug-in DefaultIntegrationDb environment OK
kontext_1       | 2022-04-27 19:10:02,170 [plugins] INFO: installing plug-in sessions
kontext_1       | 2022-04-27 19:10:02,171 [plugins] INFO: installing plug-in settings_storage
kontext_1       | 2022-04-27 19:10:02,174 [plugins] INFO: installing plug-in auth
kontext_1       | 2022-04-27 19:10:02,177 [action.plugin.initializer] CRITICAL: Failed to initiate plug-in query_persistence: '_ctypes.UnionType' object is not subscriptable
kontext_1       | 2022-04-27 19:10:02,178 [action.plugin.initializer] ERROR: Traceback (most recent call last):
kontext_1       |   File "/opt/kontext/public/../lib/action/plugin/initializer.py", line 52, in init_plugin
kontext_1       |     plugin_module = plugins.load_plugin_module(settings.get('plugins', name)['module'])
kontext_1       |   File "/opt/kontext/public/../lib/plugins/__init__.py", line 239, in load_plugin_module
kontext_1       |     _tmp = __import__('plugins', fromlist=[name])
kontext_1       |   File "/opt/kontext/public/../lib/plugins/default_query_persistence/__init__.py", line 178, in <module>
kontext_1       |     class DefaultQueryPersistence(AbstractQueryPersistence):
kontext_1       |   File "/opt/kontext/public/../lib/plugins/default_query_persistence/__init__.py", line 183, in DefaultQueryPersistence
kontext_1       |     def __init__(self, db: KeyValueStorage, auth: AbstractAuth, ttl_days: int, anonymous_ttl_days: int, archive_backend: Union[DbPluginArchBackend, Sqlite3ArchBackend]):
kontext_1       | TypeError: '_ctypes.UnionType' object is not subscriptable
kontext_1       | 
kontext_1       | Traceback (most recent call last):
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run
kontext_1       |     self.sleep()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep
kontext_1       |     ready = select.select([self.PIPE[0]], [], [], 1.0)
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
kontext_1       |     self.reap_workers()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
kontext_1       |     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
kontext_1       | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
kontext_1       | 
kontext_1       | During handling of the above exception, another exception occurred:
kontext_1       | 
kontext_1       | Traceback (most recent call last):
kontext_1       |   File "/usr/local/bin/gunicorn", line 8, in <module>
kontext_1       |     sys.exit(run())
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
kontext_1       |     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 231, in run
kontext_1       |     super().run()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
kontext_1       |     Arbiter(self).run()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run
kontext_1       |     self.halt(reason=inst.reason, exit_status=inst.exit_status)
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt
kontext_1       |     self.stop()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop
kontext_1       |     time.sleep(0.1)
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
kontext_1       |     self.reap_workers()
kontext_1       |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
kontext_1       |     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
kontext_1       | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
rq-worker_1     | Failed to initiate plug-in query_persistence: '_ctypes.UnionType' object is not subscriptable
rq-worker_1     | Traceback (most recent call last):
rq-worker_1     |   File "/opt/kontext/lib/action/plugin/initializer.py", line 52, in init_plugin
rq-worker_1     |     plugin_module = plugins.load_plugin_module(settings.get('plugins', name)['module'])
rq-worker_1     |   File "/opt/kontext/lib/plugins/__init__.py", line 239, in load_plugin_module
rq-worker_1     |     _tmp = __import__('plugins', fromlist=[name])
rq-worker_1     |   File "/opt/kontext/lib/plugins/default_query_persistence/__init__.py", line 178, in <module>
rq-worker_1     |     class DefaultQueryPersistence(AbstractQueryPersistence):
rq-worker_1     |   File "/opt/kontext/lib/plugins/default_query_persistence/__init__.py", line 183, in DefaultQueryPersistence
rq-worker_1     |     def __init__(self, db: KeyValueStorage, auth: AbstractAuth, ttl_days: int, anonymous_ttl_days: int, archive_backend: Union[DbPluginArchBackend, Sqlite3ArchBackend]):
rq-worker_1     | TypeError: '_ctypes.UnionType' object is not subscriptable
rq-worker_1     | 
rq-worker_1     | Traceback (most recent call last):
rq-worker_1     |   File "worker/rqworker.py", line 38, in <module>
rq-worker_1     |     import general
rq-worker_1     |   File "/opt/kontext/worker/general.py", line 59, in <module>
rq-worker_1     |     initializer.init_plugin('query_persistence')
rq-worker_1     |   File "/opt/kontext/lib/action/plugin/initializer.py", line 71, in init_plugin
rq-worker_1     |     raise e
rq-worker_1     |   File "/opt/kontext/lib/action/plugin/initializer.py", line 52, in init_plugin
rq-worker_1     |     plugin_module = plugins.load_plugin_module(settings.get('plugins', name)['module'])
rq-worker_1     |   File "/opt/kontext/lib/plugins/__init__.py", line 239, in load_plugin_module
rq-worker_1     |     _tmp = __import__('plugins', fromlist=[name])
rq-worker_1     |   File "/opt/kontext/lib/plugins/default_query_persistence/__init__.py", line 178, in <module>
rq-worker_1     |     class DefaultQueryPersistence(AbstractQueryPersistence):
rq-worker_1     |   File "/opt/kontext/lib/plugins/default_query_persistence/__init__.py", line 183, in DefaultQueryPersistence
rq-worker_1     |     def __init__(self, db: KeyValueStorage, auth: AbstractAuth, ttl_days: int, anonymous_ttl_days: int, archive_backend: Union[DbPluginArchBackend, Sqlite3ArchBackend]):
rq-worker_1     | TypeError: '_ctypes.UnionType' object is not subscriptable
kontext_rq-worker_1 exited with code 1
kontext_kontext_1 exited with code 1
mzimandl commented 2 years ago

Thanks, we forgot about Gunicorn in dockerfiles, now it all runs using Sanic. Fix is on the way https://github.com/czcorpus/kontext/pull/5060

tomachalek commented 2 years ago

Hello @drrasic, the configuration for Docker should be fixed by now. Can you please confirm whether it works for you?

drrasic commented 2 years ago

Great, its working now. Thanks.