linuxserver / docker-babybuddy

GNU General Public License v3.0
37 stars 13 forks source link

Issue running arm32v7-latest Tag on RPI3 #14

Closed Shaun-Harrison closed 1 year ago

Shaun-Harrison commented 2 years ago

linuxserver.io


Expected Behavior

Create a new container running on RPI3 - armv7l & armhf

Current Behavior

Container gets created but UI isn't accessible, logs report issue of writing to a locked database

Steps to Reproduce

  1. Create docker-compose with the below yaml 2.docker-compose up -d 3.docker logs -f babybuddy
services:
  babybuddy:
    image: lscr.io/linuxserver/babybuddy:arm32v7-latest
    container_name: babybuddy
    environment:
      - TZ=Europe/London
    volumes:
      - ./appdata:/config
    ports:
      - 10405:8000
    restart: unless-stopped

Environment

OS: Raspberry OS - Bullseye CPU architecture: arm32 How docker service was installed: docker-compose

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

Docker logs

Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
BabyBuddy: https://github.com/sponsors/cdubz

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
**** No secret key found, generating one ****
Operations to perform:
  Apply all migrations: admin, auth, authtoken, axes, babybuddy, contenttypes, core, easy_thumbnails, sessions
Running migrations:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
sqlite3.OperationalError: database is locked

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 68, in ensure_schema
    editor.create_model(self.Migration)
  File "/usr/lib/python3.9/site-packages/django/db/backends/sqlite3/schema.py", line 36, in __exit__
    super().__exit__(exc_type, exc_value, traceback)
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 120, in __exit__
    self.atomic.__exit__(exc_type, exc_value, traceback)
  File "/usr/lib/python3.9/site-packages/django/db/transaction.py", line 246, in __exit__
    connection.commit()
  File "/usr/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 266, in commit
    self._commit()
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
  File "/usr/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
django.db.utils.OperationalError: database is locked

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/babybuddy/manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/app/babybuddy/babybuddy/management/commands/migrate.py", line 10, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
    post_migrate_state = executor.migrate(
  File "/usr/lib/python3.9/site-packages/django/db/migrations/executor.py", line 91, in migrate
    self.recorder.ensure_schema()
  File "/usr/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 70, in ensure_schema
    raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked)
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
sqlite3.OperationalError: database is locked
github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

j0nnymoe commented 2 years ago

This is a permissions issue because you aren't providing PUID/PGID values.

Shaun-Harrison commented 2 years ago

Hello

So I've ran id $user which have me the output of 0 (root) which is my user I've added

- PUID=0
- PGID=0

to my docker-compose environment section

I removed the appdata folder and done a docker-compose down & docker-compose up -d to fully re-create the container, can see in the logs that the new env variables are being used, but get the same error as before

Tried using 1000 as that's what's in the docs here just in case - https://docs.linuxserver.io/general/understanding-puid-and-pgid - but again get the same error

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.