`relation "licenses" does not exist` on koel:init
Opened this issue · 1 comments
romner-set commented
Getting this error trying to setup koel from scratch with php artisan koel:init --no-assets
.
docker-compose.yml
/secrets/rendered/env
is autogenerated.
services:
koel:
image: phanan/koel
restart: always
depends_on:
- database
ports:
- '8080:80'
env_file:
- /secrets/rendered/env
environment:
- APP_KEY=${APP_KEY}
- DB_CONNECTION=pgsql
- DB_PORT=5432
- DB_HOST=database
- DB_USERNAME=koel
- DB_PASSWORD=${DB_PASSWORD}
- DB_DATABASE=koel
- MEDIA_PATH=/music
- APP_MAX_SCAN_TIME=60000
- MEMORY_LIMIT=8192
- STREAMING_METHOD=x-sendfile
- SCOUT_DRIVER=meilisearch
- MEILISEARCH_HOST=meilisearch:7700
- MEILISEARCH_KEY=${MEILISEARCH_KEY}
- TRANSCODE_FLAC=false
- FFMPEG_PATH=
- OUTPUT_BIT_RATE=
- ALLOW_DOWNLOAD=true
- FORCE_HTTPS=true
- PUSHER_APP_CLUSTER=eu
- LASTFM_API_KEY=${LASTFM_API_KEY}
- LASTFM_API_SECRET=${LASTFM_API_SECRET}
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}
- PUSHER_APP_ID=${PUSHER_APP_ID}
- PUSHER_APP_KEY=${PUSHER_APP_KEY}
- PUSHER_APP_SECRET=${PUSHER_APP_SECRET}
volumes:
- /music:/music:ro
- /data/covers:/var/www/html/public/img/covers
- /data/search_index:/var/www/html/storage/search-indexes
meilisearch:
image: getmeili/meilisearch
restart: always
env_file:
- /secrets/rendered/env
environment:
- MEILI_MASTER_KEY=${MEILISEARCH_KEY}
- MEILI_ENV=production
- MEILI_HTTP_ADDR=0.0.0.0:7700
- MEILI_NO_ANALYTICS=true
- MEILI_MAX_INDEXING_MEMORY=8G
- MEILI_MAX_INDEXING_THREADS=4
volumes:
- /data/meili_data:/meili_data
database:
image: postgres:13
restart: always
env_file:
- /secrets/rendered/env
volumes:
- /data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=koel
- POSTGRES_USER=koel
- POSTGRES_PASSWORD=${DB_PASSWORD}
docker logs
Attaching to database-1, koel-1, meilisearch-1
meilisearch-1 |
meilisearch-1 | 888b d888 d8b 888 d8b 888
meilisearch-1 | 8888b d8888 Y8P 888 Y8P 888
meilisearch-1 | 88888b.d88888 888 888
meilisearch-1 | 888Y88888P888 .d88b. 888 888 888 .d8888b .d88b. 8888b. 888d888 .d8888b 88888b.
meilisearch-1 | 888 Y888P 888 d8P Y8b 888 888 888 88K d8P Y8b "88b 888P" d88P" 888 "88b
meilisearch-1 | 888 Y8P 888 88888888 888 888 888 "Y8888b. 88888888 .d888888 888 888 888 888
meilisearch-1 | 888 " 888 Y8b. 888 888 888 X88 Y8b. 888 888 888 Y88b. 888 888
meilisearch-1 | 888 888 "Y8888 888 888 888 88888P' "Y8888 "Y888888 888 "Y8888P 888 888
meilisearch-1 |
meilisearch-1 | Config file path: "none"
meilisearch-1 | Database path: "./data.ms"
meilisearch-1 | Server listening on: "http://0.0.0.0:7700"
meilisearch-1 | Environment: "production"
meilisearch-1 | Commit SHA: "cfaac6f7ca55e91ec3cf40f8682f528cd8743562"
meilisearch-1 | Commit date: "2024-11-14T15:55:14Z"
meilisearch-1 | Package version: "1.11.3"
meilisearch-1 | Anonymous telemetry: "Disabled"
meilisearch-1 |
meilisearch-1 | A master key has been set. Requests to Meilisearch won't be authorized unless you provide an authentication key.
meilisearch-1 |
meilisearch-1 | Check out Meilisearch Cloud! https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=engine&utm_medium=cli
meilisearch-1 | Documentation: https://www.meilisearch.com/docs
meilisearch-1 | Source code: https://github.com/meilisearch/meilisearch
meilisearch-1 | Discord: https://discord.meilisearch.com
meilisearch-1 |
meilisearch-1 | 2024-12-05T11:05:53.794160Z INFO actix_server::builder: starting 16 workers
meilisearch-1 | 2024-12-05T11:05:53.794474Z INFO actix_server::server: Actix runtime found; starting in Actix runtime
database-1 | The files belonging to this database system will be owned by user "postgres".
database-1 | This user must also own the server process.
database-1 |
database-1 | The database cluster will be initialized with locale "en_US.utf8".
database-1 | The default database encoding has accordingly been set to "UTF8".
database-1 | The default text search configuration will be set to "english".
database-1 |
database-1 | Data page checksums are disabled.
database-1 |
database-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
database-1 | creating subdirectories ... ok
database-1 | selecting dynamic shared memory implementation ... posix
database-1 | selecting default max_connections ... 100
database-1 | selecting default shared_buffers ... 128MB
database-1 | selecting default time zone ... Etc/UTC
database-1 | creating configuration files ... ok
koel-1 | running docker-php-entrypoint with arguments apache2-foreground
koel-1 | [Thu Dec 05 11:05:54.327851 2024] [so:warn] [pid 8] AH01574: module xsendfile_module is already loaded, skipping
koel-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
koel-1 | [Thu Dec 05 11:05:54.367712 2024] [so:warn] [pid 8] AH01574: module xsendfile_module is already loaded, skipping
koel-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
koel-1 | [Thu Dec 05 11:05:54.396151 2024] [mpm_prefork:notice] [pid 8] AH00163: Apache/2.4.38 (Debian) PHP/8.1.8 configured -- resuming normal operations
koel-1 | [Thu Dec 05 11:05:54.396173 2024] [core:notice] [pid 8] AH00094: Command line: 'apache2 -D FOREGROUND'
database-1 | running bootstrap script ... ok
database-1 | performing post-bootstrap initialization ... ok
database-1 | syncing data to disk ... ok
database-1 |
database-1 |
database-1 | Success. You can now start the database server using:
database-1 |
database-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
database-1 |
database-1 | initdb: warning: enabling "trust" authentication for local connections
database-1 | You can change this by editing pg_hba.conf or using the option -A, or
database-1 | --auth-local and --auth-host, the next time you run initdb.
database-1 | waiting for server to start....2024-12-05 11:05:57.064 UTC [49] LOG: starting PostgreSQL 13.18 (Debian 13.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
database-1 | 2024-12-05 11:05:57.066 UTC [49] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
database-1 | 2024-12-05 11:05:57.077 UTC [50] LOG: database system was shut down at 2024-12-05 11:05:55 UTC
database-1 | 2024-12-05 11:05:57.087 UTC [49] LOG: database system is ready to accept connections
database-1 | done
database-1 | server started
database-1 | CREATE DATABASE
database-1 |
database-1 |
database-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
database-1 |
database-1 | 2024-12-05 11:05:57.896 UTC [49] LOG: received fast shutdown request
database-1 | waiting for server to shut down...2024-12-05 11:05:57.898 UTC [49] LOG: aborting any active transactions
database-1 | .2024-12-05 11:05:57.899 UTC [49] LOG: background worker "logical replication launcher" (PID 56) exited with exit code 1
database-1 | 2024-12-05 11:05:57.900 UTC [51] LOG: shutting down
database-1 | 2024-12-05 11:05:57.919 UTC [49] LOG: database system is shut down
database-1 | done
database-1 | server stopped
database-1 |
database-1 | PostgreSQL init process complete; ready for start up.
database-1 |
database-1 | 2024-12-05 11:05:58.050 UTC [1] LOG: starting PostgreSQL 13.18 (Debian 13.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
database-1 | 2024-12-05 11:05:58.050 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
database-1 | 2024-12-05 11:05:58.050 UTC [1] LOG: listening on IPv6 address "::", port 5432
database-1 | 2024-12-05 11:05:58.055 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
database-1 | 2024-12-05 11:05:58.063 UTC [64] LOG: database system was shut down at 2024-12-05 11:05:57 UTC
database-1 | 2024-12-05 11:05:58.071 UTC [1] LOG: database system is ready to accept connections
laravel.log:
[2024-12-05 11:06:41] production.ERROR: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "licenses" does not exist
LINE 1: select * from "licenses" order by "created_at" desc limit 1
^ (Connection: pgsql, SQL: select * from "licenses" order by "created_at" desc limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42P01): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation \"licenses\" does not exist
LINE 1: select * from \"licenses\" order by \"created_at\" desc limit 1
^ (Connection: pgsql, SQL: select * from \"licenses\" order by \"created_at\" desc limit 1) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
Also tried it with mariadb, got pretty much the same error:
PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'koel.licenses' doesn't exist at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:423
Raiper34 commented
I have similar issue with licences. php artisan koel:init --no-assets
runs well, but when I open web interface with enabled debug, I get
SQLSTATE[HY000]: General error: 1 no such table: licenses (Connection: sqlite, SQL: select * from "licenses" order by "created_at" desc limit 1)