indico / indico-containers

Containerization of Indico
27 stars 26 forks source link

Database error (relation "events.events" does not exist) #51

Closed tamasgal closed 2 months ago

tamasgal commented 5 months ago

I am trying to run the latest PyPI release of Indico (3.2.9, built locally) using the worker docker recipe but I get an error when the container starts, see below.

Is there a ready to use worker image somewhere? The latest I could find on DockerHub is 3.2.8 (https://hub.docker.com/r/getindico/indico/tags)

ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | root
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | ERROR:  relation "events.events" does not exist
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | LINE 1: SELECT COUNT(*) FROM events.events
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |                              ^
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Preparing DB...
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Using external database...
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | ERROR:  extension "unaccent" already exists
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | ERROR:  extension "pg_trgm" already exists
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Traceback (most recent call last):
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/bin/indico", line 8, in <module>
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     sys.exit(cli())
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return self.main(*args, **kwargs)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     rv = self.invoke(ctx)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return _process_result(sub_ctx.command.invoke(sub_ctx))
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/cli/util.py", line 108, in invoke
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return self._impl.invoke(ctx)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 1654, in invoke
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     super().invoke(ctx)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return ctx.invoke(self.callback, **ctx.params)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return __callback(*args, **kwargs)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return f(get_current_context(), *args, **kwargs)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return f(get_current_context(), *args, **kwargs)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/flask/cli.py", line 354, in decorator
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     app = __ctx.ensure_object(ScriptInfo).load_app()
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/flask/cli.py", line 301, in load_app
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     app = self.create_app()
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/cli/util.py", line 26, in _create_app
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     return make_app()
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/web/flask/app.py", line 402, in make_app
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     app.config['INDICO'] = load_config(only_defaults=testing, override=config_override)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/core/config.py", line 211, in load_config
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     _postprocess_config(data)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/core/config.py", line 169, in _postprocess_config
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     data['BASE_URL'] = data['BASE_URL'].rstrip('/')
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | AttributeError: 'NoneType' object has no attribute 'rstrip'
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Starting Indico...
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | [uWSGI] getting INI configuration from /etc/uwsgi.ini
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** Starting uWSGI 2.0.26 (64bit) on [Thu Jun 27 13:12:54 2024] ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | compiled with version: 10.2.1 20210110 on 27 June 2024 12:45:07
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | os: Linux-5.4.0-121-generic #137-Ubuntu SMP Wed Jun 15 13:33:07 UTC 2022
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | nodename: 8b9312f2d37b
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | machine: x86_64
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | clock source: unix
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | pcre jit disabled
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | detected number of CPU cores: 128
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | current working directory: /
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | detected binary path: /opt/indico/.venv/bin/uwsgi
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | uWSGI running as root, you can use --uid/--gid/--chroot options
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | your memory page size is 4096 bytes
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |  *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | detected max file descriptor number: 1048576
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | lock engine: pthread robust mutexes
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | thunder lock: disabled (you can enable it with --thunder-lock)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | uwsgi socket 0 bound to TCP address 0.0.0.0:59999 fd 3
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | uWSGI running as root, you can use --uid/--gid/--chroot options
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Python version: 3.9.19 (main, Jun 27 2024, 00:06:45)  [GCC 10.2.1 20210110]
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | PEP 405 virtualenv detected: /opt/indico/.venv
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Set PythonHome to /opt/indico/.venv
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Python main interpreter initialized at 0x55d4ea25e7d0
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | uWSGI running as root, you can use --uid/--gid/--chroot options
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | python threads support enabled
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | your server socket listen backlog is limited to 100 connections
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | your mercy for graceful operations on workers is 60 seconds
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | mapped 364600 bytes (356 KB) for 4 cores
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** Operational MODE: preforking ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Traceback (most recent call last):
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/indico.wsgi", line 9, in <module>
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     application = make_app()
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/web/flask/app.py", line 402, in make_app
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     app.config['INDICO'] = load_config(only_defaults=testing, override=config_override)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/core/config.py", line 211, in load_config
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     _postprocess_config(data)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |   File "/opt/indico/.venv/lib/python3.9/site-packages/indico/core/config.py", line 169, in _postprocess_config
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    |     data['BASE_URL'] = data['BASE_URL'].rstrip('/')
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | AttributeError: 'NoneType' object has no attribute 'rstrip'
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | unable to load app 0 (mountpoint='') (callable not found or import error)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** no app loaded. going in full dynamic mode ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | uWSGI running as root, you can use --uid/--gid/--chroot options
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned uWSGI master process (pid: 48)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned uWSGI worker 1 (pid: 49, cores: 1)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Thu Jun 27 13:12:55 2024 - mem-collector thread started for worker 1
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned 4 offload threads for uWSGI worker 1
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned uWSGI worker 2 (pid: 55, cores: 1)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Thu Jun 27 13:12:55 2024 - mem-collector thread started for worker 2
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned uWSGI worker 3 (pid: 60, cores: 1)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned 4 offload threads for uWSGI worker 2
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Thu Jun 27 13:12:55 2024 - mem-collector thread started for worker 3
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned uWSGI worker 4 (pid: 66, cores: 1)
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned 4 offload threads for uWSGI worker 3
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | Thu Jun 27 13:12:55 2024 - mem-collector thread started for worker 4
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | spawned 4 offload threads for uWSGI worker 4
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ecap-indico_indico-web.1.xcyye8bphwlp@ecap-s028    | --- no python application found, check your startup logs for errors ---
ThiefMaster commented 5 months ago

The latest PyPI release is v3.3.3... For a new setup, do not bother with the old v3.2.x image on Docker Hub.

Use the code from this PR's branch which will work with the latest v3.3.3 version.

In any case, for some reason your BASE_URL is None (most likely due to a missing env var since the old images use env vars for most of the config?), which breaks pretty much everything since that config option is mandatory.

tamasgal commented 2 months ago

Actually, let me close this and open a new issue instead.

sanyaade-teachings commented 2 months ago

The latest PyPI release is v3.3.3... For a new setup, do not bother with the old v3.2.x image on Docker Hub.

Use the code from this PR's branch which will work with the latest v3.3.3 version.

In any case, for some reason your BASE_URL is None (most likely due to a missing env var since the old images use env vars for most of the config?), which breaks pretty much everything since that config option is mandatory.

Hi Everyone, Many thanks for your support. The issue is still there, just trying to install using the docker compose but indico installation stucks at events.events does not exist. Please see the screenshot of the error below: image

I am new with indico but I have some little knowledge around docker. Many thanks for your support! Any help or tips on what I could will be highly appreciated. Hear from you soon.

God blesses!!!

Regards