DB Connection don't work #3422

Closed
opened 2026-02-05 06:39:55 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @michaelortnersanube on GitHub (Jan 2, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

It looks to me like there was a problem with the database during an update. I have already tried to log into bookstack_db, but without success, as if the user password was not set. In the console I get the following problem. Update was carried out with Watchtower, the image was updated, everything still worked in the previous year, can anyone help me here?

Waiting for DB to be available
   Illuminate\Database\QueryException 
  SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')
  at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }
      +33 vendor frames 
  34  /app/www/artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Debug:

Error
Illuminate\Database\QueryException
SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from `settings` where `setting_key` = app-public limit 1)
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2936): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2403): Illuminate\Database\Query\Builder->onceWithColumns()
#6 /app/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(625): Illuminate\Database\Query\Builder->get()
#7 /app/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(609): Illuminate\Database\Eloquent\Builder->getModels()
#8 /app/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(294): Illuminate\Database\Eloquent\Builder->get()
#9 /app/www/app/Settings/SettingService.php(257): Illuminate\Database\Eloquent\Builder->first()
#10 /app/www/app/Settings/SettingService.php(100): BookStack\Settings\SettingService->getSettingObjectByKey()
#11 /app/www/app/Settings/SettingService.php(44): BookStack\Settings\SettingService->getValueFromStore()
#12 /app/www/app/helpers.php(97): BookStack\Settings\SettingService->get()
#13 /app/www/app/helpers.php(54): setting()
#14 /app/www/app/Http/Middleware/Authenticate.php(15): hasAppAccess()
#15 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\Authenticate->handle()
#16 /app/www/app/Http/Middleware/Localization.php(45): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\Localization->handle()
#18 /app/www/app/Http/Middleware/RunThemeActions.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\RunThemeActions->handle()
#20 /app/www/app/Http/Middleware/CheckEmailConfirmed.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\CheckEmailConfirmed->handle()
#22 /app/www/app/Http/Middleware/PreventAuthenticatedResponseCaching.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\PreventAuthenticatedResponseCaching->handle()
#24 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#26 /app/www/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#28 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#30 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#31 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#33 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#35 /app/www/app/Http/Middleware/ApplyCspRules.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\ApplyCspRules->handle()
#37 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#39 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#40 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#41 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#42 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#43 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#44 /app/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /app/www/app/Http/Middleware/TrustProxies.php(41): Illuminate\Http\Middleware\TrustProxies->handle()
#46 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\TrustProxies->handle()
#47 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#48 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#49 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#50 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#52 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#54 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#56 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#57 /app/www/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle()
#58 {main}

Exact BookStack Version

v22.11.1

Log Content

No response

PHP Version

8.0.25

Hosting Environment

Ubuntu 20.04, Docker from Linuxserv

Originally created by @michaelortnersanube on GitHub (Jan 2, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario It looks to me like there was a problem with the database during an update. I have already tried to log into bookstack_db, but without success, as if the user password was not set. In the console I get the following problem. Update was carried out with Watchtower, the image was updated, everything still worked in the previous year, can anyone help me here? ``` Waiting for DB to be available Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE') at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712 708▕ // If an exception occurs when attempting to run a query, we'll format the error 709▕ // message to include the bindings with SQL, which will make this exception a 710▕ // lot more helpful to the developer instead of just the database's errors. 711▕ catch (Exception $e) { ➜ 712▕ throw new QueryException( 713▕ $query, $this->prepareBindings($bindings), $e 714▕ ); 715▕ } 716▕ } +33 vendor frames 34 /app/www/artisan:37 Illuminate\Foundation\Console\Kernel::handle() ``` Debug: <details> ``` Error Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from `settings` where `setting_key` = app-public limit 1) #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2936): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2403): Illuminate\Database\Query\Builder->onceWithColumns() #6 /app/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(625): Illuminate\Database\Query\Builder->get() #7 /app/www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(609): Illuminate\Database\Eloquent\Builder->getModels() #8 /app/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(294): Illuminate\Database\Eloquent\Builder->get() #9 /app/www/app/Settings/SettingService.php(257): Illuminate\Database\Eloquent\Builder->first() #10 /app/www/app/Settings/SettingService.php(100): BookStack\Settings\SettingService->getSettingObjectByKey() #11 /app/www/app/Settings/SettingService.php(44): BookStack\Settings\SettingService->getValueFromStore() #12 /app/www/app/helpers.php(97): BookStack\Settings\SettingService->get() #13 /app/www/app/helpers.php(54): setting() #14 /app/www/app/Http/Middleware/Authenticate.php(15): hasAppAccess() #15 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\Authenticate->handle() #16 /app/www/app/Http/Middleware/Localization.php(45): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #17 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\Localization->handle() #18 /app/www/app/Http/Middleware/RunThemeActions.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #19 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\RunThemeActions->handle() #20 /app/www/app/Http/Middleware/CheckEmailConfirmed.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #21 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\CheckEmailConfirmed->handle() #22 /app/www/app/Http/Middleware/PreventAuthenticatedResponseCaching.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #23 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\PreventAuthenticatedResponseCaching->handle() #24 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #25 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #26 /app/www/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #27 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #28 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #29 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest() #30 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle() #31 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #32 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #33 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #34 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle() #35 /app/www/app/Http/Middleware/ApplyCspRules.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #36 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\ApplyCspRules->handle() #37 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #38 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then() #39 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack() #40 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute() #41 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute() #42 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch() #43 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #44 /app/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #45 /app/www/app/Http/Middleware/TrustProxies.php(41): Illuminate\Http\Middleware\TrustProxies->handle() #46 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): BookStack\Http\Middleware\TrustProxies->handle() #47 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #48 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #49 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle() #50 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #51 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() #52 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #53 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #54 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #55 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then() #56 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #57 /app/www/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle() #58 {main} ``` </details> ### Exact BookStack Version v22.11.1 ### Log Content _No response_ ### PHP Version 8.0.25 ### Hosting Environment Ubuntu 20.04, Docker from Linuxserv
OVERLORD added the 🐕 Support label 2026-02-05 06:39:55 +03:00
Author
Owner

@michaelortnersanube commented on GitHub (Jan 2, 2023):

I can ping btw the DB Docker Container:
image

@michaelortnersanube commented on GitHub (Jan 2, 2023): I can ping btw the DB Docker Container: ![image](https://user-images.githubusercontent.com/96595501/210207429-0496d381-3269-4895-98cc-e7a9c2f73531.png)
Author
Owner

@ssddanbrown commented on GitHub (Jan 3, 2023):

Hi @michaelortnersanube,
Based upon the error, the database connection is being made okay but it's just the credentials/access failing.
Did recently have something similar from another linuxserver.io image user, I know they added some password handling changes recently, could be related.
Does your BookStack user database password contain special characters at all? If so, would be good to know what those are so I can try to see if their changes would have had an affect.

@ssddanbrown commented on GitHub (Jan 3, 2023): Hi @michaelortnersanube, Based upon the error, the database connection is being made okay but it's just the credentials/access failing. Did recently have something similar from another linuxserver.io image user, I know they added some password handling changes recently, could be related. Does your BookStack user database password contain special characters at all? If so, would be good to know what those are so I can try to see if their changes would have had an affect.
Author
Owner

@ssddanbrown commented on GitHub (Jan 3, 2023):

Also, what database container are you using and was the database container updated at the same time?

@ssddanbrown commented on GitHub (Jan 3, 2023): Also, what database container are you using and was the database container updated at the same time?
Author
Owner

@lunatik98 commented on GitHub (Jan 5, 2023):

I have the same issue with the latest version. My password contains a "="

@lunatik98 commented on GitHub (Jan 5, 2023): I have the same issue with the latest version. My password contains a "="
Author
Owner

@jhigginson commented on GitHub (Jan 5, 2023):

Same issue here. Password contains special chars.

@jhigginson commented on GitHub (Jan 5, 2023): Same issue here. Password contains special chars.
Author
Owner

@ssddanbrown commented on GitHub (Jan 5, 2023):

You can try passing DB_PASSWORD instead of DB_PASS on the bookstack linuxserver container to workaround any linuxserver database password handling logic.

There is an active discussion in the linuxserver project, it would help to share the special characters used within that thread.
https://github.com/linuxserver/docker-bookstack/issues/153

Note: If using DB_PASSWORD works for you, Please don't go to that linuxserver thread and state that their documentation is incorrect or anything like that, the situation is a little more nuanced than that and I have seen some fairly rude/ignorant comments to their maintainers who are doing their best and spending their own time to help.
If you're not sure what to write:

  • Just state they you've had this problem
  • Provide the exact container image version in use
  • State what special characters your password value contained.
  • If applicable, confirm if you're now using the DB_PASSWORD method to work around this (To confirm you've found a workaround so a remedy is not urgent).
@ssddanbrown commented on GitHub (Jan 5, 2023): You can try passing `DB_PASSWORD` instead of `DB_PASS` on the bookstack linuxserver container to workaround any linuxserver database password handling logic. There is an active discussion in the linuxserver project, it would help to share the special characters used within that thread. https://github.com/linuxserver/docker-bookstack/issues/153 **Note:** If using `DB_PASSWORD` works for you, Please don't go to that linuxserver thread and state that their documentation is incorrect or anything like that, the situation is a little more nuanced than that and I have seen some fairly rude/ignorant comments to their maintainers who are doing their best and spending their own time to help. If you're not sure what to write: - Just state they you've had this problem - Provide the exact container image version in use - State what special characters your password value contained. - If applicable, confirm if you're now using the `DB_PASSWORD` method to work around this (To confirm you've found a workaround so a remedy is not urgent).
Author
Owner

@ssddanbrown commented on GitHub (Jan 6, 2023):

The linuxserver team just deployed a new image to specifically fix some password escaping issues.
Worth attempting a pull down of the latest image and give that a test.

@ssddanbrown commented on GitHub (Jan 6, 2023): The linuxserver team just deployed a new image to specifically fix some password escaping issues. Worth attempting a pull down of the latest image and give that a test.
Author
Owner

@jhigginson commented on GitHub (Jan 7, 2023):

Even using DB_PASSWORD instead of DB_PASS and DB_USERNAME instead of DB_USER and using the latest image from linuxserver I still had the problem. What did work for me was logging into my mariadb container as root, changing the password manually for the bookstack user and then updating my env to reflect the new change and restarting the containers. I'm not sure what the issue was, but wonder if it's because my root and user passwords were the same.

@jhigginson commented on GitHub (Jan 7, 2023): Even using DB_PASSWORD instead of DB_PASS and DB_USERNAME instead of DB_USER and using the latest image from linuxserver I still had the problem. What did work for me was logging into my mariadb container as root, changing the password manually for the bookstack user and then updating my env to reflect the new change and restarting the containers. I'm not sure what the issue was, but wonder if it's because my root and user passwords were the same.
Author
Owner

@lunatik98 commented on GitHub (Jan 17, 2023):

I tried the latest version version but it still doesnt work. I also used the same password for root and user so maybe thats the problem?

@lunatik98 commented on GitHub (Jan 17, 2023): I tried the latest version version but it still doesnt work. I also used the same password for root and user so maybe thats the problem?
Author
Owner

@michaelortnersanube commented on GitHub (Jan 17, 2023):

Same here. I have replied to the issue from linuxserv. The issue is still there. I use the build version "Linuxserver.io version:- 10.6.10-r0-ls77 Build-date:- 2022-12-17T06:47:15+01:00"

With this bookstack work. If i repull the image the same issue come again. I have tried it with following env:

DB_USER
DB_PASS

and DB_USERNAME
DB_PASSWORD

@michaelortnersanube commented on GitHub (Jan 17, 2023): Same here. I have replied to the issue from linuxserv. The issue is still there. I use the build version "Linuxserver.io version:- 10.6.10-r0-ls77 Build-date:- 2022-12-17T06:47:15+01:00" With this bookstack work. If i repull the image the same issue come again. I have tried it with following env: DB_USER DB_PASS and DB_USERNAME DB_PASSWORD
Author
Owner

@michaelortnersanube commented on GitHub (Jan 31, 2023):

@ssddanbrown any idea of this problem? I have set up a clone of my vm. Same Problem if i repull all images:

image image
@michaelortnersanube commented on GitHub (Jan 31, 2023): @ssddanbrown any idea of this problem? I have set up a clone of my vm. Same Problem if i repull all images: <img width="537" alt="image" src="https://user-images.githubusercontent.com/96595501/215784981-d84f7aa3-34e3-4ca2-b718-9fb4a33376ce.png"> <img width="769" alt="image" src="https://user-images.githubusercontent.com/96595501/215785084-027ca2e2-c076-4f18-8f12-89b5e360e504.png">
Author
Owner

@ssddanbrown commented on GitHub (Jan 31, 2023):

@michaelortnersanube No, I'd need a complete compose example to debug further really, as it can come down to specific (Primarily password) values. I suspect that there have been escaping issues that the lsio team have fixed, but the old mis-escaped values were in active use beforehand so now don't match after a fix is applied. Just a guess though, not seeing anything to suggest this is an issue in bookstack itself though.

@ssddanbrown commented on GitHub (Jan 31, 2023): @michaelortnersanube No, I'd need a complete compose example to debug further really, as it can come down to specific (Primarily password) values. I suspect that there have been escaping issues that the lsio team have fixed, but the old mis-escaped values were in active use beforehand so now don't match after a fix is applied. Just a guess though, not seeing anything to suggest this is an issue in bookstack itself though.
Author
Owner

@michaelortnersanube commented on GitHub (Jan 31, 2023):

`---
version: "2"
services:
bookstack:
hostname: bookstack
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
ports:
- 10.1.1.96:8921:80
environment:
- APP_DEBUG=true
- PUID=1000
- PGID=1000
- APP_URL=https://wiki.mydomain.com
- DB_HOST=bookstack_db
- DB_USERNAME=bookstack
- DB_PASSWORD=password
- DB_PORT=3306
- DB_DATABASE=bookstackapp
# Gerneral auth
- AUTH_METHOD=ldap
# LDAP Settings
- LDAP_SERVER=10.1.1.25:389
- LDAP_BASE_DN=OU=user,OU=OUROU,DC=DOMAIN,DC=local
- LDAP_DN=CN=user,CN=Users,DC=DOMAIN,DC=local
- LDAP_PASS=password
#use double $$ since we are using docker
- LDAP_USER_FILTER=(&(sAMAccountName=$${user}))
- LDAP_VERSION=3
# Set the property to use as a unique identifier for this user.
# Stored and used to match LDAP users with existing BookStack users.
# Prefixing the value with 'BIN;' will assume the LDAP service provides the attribute value as
# binary data and BookStack will convert the value to a hexidecimal representation.
# Defaults to 'uid'.
- LDAP_ID_ATTRIBUTE=uid
# Set the property to use for a user's display name. Defaults to 'cn'
- LDAP_DISPLAY_NAME_ATTRIBUTE=cn
# LDAP Group Sync
- LDAP_USER_TO_GROUPS=true
# LDAP user attribute containing groups, Defaults to 'memberOf'.
- LDAP_GROUP_ATTRIBUTE="memberOf"
# Set the default 'email' attribute. Defaults to 'mail'
- LDAP_EMAIL_ATTRIBUTE=mail
- LDAP_ID_ATTRIBUTE=BIN;objectGUID
# Change the below to true if your AD server supports TLS and if your
# BookStack host system will accept the AD provided certificate.
- LDAP_START_TLS=false
- LDAP_THUMBNAIL_ATTRIBUTE=thumbnailPhoto
# Standard Sprache für neue Benutzer
- APP_LANG=de
# Productionsbetrieb
- APP_ENV=production
# Timezone
- APP_TIMEZONE=Europe/Vienna
# Mülleimer zum löschen alle 30 Tage
- RECYCLE_BIN_LIFETIME=30
volumes:
- ./bookstack_data:/config

restart: unless-stopped
depends_on:
  - bookstack_db

bookstack_db:
image: lscr.io/linuxserver/mariadb:latest
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Vienna
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=password

volumes:
  - ./bookstack_db:/config

restart: unless-stopped

`

Here is the compose file @ssddanbrown If you want, i can share you the password via direct message. I don't want to share it here, i hope you understand this. If you need more please say it :)

@michaelortnersanube commented on GitHub (Jan 31, 2023): `--- version: "2" services: bookstack: hostname: bookstack image: lscr.io/linuxserver/bookstack:latest container_name: bookstack ports: - 10.1.1.96:8921:80 environment: - APP_DEBUG=true - PUID=1000 - PGID=1000 - APP_URL=https://wiki.mydomain.com - DB_HOST=bookstack_db - DB_USERNAME=bookstack - DB_PASSWORD=password - DB_PORT=3306 - DB_DATABASE=bookstackapp # Gerneral auth - AUTH_METHOD=ldap # LDAP Settings - LDAP_SERVER=10.1.1.25:389 - LDAP_BASE_DN=OU=user,OU=OUROU,DC=DOMAIN,DC=local - LDAP_DN=CN=user,CN=Users,DC=DOMAIN,DC=local - LDAP_PASS=password #use double $$ since we are using docker - LDAP_USER_FILTER=(&(sAMAccountName=$${user})) - LDAP_VERSION=3 # Set the property to use as a unique identifier for this user. # Stored and used to match LDAP users with existing BookStack users. # Prefixing the value with 'BIN;' will assume the LDAP service provides the attribute value as # binary data and BookStack will convert the value to a hexidecimal representation. # Defaults to 'uid'. - LDAP_ID_ATTRIBUTE=uid # Set the property to use for a user's display name. Defaults to 'cn' - LDAP_DISPLAY_NAME_ATTRIBUTE=cn # LDAP Group Sync - LDAP_USER_TO_GROUPS=true # LDAP user attribute containing groups, Defaults to 'memberOf'. - LDAP_GROUP_ATTRIBUTE="memberOf" # Set the default 'email' attribute. Defaults to 'mail' - LDAP_EMAIL_ATTRIBUTE=mail - LDAP_ID_ATTRIBUTE=BIN;objectGUID # Change the below to true if your AD server supports TLS and if your # BookStack host system will accept the AD provided certificate. - LDAP_START_TLS=false - LDAP_THUMBNAIL_ATTRIBUTE=thumbnailPhoto # Standard Sprache für neue Benutzer - APP_LANG=de # Productionsbetrieb - APP_ENV=production # Timezone - APP_TIMEZONE=Europe/Vienna # Mülleimer zum löschen alle 30 Tage - RECYCLE_BIN_LIFETIME=30 volumes: - ./bookstack_data:/config restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb:latest container_name: bookstack_db environment: - PUID=1000 - PGID=1000 - TZ=Europe/Vienna - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=password volumes: - ./bookstack_db:/config restart: unless-stopped ` Here is the compose file @ssddanbrown If you want, i can share you the password via direct message. I don't want to share it here, i hope you understand this. If you need more please say it :)
Author
Owner

@lunatik98 commented on GitHub (Feb 1, 2023):

I manually changed the bookstack user password on the database. The new version is working now.

Here is a guide how I did it:

sudo docker exec -it bookstack_db bash
mariadb -u root -p
use mysql;
ALTER USER 'bookstack'@'%' IDENTIFIED BY 'NEW_PASSWORD';
FLUSH PRIVILEGES;

Change the DB_PASS to the new password in your .env or docker-compose file.

@lunatik98 commented on GitHub (Feb 1, 2023): I manually changed the bookstack user password on the database. The new version is working now. Here is a guide how I did it: sudo docker exec -it bookstack_db bash mariadb -u root -p use mysql; ALTER USER 'bookstack'@'%' IDENTIFIED BY 'NEW_PASSWORD'; FLUSH PRIVILEGES; Change the DB_PASS to the new password in your .env or docker-compose file.
Author
Owner

@ssddanbrown commented on GitHub (Mar 6, 2023):

I'll go ahead and close this off since there's been nothing on the BookStack side that needs to be actioned/addressed as far as I'm aware.

@ssddanbrown commented on GitHub (Mar 6, 2023): I'll go ahead and close this off since there's been nothing on the BookStack side that needs to be actioned/addressed as far as I'm aware.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3422