Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems the installation script skips the DB installation... #1313

Closed
jlgarnier opened this issue Jan 6, 2025 · 2 comments
Closed

Seems the installation script skips the DB installation... #1313

jlgarnier opened this issue Jan 6, 2025 · 2 comments
Labels
question Further information is requested

Comments

@jlgarnier
Copy link

Describe the bug
I've tried to install the application on a VPS following the "Remote / Virtualization" instructions. The installation ends with multiple errors , do not create the admin account and the application doesn't run.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo.
  2. Edit docker-compose.yml as per the "Remote/Virtualization" instructions.
  3. run "sudo ./docker-compose.sh"
  4. See error

Expected behavior
Installation complete successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Device: VPS
  • OS: Debian 12
  • Browser: n/a
  • Version: n/a

Additional context
command "sudo docker compose logs backend" returns:

backend | 2025-01-06T10:30:09.357245Z [info ] BASE_DIR: /code [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.358342Z [info ] VERSION: v2.0.0 [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.358776Z [info ] BUILD: a373fef [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.359307Z [info ] DEBUG mode: True [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.359639Z [info ] CISO_ASSISTANT_URL: https://ciso.kortex-lab.fr:8443 [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.360068Z [info ] ALLOWED_HOSTS: ['backend', 'ciso.kortex-lab.fr'] [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.360556Z [info ] SQLITE_FILE: /code/db/ciso-assistant.sqlite3 [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | 2025-01-06T10:30:09.360905Z [info ] DATABASE ENGINE: django.db.backends.sqlite3 [ciso_assistant.settings] ciso_assistant_url=https://ciso.kortex-lab.fr:8443
backend | Traceback (most recent call last):
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
backend | self.connect()
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
backend | self.connection = self.get_new_connection(conn_params)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 200, in get_new_connection
backend | conn = Database.connect(**conn_params)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | sqlite3.OperationalError: unable to open database file
backend |
backend | The above exception was the direct cause of the following exception:
backend |
backend | Traceback (most recent call last):
backend | File "/code/manage.py", line 23, in
backend | main()
backend | File "/code/manage.py", line 19, in main
backend | execute_from_command_line(sys.argv)
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
backend | utility.execute()
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/init.py", line 436, in execute
backend | self.fetch_command(subcommand).run_from_argv(self.argv)
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv
backend | self.execute(*args, **cmd_options)
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
backend | output = self.handle(*args, **options)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/commands/showmigrations.py", line 67, in handle
backend | return self.show_list(connection, options["app_label"])
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/core/management/commands/showmigrations.py", line 86, in show_list
backend | loader = MigrationLoader(connection, ignore_no_migrations=True)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in init
backend | self.build_graph()
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
backend | self.applied_migrations = recorder.applied_migrations()
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
backend | if self.has_table():
backend | ^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
backend | with self.connection.cursor() as cursor:
backend | ^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
backend | return self._cursor()
backend | ^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
backend | self.ensure_connection()
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
backend | with self.wrap_database_errors:
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/utils.py", line 91, in exit
backend | raise dj_exc_value.with_traceback(traceback) from exc_value
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
backend | self.connect()
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
backend | self.connection = self.get_new_connection(conn_params)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
backend | return func(*args, **kwargs)
backend | ^^^^^^^^^^^^^^^^^^^^^
backend | File "/code/.venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 200, in get_new_connection
backend | conn = Database.connect(**conn_params)
backend | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend | django.db.utils.OperationalError: unable to open database file
backend | database not ready; waiting

Thanks in advance for any help!

@ab-smith
Copy link
Contributor

ab-smith commented Jan 6, 2025

hello @jlgarnier can you try with the latest version? seems like you're using one that got an edge case that was fixed recently.
Warm regards

@ab-smith ab-smith added the question Further information is requested label Jan 6, 2025
@ab-smith
Copy link
Contributor

ab-smith commented Jan 6, 2025

Fixed on the discord, it was indeed related to the version and the update fixed the problem.

@ab-smith ab-smith closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants