mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 03:14:50 +03:00
[Bug]: Unexpected error from database adapter: relation #602
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Julius-Bendt on GitHub (Nov 12, 2024).
Where is the problem occurring?
I encountered the problem while interacting with the server (Backend)
What browsers are you seeing the problem on?
Firefox
Current behaviour
Data is missing
Desired behaviour
Data should not be missing
Steps to reproduce
I honestly don't know. Update the container, I think?
Other information
I've read #218, and the problem seems to be related. I was under the understanding, that this wouldn't happen again though.
I've tried accessing the site from both a browser where I have a cached session, and one where I logged in.
I get the following logs from the backend:
2024-11-12 08:17:56 [E] Sending 500 ("Server Error") response:
planka | Unexpected error from database adapter: relation "public.session" does not exist
planka | 2024-11-12 12:50:01 [E] Sending 500 ("Server Error") response:
planka | Unexpected error from database adapter: relation "public.user_account" does not exist
And from the database:
startup:
planka-postgres | Success. You can now start the database server using:
planka-postgres |
planka-postgres | pg_ctl -D /var/lib/postgresql/data -l logfile start
planka-postgres |
planka-postgres | waiting for server to start....2024-11-12 06:12:23.596 UTC [42] LOG: starting PostgreSQL 14.13 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
planka-postgres | 2024-11-12 06:12:23.597 UTC [42] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
planka-postgres | 2024-11-12 06:12:23.602 UTC [43] LOG: database system was shut down at 2024-11-12 06:12:23 UTC
planka-postgres | 2024-11-12 06:12:23.607 UTC [42] LOG: database system is ready to accept connections
planka-postgres | done
planka-postgres | server started
planka-postgres | CREATE DATABASE // Bit worried about this one
planka-postgres |
planka-postgres |
planka-postgres | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
planka-postgres |
planka-postgres | waiting for server to shut down....2024-11-12 06:12:23.786 UTC [42] LOG: received fast shutdown request
planka-postgres | 2024-11-12 06:12:23.787 UTC [42] LOG: aborting any active transactions
planka-postgres | 2024-11-12 06:12:23.789 UTC [42] LOG: background worker "logical replication launcher" (PID 49) exited with exit code 1
planka-postgres | 2024-11-12 06:12:23.790 UTC [44] LOG: shutting down
planka-postgres | 2024-11-12 06:12:23.804 UTC [42] LOG: database system is shut down
planka-postgres | done
planka-postgres | server stopped
planka-postgres |
planka-postgres | PostgreSQL init process complete; ready for start up.
When I tried logging in:
2024-11-12 08:17:56.488 UTC [5557] ERROR: relation "public.session" does not exist at character 138
planka-postgres | 2024-11-12 08:17:56.488 UTC [5557] STATEMENT: select "id", "created_at", "updated_at", "access_token", "http_only_token", "remote_address", "user_agent", "deleted_at", "user_id" from "public"."session" where "access_token" = $1 and "deleted_at" is null limit $2
planka-postgres | 2024-11-12 12:50:01.142 UTC [17466] ERROR: relation "public.user_account" does not exist at character 219
planka-postgres | 2024-11-12 12:50:01.142 UTC [17466] STATEMENT: select "id", "created_at", "updated_at", "email", "password", "is_admin", "is_sso", "name", "username", "avatar", "phone", "organization", "language", "subscribe_to_own_cards", "deleted_at", "password_changed_at" from "public"."user_account" where "username" = $1 and "deleted_at" is null limit $2
Docker compose:
Other information:
I have Watchtower configured, to keep my containers up to date
@meltyshev commented on GitHub (Nov 12, 2024):
Hi!
The
volumesin yourdocker-compose.ymlfile look a bit unusual. In theplankaPostgresservice, the volume should be mounted to/var/lib/postgresql/datainstead of/planka_data. Additionally, theplankaservice should have three separate volumes mounted to/app/public/user-avatars,/app/public/project-background-images, and/app/private/attachments.The problem is most likely that instead of saving all the data to the host via mounted folders, the data was saved inside the container itself (due to the volumes was mounted to the incorrect path). As a result, all the data was deleted when the container was updated and recreated.
The updated
docker-compose.ymlin your case should look something like this:@Julius-Bendt commented on GitHub (Nov 12, 2024):
That would explain a lot, yes.
Thanks for the quick response and help!