rr- / szurubooru

Image board engine, Danbooru-style.
GNU General Public License v3.0
704 stars 178 forks source link

Role "szuru" does not exist. #551

Closed MKwareContributions closed 1 year ago

MKwareContributions commented 1 year ago

Szurubooru starts database container, but after spamming errors to the log crashes, and web interface tells "Could not fetch basic configuration from server." Here are the logs:

PostgreSQL Database directory appears to contain a database; Skipping initialization szuru-sql-1 | szuru-sql-1 | 2023-02-13 17:27:14.427 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 szuru-sql-1 | 2023-02-13 17:27:14.427 UTC [1] LOG: listening on IPv6 address "::", port 5432 szuru-sql-1 | 2023-02-13 17:27:14.504 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" szuru-sql-1 | 2023-02-13 17:27:14.654 UTC [22] LOG: database system was interrupted; last known up at 2023-02-13 17:24:32 UTC szuru-sql-1 | 2023-02-13 17:27:14.899 UTC [22] LOG: database system was not properly shut down; automatic recovery in progress szuru-sql-1 | 2023-02-13 17:27:14.927 UTC [22] LOG: redo starts at 0/1761618 szuru-sql-1 | 2023-02-13 17:27:14.927 UTC [22] LOG: invalid record length at 0/1761650: wanted 24, got 0 szuru-sql-1 | 2023-02-13 17:27:14.927 UTC [22] LOG: redo done at 0/1761618 szuru-sql-1 | 2023-02-13 17:27:15.122 UTC [1] LOG: database system is ready to accept connections szuru-sql-1 | 2023-02-13 17:27:17.325 UTC [29] FATAL: password authentication failed for user "szuru" szuru-sql-1 | 2023-02-13 17:27:17.325 UTC [29] DETAIL: Role "szuru" does not exist. szuru-sql-1 | Connection matched pg_hba.conf line 95: "host all all all md5"

And it just keeps spamming last 3 lines until it crashes. I've tried sudo chown -R 1000:1000 /var/local/szurubooru and setting another directory for db and images. Also I tried writing data in POSTGRES_USER and POSTGRES_PASSWORD variables in docker-compose.yml.

Versions just in case: OS: Debian 11 Docker: 23.0.1, build a5ee5b1

The only thing that comes to the mind is that I am using docker compose instead of docker-compose, but it replaces docker and I have some other containers on the system.

MKwareContributions commented 1 year ago

Issue is resolved by pulling and starting containers from ~/szuru/ and not from ~/Documents/szuru/ and also creating directories in user home directory: ~/szurudata/img, ~/szurudata/db. Not sure what actually helped.