• Members 3 posts
    June 14, 2021, 8:23 a.m.

    I installed misago_docker in the steps of installing the document, and then after docker-compose up started, an error was reported, the content is as follows´╝Ü
    postgres_1 | 2021-06-14 05:51:00.877 UTC [199] ERROR: relation "misago_cache_cacheversion" does not exist at character 88
    postgres_1 | 2021-06-14 05:51:00.877 UTC [199] STATEMENT: SELECT "misago_cache_cacheversion"."cache", "misago_cache_cacheversion"."version" FROM "misago_cache_cacheversion"

    The project can be started, but there seems to be an error in the database, what should I do?

  • June 14, 2021, 11:06 p.m.

    Did you follow setup guide? It seems like you didn't initialize the database.

  • arrow_forward
  • edit

    Thread title has been changed from Is there any friend who can help?.

  • Members 3 posts
    June 15, 2021, 9:58 a.m.

    I reinstalled it and found the following error
    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "manage.py", line 23, in <module>
    File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
    File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 375, in execute
    File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(args, cmd_options)
    File "/usr/local/lib/python3.7/site-packages/misago/users/management/commands/createsuperuser.py", line 73, in execute
    return super().execute(*args,
    File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(
    args, options)
    File "/usr/local/lib/python3.7/site-packages/misago/users/management/commands/createsuperuser.py", line 84, in handle
    settings = get_dynamic_settings()
    File "/usr/local/lib/python3.7/site-packages/misago/conf/shortcuts.py", line 6, in get_dynamic_settings
    cache_versions = get_cache_versions()
    File "/usr/local/lib/python3.7/site-packages/misago/cache/versions.py", line 7, in get_cache_versions
    return {i.cache: i.version for i in queryset}
    File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 274, in iter
    File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
    File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 55, in iter
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
    File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1138, in execute_sql
    cursor = self.connection.cursor()
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/base.py", line 256, in cursor
    return self._cursor()
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/base.py", line 233, in _cursor
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
    File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 89, in exit
    raise dj_exc_value.with_traceback(traceback) from exc_value
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/base.py", line 195, in connect
    self.connection = self.get_new_connection(conn_params)
    File "/usr/local/lib/python3.7/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
    connection = Database.connect(
    File "/usr/local/lib/python3.7/site-packages/psycopg2/init.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    django.db.utils.OperationalError: FATAL: password authentication failed for user "misago_H2uLJFsfSkLj3SEm"

    Recreating misago_docker_nginx-proxy_1 ...
    Recreating misago_docker_nginx-proxy_1 ... done
    Recreating misago_docker_postgres_1 ... done
    Recreating misago_docker_misago-celery_1 ... done
    Recreating misago_docker_nginx-lets-encrypt_1 ... done
    Recreating misago_docker_misago_1 ... done
    Setup completed.
    If you have already pointed a domain at this server, you can now visit it to access your Misago site.
    Please note that it may take up to few minutes for HTTPS to activate.

  • June 17, 2021, 11:19 a.m.

    There's apparently a bug in Docker PostgreSQL image where it sometimes fails to setup database correctly. When this happens recommended approach is to remove env files from config directory and then prune docker before trying again:

    docker-compose stop
    docker-compose down
    docker system prune --all --volumes -f

    I wish there was a better way. :/