You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After Giving some time for the database to be ready, please wait ...
and initialize your superuser account... messages an error appears
Error reported :
2024-12-11T22:05:09.252965Z [info ] BASE_DIR: /code [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253085Z [info ] VERSION: v1.9.26 [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253177Z [info ] BUILD: 1a03545e [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253340Z [info ] DEBUG mode: True [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253435Z [info ] CISO_ASSISTANT_URL: https://localhost:8443 [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253515Z [info ] ALLOWED_HOSTS: ['backend', 'localhost'] [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253691Z [info ] SQLITE_FILE: /code/db/ciso-assistant.sqlite3 [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
2024-12-11T22:05:09.253775Z [info ] DATABASE ENGINE: django.db.backends.sqlite3 [ciso_assistant.settings] ciso_assistant_url=https://localhost:8443
Traceback (most recent call last):
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
self.connect()
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 256, in connect
self.connection = self.get_new_connection(conn_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 200, in get_new_connection
conn = Database.connect(**conn_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/code/manage.py", line 23, in <module>
main()
File "/code/manage.py", line 19, in main
execute_from_command_line(sys.argv)
File "/code/.venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/code/.venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/code/.venv/lib/python3.11/site-packages/django/core/management/base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/code/.venv/lib/python3.11/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 90, in execute
return super().execute(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
self.check_migrations()
File "/code/.venv/lib/python3.11/site-packages/django/core/management/base.py", line 581, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/migrations/executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/migrations/loader.py", line 58, in __init__
self.build_graph()
File "/code/.venv/lib/python3.11/site-packages/django/db/migrations/loader.py", line 235, in build_graph
self.applied_migrations = recorder.applied_migrations()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
if self.has_table():
^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/migrations/recorder.py", line 63, in has_table
with self.connection.cursor() as cursor:
^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 320, in cursor
return self._cursor()
^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 296, in _cursor
self.ensure_connection()
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
with self.wrap_database_errors:
File "/code/.venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
self.connect()
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py", line 256, in connect
self.connection = self.get_new_connection(conn_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/code/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 200, in get_new_connection
conn = Database.connect(**conn_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: unable to open database file
+ echo 'connect to ciso assistant on https://localhost:8443'
connect to ciso assistant on https://localhost:8443
+ echo 'for successive runs you can now use docker compose up'
for successive runs you can now use docker compose up
Error can be reproduced by running docker compose exec backend poetry run python manage.py createsuperuser command
Expected behavior
Database creation
Screenshots
NA
Environment (please complete the following information):
Device: Asus ZenBook running uptodate Fedora Workstation 41
Browser Firefox but not used so far
Version Today Github version
Additional context
The text was updated successfully, but these errors were encountered:
Hello @carpediem29 and thank you for the feedback,
Could be related to some race conditions during the initialization of the database.
I suggest to delete the db folder and start over; if the issue occurs again try to do docker compose exec backend poetry run python manage.py migrate first to ensure migrations are done and then docker compose exec backend poetry run python manage.py createsuperuser
ab-smith
changed the title
docker compose exec backend poetry run python manage.py createsuperuser fails on Fedora Workstation 41
createsuperuser fails on Fedora Workstation 41
Dec 14, 2024
Describe the bug
installation issue of community version on Fedora Workstation 41 when running docker-compose.sh
To Reproduce
Steps to reproduce the behavior:
and initialize your superuser account... messages an error appears
Error can be reproduced by running
docker compose exec backend poetry run python manage.py createsuperuser
commandExpected behavior
Database creation
Screenshots
NA
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: