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

Image Startup with "unable to open database file" #65

Open
Noschvie opened this issue Jan 3, 2024 · 1 comment
Open

Image Startup with "unable to open database file" #65

Noschvie opened this issue Jan 3, 2024 · 1 comment

Comments

@Noschvie
Copy link

Noschvie commented Jan 3, 2024

Hello

want to retest #62 with an RPi and Bookworm as docker host OS. But the startup of the image medaziz11/uptimekuma_restapi leads to this errors:

pi@hadersdorf:~/Uptime-Kuma $ docker-compose logs uptime-api
uptime-api  | [2024-01-03 12:29:39 +0100] [1] [INFO] Starting gunicorn 20.1.0
uptime-api  | [2024-01-03 12:29:39 +0100] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
uptime-api  | [2024-01-03 12:29:39 +0100] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
uptime-api  | [2024-01-03 12:29:40 +0100] [7] [INFO] Booting worker with pid: 7
uptime-api  | [2024-01-03 12:29:45 +0100] [7] [INFO] Started server process [7]
uptime-api  | [2024-01-03 12:29:45 +0100] [7] [INFO] Waiting for application startup.
uptime-api  | [2024-01-03 12:29:45 +0100] [7] [ERROR] Traceback (most recent call last):
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/sqlite/client.py", line 34, in translate_exceptions_
uptime-api  |     return await func(self, query, *args)
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/sqlite/client.py", line 153, in execute_script
uptime-api  |     async with self.acquire_connection() as connection:
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/base/client.py", line 220, in __aenter__
uptime-api  |     await self.ensure_connection()
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/base/client.py", line 216, in ensure_connection
uptime-api  |     await self.client.create_connection(with_db=True)
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/sqlite/client.py", line 69, in create_connection
uptime-api  |     await self._connection._connect()
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/aiosqlite/core.py", line 137, in _connect
uptime-api  |     self._connection = await future
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/aiosqlite/core.py", line 102, in run
uptime-api  |     result = function()
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/aiosqlite/core.py", line 397, in connector
uptime-api  |     return sqlite3.connect(loc, **kwargs)
uptime-api  | sqlite3.OperationalError: unable to open database file
uptime-api  |
uptime-api  | During handling of the above exception, another exception occurred:
uptime-api  |
uptime-api  | Traceback (most recent call last):
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/starlette/routing.py", line 645, in lifespan
uptime-api  |     async with self.lifespan_context(app):
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/starlette/routing.py", line 540, in __aenter__
uptime-api  |     await self._router.startup()
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/starlette/routing.py", line 622, in startup
uptime-api  |     await handler()
uptime-api  |   File "/app/main.py", line 41, in startup_event
uptime-api  |     await initialize_app(app)
uptime-api  |   File "/app/app_setup.py", line 10, in initialize_app
uptime-api  |     await setup_database()
uptime-api  |   File "/app/app_setup.py", line 29, in setup_database
uptime-api  |     await Tortoise.generate_schemas()
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/__init__.py", line 636, in generate_schemas
uptime-api  |     await generate_schema_for_client(connection, safe)
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/utils.py", line 31, in generate_schema_for_client
uptime-api  |     await generator.generate_from_string(schema)
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/base/schema_generator.py", line 448, in generate_from_string
uptime-api  |     await self.client.execute_script(creation_string)
uptime-api  |   File "/app/venv/lib/python3.9/site-packages/tortoise/backends/sqlite/client.py", line 36, in translate_exceptions_
uptime-api  |     raise OperationalError(exc)
uptime-api  | tortoise.exceptions.OperationalError: unable to open database file
uptime-api  |
uptime-api  | [2024-01-03 12:29:45 +0100] [7] [ERROR] Application startup failed. Exiting.
uptime-api  | [2024-01-03 12:29:45 +0100] [7] [INFO] Worker exiting (pid: 7)

Any idea? Thanks!

@atribe
Copy link

atribe commented May 6, 2024

#38 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants