[GH-ISSUE #1792] Opening database fails using the provided docker config #992

Closed
opened 2026-02-26 02:34:51 +03:00 by kerem · 7 comments
Owner

Originally created by @NtWriteCode on GitHub (Jul 15, 2024).
Original GitHub issue: https://github.com/koel/koel/issues/1792

Describe the bug
When trying to install from zero, it looks like koel is unable to connect to the database I just configured.

To reproduce
Steps to reproduce the behavior:

  1. Copy the compose file from here to the server: https://github.com/koel/docker/blob/master/docker-compose.mysql.yml (I use portainer stacks for the simplicity)
  2. Replace passwords with a random generated one, eg.: vtpBpeJkZ5K5Pz3FwAn6
  3. Add "container_name" for both containers to avoid stupid default naming. eg.: container_name: koel
  4. Deploy docker compose
  5. docker exec --user www-data -it koel bash
  6. php artisan koel:init --no-assets

Output:

************************************
*     KOEL INSTALLATION WIZARD     *
************************************

As a reminder, you can always install/upgrade manually following the guide at https://docs.koel.dev

  Clearing caches ......................................................................................................................... 5ms DONE
  Copying .env file ....................................................................................................................... 0ms DONE
  Generating app key ...................................................................................................................... 2ms DONE
  Using app key: base64:5sVbMzP01.. ........................................................................................................... DONE
  Migrating database .................................................................................................................. 1,295ms FAIL

   ERROR  Oops! Koel installation or upgrade didn't finish successfully.

   ERROR  Please check the error log at storage/logs/laravel.log and try again.

   ERROR  For further troubleshooting, visit https://docs.koel.dev/troubleshooting.

   ERROR  😥 Sorry for this. You deserve better.

Logfile:

www-data@91bd7db32436:~/html$ cat  storage/logs/laravel.log
[2024-07-15 22:02:36] production.ERROR: PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/vendor/teamtnt/tntsearch/src/Engines/SqliteEngine.php:61
Stack trace:
#0 /var/www/html/vendor/teamtnt/tntsearch/src/Engines/SqliteEngine.php(61): PDO->__construct()
#1 /var/www/html/vendor/teamtnt/tntsearch/src/Indexer/TNTIndexer.php(119): TeamTNT\TNTSearch\Engines\SqliteEngine->createIndex()
#2 /var/www/html/vendor/teamtnt/tntsearch/src/TNTSearch.php(75): TeamTNT\TNTSearch\Indexer\TNTIndexer->createIndex()
#3 /var/www/html/vendor/teamtnt/laravel-scout-tntsearch-driver/src/Engines/TNTSearchEngine.php(327): TeamTNT\TNTSearch\TNTSearch->createIndex()
#4 /var/www/html/vendor/teamtnt/laravel-scout-tntsearch-driver/src/Engines/TNTSearchEngine.php(55): TeamTNT\Scout\Engines\TNTSearchEngine->initIndex()
#5 /var/www/html/vendor/laravel/scout/src/Searchable.php(63): TeamTNT\Scout\Engines\TNTSearchEngine->update()
#6 /var/www/html/vendor/laravel/scout/src/Searchable.php(42): App\Models\Artist->queueMakeSearchable()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php(123): Illuminate\Database\Eloquent\Collection->Laravel\Scout\{closure}()
#8 /var/www/html/vendor/laravel/scout/src/Searchable.php(183): Illuminate\Support\Collection->__call()
#9 /var/www/html/vendor/laravel/scout/src/ModelObserver.php(109): App\Models\Artist->searchable()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(478): Laravel\Scout\ModelObserver->saved()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\Events\Dispatcher->invokeListeners()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(216): Illuminate\Events\Dispatcher->dispatch()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1176): Illuminate\Database\Eloquent\Model->fireModelEvent()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1149): Illuminate\Database\Eloquent\Model->finishSave()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1024): Illuminate\Database\Eloquent\Model->save()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(307): Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1025): tap()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(23): Illuminate\Database\Eloquent\Builder->create()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2334): Illuminate\Database\Eloquent\Model->forwardCallTo()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2346): Illuminate\Database\Eloquent\Model->__call()
#22 /var/www/html/database/migrations/2016_04_16_082627_create_various_artists.php(44): Illuminate\Database\Eloquent\Model::__callStatic()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(493): CreateVariousArtists->up()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(410): Illuminate\Database\Migrations\Migrator->runMethod()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(419): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\Database\Migrations\Migrator->runMigration()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(756): Illuminate\Console\View\Components\Task->render()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\Database\Migrations\Migrator->write()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\Database\Migrations\Migrator->runUp()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\Database\Migrations\Migrator->runPending()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(92): Illuminate\Database\Migrations\Migrator->run()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(104): Illuminate\Database\Migrations\Migrator->usingConnection()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#41 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run()
#43 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run()
#44 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#45 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(163): Symfony\Component\Console\Application->run()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(400): Illuminate\Console\Application->call()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\Foundation\Console\Kernel->call()
#49 /var/www/html/app/Console/Commands/InitCommand.php(273): Illuminate\Support\Facades\Facade::__callStatic()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): App\Console\Commands\InitCommand::App\Console\Commands\{closure}()
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(58): Illuminate\Console\View\Components\Task->render()
#52 /var/www/html/app/Console/Commands/InitCommand.php(274): Illuminate\Console\View\Components\Factory->__call()
#53 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->migrateDatabase()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#60 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run()
#62 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run()
#63 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#64 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#66 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#67 {main}

Expected behavior
Not trying to connect to a nonexistent SQLite engine and use my actually set up SQL server container.

Screenshots
Logs attached, UI is not affected

Environment

  • Koel version Not sure, just the one docker pulled

Your dockerfile controls everything below, hence I won't fill it, should be the default supported ones.

  • OS: [e.g. macOS Mojave]
  • Browser [e.g. Chrome 79]
  • PHP version [e.g. v7.2.0]
  • Node version [e.g. v10.15.3]

Additional context
This is my first installation, not an upgrade, I'm just a new user trying some cool selfhosted streaming :)

Originally created by @NtWriteCode on GitHub (Jul 15, 2024). Original GitHub issue: https://github.com/koel/koel/issues/1792 **Describe the bug** When trying to install from zero, it looks like koel is unable to connect to the database I just configured. **To reproduce** Steps to reproduce the behavior: 1. Copy the compose file from here to the server: https://github.com/koel/docker/blob/master/docker-compose.mysql.yml (I use portainer stacks for the simplicity) 2. Replace passwords with a random generated one, eg.: vtpBpeJkZ5K5Pz3FwAn6 3. Add "container_name" for both containers to avoid stupid default naming. eg.: `container_name: koel` 4. Deploy docker compose 5. `docker exec --user www-data -it koel bash` 6. `php artisan koel:init --no-assets` Output: ``` ************************************ * KOEL INSTALLATION WIZARD * ************************************ As a reminder, you can always install/upgrade manually following the guide at https://docs.koel.dev Clearing caches ......................................................................................................................... 5ms DONE Copying .env file ....................................................................................................................... 0ms DONE Generating app key ...................................................................................................................... 2ms DONE Using app key: base64:5sVbMzP01.. ........................................................................................................... DONE Migrating database .................................................................................................................. 1,295ms FAIL ERROR Oops! Koel installation or upgrade didn't finish successfully. ERROR Please check the error log at storage/logs/laravel.log and try again. ERROR For further troubleshooting, visit https://docs.koel.dev/troubleshooting. ERROR 😥 Sorry for this. You deserve better. ``` Logfile: ``` www-data@91bd7db32436:~/html$ cat storage/logs/laravel.log [2024-07-15 22:02:36] production.ERROR: PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/vendor/teamtnt/tntsearch/src/Engines/SqliteEngine.php:61 Stack trace: #0 /var/www/html/vendor/teamtnt/tntsearch/src/Engines/SqliteEngine.php(61): PDO->__construct() #1 /var/www/html/vendor/teamtnt/tntsearch/src/Indexer/TNTIndexer.php(119): TeamTNT\TNTSearch\Engines\SqliteEngine->createIndex() #2 /var/www/html/vendor/teamtnt/tntsearch/src/TNTSearch.php(75): TeamTNT\TNTSearch\Indexer\TNTIndexer->createIndex() #3 /var/www/html/vendor/teamtnt/laravel-scout-tntsearch-driver/src/Engines/TNTSearchEngine.php(327): TeamTNT\TNTSearch\TNTSearch->createIndex() #4 /var/www/html/vendor/teamtnt/laravel-scout-tntsearch-driver/src/Engines/TNTSearchEngine.php(55): TeamTNT\Scout\Engines\TNTSearchEngine->initIndex() #5 /var/www/html/vendor/laravel/scout/src/Searchable.php(63): TeamTNT\Scout\Engines\TNTSearchEngine->update() #6 /var/www/html/vendor/laravel/scout/src/Searchable.php(42): App\Models\Artist->queueMakeSearchable() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php(123): Illuminate\Database\Eloquent\Collection->Laravel\Scout\{closure}() #8 /var/www/html/vendor/laravel/scout/src/Searchable.php(183): Illuminate\Support\Collection->__call() #9 /var/www/html/vendor/laravel/scout/src/ModelObserver.php(109): App\Models\Artist->searchable() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(478): Laravel\Scout\ModelObserver->saved() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}() #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\Events\Dispatcher->invokeListeners() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(216): Illuminate\Events\Dispatcher->dispatch() #14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1176): Illuminate\Database\Eloquent\Model->fireModelEvent() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1149): Illuminate\Database\Eloquent\Model->finishSave() #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1024): Illuminate\Database\Eloquent\Model->save() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(307): Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1025): tap() #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(23): Illuminate\Database\Eloquent\Builder->create() #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2334): Illuminate\Database\Eloquent\Model->forwardCallTo() #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2346): Illuminate\Database\Eloquent\Model->__call() #22 /var/www/html/database/migrations/2016_04_16_082627_create_various_artists.php(44): Illuminate\Database\Eloquent\Model::__callStatic() #23 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(493): CreateVariousArtists->up() #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(410): Illuminate\Database\Migrations\Migrator->runMethod() #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(419): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}() #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\Database\Migrations\Migrator->runMigration() #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}() #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(756): Illuminate\Console\View\Components\Task->render() #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\Database\Migrations\Migrator->write() #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\Database\Migrations\Migrator->runUp() #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\Database\Migrations\Migrator->runPending() #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(92): Illuminate\Database\Migrations\Migrator->run() #33 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}() #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(104): Illuminate\Database\Migrations\Migrator->usingConnection() #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle() #36 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #37 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure() #38 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #39 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call() #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call() #41 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute() #42 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run() #43 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run() #44 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand() #45 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun() #46 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(163): Symfony\Component\Console\Application->run() #47 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(400): Illuminate\Console\Application->call() #48 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\Foundation\Console\Kernel->call() #49 /var/www/html/app/Console/Commands/InitCommand.php(273): Illuminate\Support\Facades\Facade::__callStatic() #50 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): App\Console\Commands\InitCommand::App\Console\Commands\{closure}() #51 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(58): Illuminate\Console\View\Components\Task->render() #52 /var/www/html/app/Console/Commands/InitCommand.php(274): Illuminate\Console\View\Components\Factory->__call() #53 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->migrateDatabase() #54 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle() #55 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #56 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure() #57 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod() #58 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call() #59 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call() #60 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute() #61 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run() #62 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run() #63 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand() #64 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun() #65 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run() #66 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle() #67 {main} ``` **Expected behavior** Not trying to connect to a nonexistent SQLite engine and use my actually set up SQL server container. **Screenshots** Logs attached, UI is not affected **Environment** - Koel version Not sure, just the one docker pulled Your dockerfile controls everything below, hence I won't fill it, should be the default supported ones. - OS: [e.g. macOS Mojave] - Browser [e.g. Chrome 79] - PHP version [e.g. v7.2.0] - Node version [e.g. v10.15.3] **Additional context** This is my first installation, not an upgrade, I'm just a new user trying some cool selfhosted streaming :)
kerem closed this issue 2026-02-26 02:34:51 +03:00
Author
Owner

@phanan commented on GitHub (Jul 16, 2024):

First, this is not installing from zero — you're doing some customization on Docker version (which by itself isn't ground zero either). Installing from zero would mean to compile everything from source which, trust me, I've done successfully thousands of times ;)

Anyway, the error isn't related to Koel database, but the search index used by TNTSearch, which is an SQLite db. I'm assuming here there's something wrong with your installation and the search_index volume (found in Docker config) isn't writeable. I'd suggest looking into this direction.

<!-- gh-comment-id:2230288059 --> @phanan commented on GitHub (Jul 16, 2024): First, this is not installing from zero — you're doing some customization on Docker version (which by itself isn't ground zero either). Installing from zero would mean to compile everything from source which, trust me, I've done successfully thousands of times ;) Anyway, the error isn't related to Koel database, but the search index used by TNTSearch, which is an SQLite db. I'm assuming here there's something wrong with your installation and the search_index volume (found in Docker config) isn't writeable. I'd suggest looking into this direction.
Author
Owner

@metzger100 commented on GitHub (Jul 21, 2024):

I have the same Issue with the same storage/logs/laravel.log
search_index volume is empty and not writeable for www-data

docker exec -it koel-koel-1 bash
chown -R www-data:www-data /var/www/html/storage/search-indexes
chmod -R 775 /var/www/html/storage/search-indexes

ctrl + d

docker exec --user www-data -it koel-koel-1 bash
php artisan koel:init --no-assets
<!-- gh-comment-id:2241689872 --> @metzger100 commented on GitHub (Jul 21, 2024): I have the same Issue with the same storage/logs/laravel.log search_index volume is empty and not writeable for www-data ```bash docker exec -it koel-koel-1 bash chown -R www-data:www-data /var/www/html/storage/search-indexes chmod -R 775 /var/www/html/storage/search-indexes ``` ctrl + d ```bash docker exec --user www-data -it koel-koel-1 bash php artisan koel:init --no-assets ```
Author
Owner

@NtWriteCode commented on GitHub (Jul 22, 2024):

@ metzger100, I haven't yet had time to figure out my actual issue, but it's somehow related to the fact that I'm not using docker volumes, but rather mounting my paths. Probably this ticket would be more appropriate in the docker's repository, but whatever. I'll still have to find out. After correcting the permissions I still couldn't get things together. My user id owns my music files, so it's a bit harder to make it work perfectly with the permissions in the docker...

<!-- gh-comment-id:2242344083 --> @NtWriteCode commented on GitHub (Jul 22, 2024): @ metzger100, I haven't yet had time to figure out my actual issue, but it's somehow related to the fact that I'm not using docker volumes, but rather mounting my paths. Probably this ticket would be more appropriate in the docker's repository, but whatever. I'll still have to find out. After correcting the permissions I still couldn't get things together. My user id owns my music files, so it's a bit harder to make it work perfectly with the permissions in the docker...
Author
Owner

@phanan commented on GitHub (Jul 22, 2024):

You can always grant www-data the rw permissions to the mounted volume, I’d
assume?

On Mon, Jul 22, 2024 at 10:08 NtWriteCode @.***> wrote:

@ metzger100, I haven't yet had time to figure out my actual issue, but
it's somehow related to the fact that I'm not using docker volumes, but
rather mounting my paths. Probably this ticket would be more appropriate in
the docker's repository, but whatever. I'll still have to find out. After
correcting the permissions I still couldn't get things together. My user id
owns my music files, so it's a bit harder to make it work perfectly with
the permissions in the docker...


Reply to this email directly, view it on GitHub
https://github.com/koel/koel/issues/1792#issuecomment-2242344083, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5O3USBXZ3KT4IW3YWRHOTZNS4XFAVCNFSM6AAAAABK5L5JY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBSGM2DIMBYGM
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:2242416839 --> @phanan commented on GitHub (Jul 22, 2024): You can always grant www-data the rw permissions to the mounted volume, I’d assume? On Mon, Jul 22, 2024 at 10:08 NtWriteCode ***@***.***> wrote: > @ metzger100, I haven't yet had time to figure out my actual issue, but > it's somehow related to the fact that I'm not using docker volumes, but > rather mounting my paths. Probably this ticket would be more appropriate in > the docker's repository, but whatever. I'll still have to find out. After > correcting the permissions I still couldn't get things together. My user id > owns my music files, so it's a bit harder to make it work perfectly with > the permissions in the docker... > > — > Reply to this email directly, view it on GitHub > <https://github.com/koel/koel/issues/1792#issuecomment-2242344083>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AB5O3USBXZ3KT4IW3YWRHOTZNS4XFAVCNFSM6AAAAABK5L5JY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBSGM2DIMBYGM> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@metzger100 commented on GitHub (Jul 22, 2024):

My user id owns my music files, so it's a bit harder to make it work perfectly with the permissions in the docker...

That shouldn't be an Issue. I didn't change the permissions of the music folder and it worked perfectly fine. The music folder is owned by root:users. But I didn't investigate further, probably I configured a read/write ACL for www-data. I decided not use Koel after I noticed that proxy authentication is a "Plus" Feature. Plex works just fine for me so I decided not use Koel.

EDIT: www-data has rw rights via an ACL for the music folder.

<!-- gh-comment-id:2242584946 --> @metzger100 commented on GitHub (Jul 22, 2024): > My user id owns my music files, so it's a bit harder to make it work perfectly with the permissions in the docker... That shouldn't be an Issue. I didn't change the permissions of the music folder and it worked perfectly fine. The music folder is owned by root:users. But I didn't investigate further, probably I configured a read/write ACL for www-data. I decided not use Koel after I noticed that proxy authentication is a "Plus" Feature. Plex works just fine for me so I decided not use Koel. EDIT: www-data has rw rights via an ACL for the music folder.
Author
Owner

@kabatp commented on GitHub (May 26, 2025):

@NtWriteCode please add your docker compose yml file (redact passwords and other sensitive content...), and state your OS. I encountered very similar issues today on my TrueNas Scale installation and successfully fixed them, I may be able to help.

<!-- gh-comment-id:2910575840 --> @kabatp commented on GitHub (May 26, 2025): @NtWriteCode please add your docker compose yml file (redact passwords and other sensitive content...), and state your OS. I encountered very similar issues today on my TrueNas Scale installation and successfully fixed them, I may be able to help.
Author
Owner

@NtWriteCode commented on GitHub (May 26, 2025):

Sadly I don't have this container anymore, so I guess we can close it as not reproducible. I started using Jellyfin's music service. It looks more awkward and lamer than koel, but it worked on first try with the docker container. Maybe once ever later I'll give it a second shot :)

<!-- gh-comment-id:2910618255 --> @NtWriteCode commented on GitHub (May 26, 2025): Sadly I don't have this container anymore, so I guess we can close it as not reproducible. I started using Jellyfin's music service. It looks more awkward and lamer than koel, but it worked on first try with the docker container. Maybe once ever later I'll give it a second shot :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#992
No description provided.