[Support] Linuxserver.io - Bookstack


Recommended Posts

8 minutes ago, Abe677 said:

I’m new to Unraid, docker and many things here. I need some education or a pointer to some education. I’m going to use my desire to run BookStack as an example.

 

Easy enough to find BookStack via Community Applications. When I click to install I’m faced with having to provide some information. Since I don’t have much experience I’m looking for some pointers on where to go to figure out what all those container settings should be?

 

I watched a youtube video on someone installing BookStack via Portainer. In that video it appears the installation creates the BookStack app and the database to support it. However when I click to install on my Unraid server there’s a very clear “A database server is needed.” This leads to a series of rookie questions:

 

1.    What database should I install? (I assume I need to install it first.)

2.    Does the BookStack app take care of doing all the database work or is there some database configuration that’s required before BookStack is installed?

 

I run into this information void with every docker I install. Sometimes I can find a good walk-thru document or video that helps, but so far I haven’t run into anything too helpful for BookStack on Unraid. Just looking for some pointers to how people track these answers down?

Take a look at spaceinvader one’s YouTube channel. He’s the only reason my server is as successful as it is. 
 

Edit: to answer a little more specifically, I am using Mariadb for the database. There’s a docker for it in CA. You create the database and user manually, before installing Bookstack. 
 

Edit 2: here is a walkthrough tutorial. It’s up to you if you want to put yours behind a reverse proxy or not. 
 

https://technicalramblings.com/blog/how-to-install-bookstack-and-reverse-proxy-it-using-linuxserver-letsencrypt-on-unraid/#:~:text=Installing Bookstack,let the container start up.

 

Edited by Richamc01
Further detail
Link to comment

I'm using linuxserver/mariadb as database. If you want to manage your db you can use for example phpmyadmin/phpmyadmin. I don't remember exactly how I set everything up, but I think I used phpmyadmin to create a db user called "bookstack", then entered that info under "Database user" and "Database password" for the bookstack container.

Link to comment
  • 2 weeks later...

Not sure why but I can't get this to work.. Keep getting an error

 

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

 

But why it's looking at 172.17.0.1 isn't clear to me. 

 

Here's my tempalte config.

 

image.thumb.png.1702ee8644746e5cc9afa361885e9a04.png

Link to comment
19 hours ago, CorneliousJD said:

Not sure why but I can't get this to work.. Keep getting an error

 


Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

 

But why it's looking at 172.17.0.1 isn't clear to me. 

 

Here's my tempalte config.

 

image.thumb.png.1702ee8644746e5cc9afa361885e9a04.png

It's probably the the IP of the container. Look in the container list and check the port mapping part to see which container has that IP. My guess is bookstack.

I think you didn't give the bookstack user the right to connect from everywhere.

Link to comment
2 hours ago, saarg said:

It's probably the the IP of the container. Look in the container list and check the port mapping part to see which container has that IP. My guess is bookstack.

I think you didn't give the bookstack user the right to connect from everywhere.

It's actually the template that's bad unfortuantely. As others have stated here on the last page, I had to make some changes, hilighted below for visibllity. 

 

Looks like the template needs to be updated. After I changed DB_USER to DB_USERNAME and DB_PASS to DB_PASSWORD and added the :3306 port for my database IP, everything is working now.

 

As a side note, I also had to add https:// to my reverse proxy site, may be worth noting in the description of that variable that it needs http:// or https:// as well, otherwise layouts break.

 

image.thumb.png.2e21c3f93e57af7748d4e60beb2dbd5d.png

Link to comment
2 hours ago, CorneliousJD said:

It's actually the template that's bad unfortuantely. As others have stated here on the last page, I had to make some changes, hilighted below for visibllity. 

 

Looks like the template needs to be updated. After I changed DB_USER to DB_USERNAME and DB_PASS to DB_PASSWORD and added the :3306 port for my database IP, everything is working now.

 

As a side note, I also had to add https:// to my reverse proxy site, may be worth noting in the description of that variable that it needs http:// or https:// as well, otherwise layouts break.

 

image.thumb.png.2e21c3f93e57af7748d4e60beb2dbd5d.png

I have tested the template and there is nothing wrong with it. Our env. variables for setting the username and password is in the template and they work.

 

 

Link to comment
On 1/27/2021 at 5:58 PM, saarg said:

I have tested the template and there is nothing wrong with it. Our env. variables for setting the username and password is in the template and they work.

 

 

 

That's odd, the template downloaded with DB_USER and DB_PASS and I had to change those to DB_USERNAME and DB_PASSWORD for it to work. Others on previous pages have said the same thing?

Link to comment
On 1/27/2021 at 5:58 PM, saarg said:

I have tested the template and there is nothing wrong with it. Our env. variables for setting the username and password is in the template and they work.

 

 

I just re-tested again.

 

DB_USER and DB_PASS do *not* allow the container to work.

This is what the template asks for, container variables DB_USER and DB_PASS.

 

Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')

at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error

666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31


2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27

 

Changing it tp DB_USERNAME and DB_PASSWORD do allow everything to run normally. 

 

Nothing to migrate.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

The template that CA is pulling down when users add this container is definately not correct.

Edited by CorneliousJD
Link to comment
12 hours ago, CorneliousJD said:

I just re-tested again.

 

DB_USER and DB_PASS do *not* allow the container to work.

This is what the template asks for, container variables DB_USER and DB_PASS.

 


Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')

at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error

666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31


2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27

 

Changing it tp DB_USERNAME and DB_PASSWORD do allow everything to run normally. 

 


Nothing to migrate.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

The template that CA is pulling down when users add this container is definately not correct.

 

I just set it up again here without issues using the supplied values in the template, so it does work.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='bookstack' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.1.10' -e 'DB_USER'='bookstack' -e 'DB_PASS'='bookstack' -e 'DB_DATABASE'='bookstackapp' -e 'APP_URL'='' -e 'PUID'='99' -e 'PGID'='100' -p '8085:80/tcp' -v '/mnt/cache/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack' 

 

 

The log from the first start:

 

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
................................................+++++
.....................................+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
Generating BookStack app key for first run
App Key set to base64:ivGngCY5TX1pHs+pCMXGDv+n87PLDYxwflTMYerLMi8= you can modify the file to update /config/BOOKSTACK_APP_KEY.txt
Running config - db_user set
**** Docker env var APP_URL is not set, setting it to http://oh no:6875 ****
**** APP_URL in /config/www/.env is being updated from https://example.com to http://oh no:6875 ****
**** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: ****
************************************************************************
docker exec -it bookstack php /var/www/html/artisan bookstack:update-url https://example.com http://oh no:6875
************************************************************************
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.3 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.3 seconds)
Migrating: 2015_07_12_114933_create_books_table
Migrated: 2015_07_12_114933_create_books_table (0.16 seconds)
Migrating: 2015_07_12_190027_create_pages_table
Migrated: 2015_07_12_190027_create_pages_table (0.07 seconds)
Migrating: 2015_07_13_172121_create_images_table
Migrated: 2015_07_13_172121_create_images_table (0.06 seconds)
Migrating: 2015_07_27_172342_create_chapters_table
Migrated: 2015_07_27_172342_create_chapters_table (0.07 seconds)
Migrating: 2015_08_08_200447_add_users_to_entities
Migrated: 2015_08_08_200447_add_users_to_entities (0.13 seconds)
Migrating: 2015_08_09_093534_create_page_revisions_table
Migrated: 2015_08_09_093534_create_page_revisions_table (0.06 seconds)
Migrating: 2015_08_16_142133_create_activities_table
Migrated: 2015_08_16_142133_create_activities_table (0.08 seconds)
Migrating: 2015_08_29_105422_add_roles_and_permissions
Migrated: 2015_08_29_105422_add_roles_and_permissions (2.98 seconds)
Migrating: 2015_08_30_125859_create_settings_table
Migrated: 2015_08_30_125859_create_settings_table (0.22 seconds)
Migrating: 2015_08_31_175240_add_search_indexes
Migrated: 2015_08_31_175240_add_search_indexes (0 seconds)
Migrating: 2015_09_04_165821_create_social_accounts_table
Migrated: 2015_09_04_165821_create_social_accounts_table (0.25 seconds)
Migrating: 2015_09_05_164707_add_email_confirmation_table
Migrated: 2015_09_05_164707_add_email_confirmation_table (0.28 seconds)
Migrating: 2015_11_21_145609_create_views_table
Migrated: 2015_11_21_145609_create_views_table (0.07 seconds)
Migrating: 2015_11_26_221857_add_entity_indexes
Migrated: 2015_11_26_221857_add_entity_indexes (1.56 seconds)
Migrating: 2015_12_05_145049_fulltext_weighting
Migrated: 2015_12_05_145049_fulltext_weighting (0 seconds)
Migrating: 2015_12_07_195238_add_image_upload_types
Migrated: 2015_12_07_195238_add_image_upload_types (0.17 seconds)
Migrating: 2015_12_09_195748_add_user_avatars
Migrated: 2015_12_09_195748_add_user_avatars (0.02 seconds)
Migrating: 2016_01_11_210908_add_external_auth_to_users
Migrated: 2016_01_11_210908_add_external_auth_to_users (0.17 seconds)
Migrating: 2016_02_25_184030_add_slug_to_revisions
Migrated: 2016_02_25_184030_add_slug_to_revisions (0.25 seconds)
Migrating: 2016_02_27_120329_update_permissions_and_roles
Migrated: 2016_02_27_120329_update_permissions_and_roles (1.41 seconds)
Migrating: 2016_02_28_084200_add_entity_access_controls
Migrated: 2016_02_28_084200_add_entity_access_controls (0.69 seconds)
Migrating: 2016_03_09_203143_add_page_revision_types
Migrated: 2016_03_09_203143_add_page_revision_types (0.1 seconds)
Migrating: 2016_03_13_082138_add_page_drafts
Migrated: 2016_03_13_082138_add_page_drafts (0.1 seconds)
Migrating: 2016_03_25_123157_add_markdown_support
Migrated: 2016_03_25_123157_add_markdown_support (0.05 seconds)
Migrating: 2016_04_09_100730_add_view_permissions_to_roles
Migrated: 2016_04_09_100730_add_view_permissions_to_roles (0.47 seconds)
Migrating: 2016_04_20_192649_create_joint_permissions_table
Migrated: 2016_04_20_192649_create_joint_permissions_table (1.11 seconds)
Migrating: 2016_05_06_185215_create_tags_table
Migrated: 2016_05_06_185215_create_tags_table (0.35 seconds)
Migrating: 2016_07_07_181521_add_summary_to_page_revisions
Migrated: 2016_07_07_181521_add_summary_to_page_revisions (0.02 seconds)
Migrating: 2016_09_29_101449_remove_hidden_roles
Migrated: 2016_09_29_101449_remove_hidden_roles (0.22 seconds)
Migrating: 2016_10_09_142037_create_attachments_table
Migrated: 2016_10_09_142037_create_attachments_table (0.47 seconds)
Migrating: 2017_01_21_163556_create_cache_table
Migrated: 2017_01_21_163556_create_cache_table (0.3 seconds)
Migrating: 2017_01_21_163602_create_sessions_table
Migrated: 2017_01_21_163602_create_sessions_table (0.22 seconds)
Migrating: 2017_03_19_091553_create_search_index_table
Migrated: 2017_03_19_091553_create_search_index_table (0.39 seconds)
Migrating: 2017_04_20_185112_add_revision_counts
Migrated: 2017_04_20_185112_add_revision_counts (0.11 seconds)
Migrating: 2017_07_02_152834_update_db_encoding_to_ut8mb4
Migrated: 2017_07_02_152834_update_db_encoding_to_ut8mb4 (0 seconds)
Migrating: 2017_08_01_130541_create_comments_table
Migrated: 2017_08_01_130541_create_comments_table (0.52 seconds)
Migrating: 2017_08_29_102650_add_cover_image_display
Migrated: 2017_08_29_102650_add_cover_image_display (0.03 seconds)
Migrating: 2018_07_15_173514_add_role_external_auth_id
Migrated: 2018_07_15_173514_add_role_external_auth_id (0.16 seconds)
Migrating: 2018_08_04_115700_create_bookshelves_table
Migrated: 2018_08_04_115700_create_bookshelves_table (2.7 seconds)
Migrating: 2019_07_07_112515_add_template_support
Migrated: 2019_07_07_112515_add_template_support (0.13 seconds)
Migrating: 2019_08_17_140214_add_user_invites_table
Migrated: 2019_08_17_140214_add_user_invites_table (0.2 seconds)
Migrating: 2019_12_29_120917_add_api_auth
Migrated: 2019_12_29_120917_add_api_auth (0.3 seconds)
Migrating: 2020_08_04_111754_drop_joint_permissions_id
Migrated: 2020_08_04_111754_drop_joint_permissions_id (0.43 seconds)
Migrating: 2020_08_04_131052_remove_role_name_field
Migrated: 2020_08_04_131052_remove_role_name_field (0.05 seconds)
Migrating: 2020_09_19_094251_add_activity_indexes
Migrated: 2020_09_19_094251_add_activity_indexes (0.18 seconds)
Migrating: 2020_09_27_210059_add_entity_soft_deletes
Migrated: 2020_09_27_210059_add_entity_soft_deletes (0.18 seconds)
Migrating: 2020_09_27_210528_create_deletions_table
Migrated: 2020_09_27_210528_create_deletions_table (0.31 seconds)
Migrating: 2020_11_07_232321_simplify_activities_table
Migrated: 2020_11_07_232321_simplify_activities_table (0.39 seconds)
Migrating: 2020_12_30_173528_add_owned_by_field_to_entities
Migrated: 2020_12_30_173528_add_owned_by_field_to_entities (0.58 seconds)
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

Link to comment
12 hours ago, CorneliousJD said:

 

That's odd, the template downloaded with DB_USER and DB_PASS and I had to change those to DB_USERNAME and DB_PASSWORD for it to work. Others on previous pages have said the same thing?

 

Check the code for yourself here

Link to comment
10 hours ago, saarg said:

 

I just set it up again here without issues using the supplied values in the template, so it does work.

 



root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='bookstack' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.1.10' -e 'DB_USER'='bookstack' -e 'DB_PASS'='bookstack' -e 'DB_DATABASE'='bookstackapp' -e 'APP_URL'='' -e 'PUID'='99' -e 'PGID'='100' -p '8085:80/tcp' -v '/mnt/cache/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack' 

 

 

 

 

Not trying to argue or anything FYI - I just want to understand why it doesn't work for me (and for clearly the others that hvae posted the same results).

 

If I replicate your setup, here's my docker run command I get.

I took out :port and set it back to DB_USER and DB_PASS just as you have yours.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='BookStack' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'DB_HOST'='10.0.0.10' -e 'DB_USER'='bookstack' -e 'DB_PASS'='xxxxxxxxxx' -e 'DB_DATABASE'='bookstack' -e 'APP_URL'='https://abc.domain.com' -e 'PUID'='99' -e 'PGID'='100' -p '8719:80/tcp' -v '/mnt/user/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack'

 

This all looks like it macthes yours with some obvious changes, my db name is just "bookstack" and my password and app URL are different, as well as TZ, all to be expected, everthing else checks out and is the same.

 

But when I trun it I just get errors. I'm trying to wrap my head around why this is? 

Why does the error in the exception trace show it's trying to connect to "bookstack@172.17.0.1"??? 

 

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
App Key found - setting variable for seds
Running config - db_user set
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input

/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input


Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')

at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error

666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31


2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27


Please use the argument -v to see more details.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

Edited by CorneliousJD
Link to comment

As a separate aside, if I remove the :3306 then I get a few warnings in the log,

App Key found - setting variable for seds
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input
Nothing to migrate.

 

with it, I get a bunch of lines of "Name does not resolve" but no warning/error.

 

App Key found - setting variable for seds
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
Nothing to migrate.

 

 

Don't think this is related to the other problem but figured I'd check about what this means as well.

Link to comment
1 hour ago, CorneliousJD said:

 

Not trying to argue or anything FYI - I just want to understand why it doesn't work for me (and for clearly the others that hvae posted the same results).

 

If I replicate your setup, here's my docker run command I get.

I took out :port and set it back to DB_USER and DB_PASS just as you have yours.

 



root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='BookStack' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'DB_HOST'='10.0.0.10' -e 'DB_USER'='bookstack' -e 'DB_PASS'='xxxxxxxxxx' -e 'DB_DATABASE'='bookstack' -e 'APP_URL'='https://abc.domain.com' -e 'PUID'='99' -e 'PGID'='100' -p '8719:80/tcp' -v '/mnt/user/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack'

 

This all looks like it macthes yours with some obvious changes, my db name is just "bookstack" and my password and app URL are different, as well as TZ, all to be expected, everthing else checks out and is the same.

 

But when I trun it I just get errors. I'm trying to wrap my head around why this is? 

Why does the error in the exception trace show it's trying to connect to "bookstack@172.17.0.1"??? 

 



[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
App Key found - setting variable for seds
Running config - db_user set
/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input

/var/run/s6/etc/cont-init.d/50-config: line 86: warning: command substitution: ignored null byte in input


Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')

at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error

666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")

/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31


2 PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'172.17.0.1' (using password: YES)")
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27


Please use the argument -v to see more details.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

What is the content of your /config/www/.env

Are you setting this up with a new appdata folder or existing?

Edited by saarg
Link to comment
1 hour ago, CorneliousJD said:

Access denied for user 'bookstack'@'172.17.0.1'

 

This doesn't mean it's connecting to that IP. It means that the user bookstack, connecting from 172.17.0.1 is denied access to the database. Have you allowed the bookstack user in mariadb to connect from @?

Link to comment
46 minutes ago, saarg said:

What is the content of your /config/www/.env

Are you setting this up with a new appdata folder or existing?

 

38 minutes ago, saarg said:

 

This doesn't mean it's connecting to that IP. It means that the user bookstack, connecting from 172.17.0.1 is denied access to the database. Have you allowed the bookstack user in mariadb to connect from @?

 

yep, all good on that front.

 

I think the issue was my .env file that you pointed out, becuase I was using existing appdata folder, so I blew that away and setup brand new and it works. Interesting.

 

Comparing my old .env to new .env it looks ilke the old one had DB_PASSWORD set multiple times? Here's the line - I didn't end up using any of these passwords in the long run.

DB_PASSWORD=B2Dk!hDB_PASSWORD=B2Dk!hDB_PASSWORD=S!ka^43cFd3g$x71Vo68!u$ffVo68$u!ff

My new .env file just has the actual password listed once and that's it. 

 

I potentially tried to use a password with a special character in it during my initial setup, perhaps that caused the issue, and re-setting up from scratch without the specail character allowed it to work fine and write the proper .env file.

 

If so, then it might be worth updating the template to indicate to special charactesr allowed, or which ones would cause an issue?

Also the app URL must start with http:// or https://, I found leaving it blank while having it reverse proxy via https:// caused the whole stylesheet to be broken. 

 

Thank you for the help in understanding where things were going wrong, much appreciated! All up and working now with DB_USER and DB_PASS with a new .env file that actually works.

Edited by CorneliousJD
Link to comment
  • 1 month later...

Hi all,

 

I`m relatively new to docker so please excuse my ignorance. 

 

I am trying to run Bookstack with the Database being stored on my QNAP NAS, I thought this would be fairly easy but its proving difficult. I am deploying from the CLI with the below command:

sudo docker run -d   --name=bookstack   -e PUID=1000   -e PGID=1000   -e APP_URL=http://192.168.0.23:6875   -e DB_HOST=192.168.0.2   -e DB_USERNAME=root -e DB_PASSWORD=admin   -e DB_DATABASE=bookstack-db   -p 6875:80   -v /docker/appdata/bookstack:/config   --restart unless-stopped   ghcr.io/linuxserver/bookstack

 

I have also tried having the DB port on the end of the DB_HOST variable as well as having it in a separate DB_PORT variable and both give me the same results. The user is the default db user and has full access to the db. Other things I have tried are deleting the project folder so it gets recreated, using different users but, I seem to have the same results in that it deploys ok and is running, on initial deployment it also creates all the tables in the database. I can browse to the URL and I get a login screen, I login with the defaults and I just get a blank screen. Reading the troubleshooting tips it suggests this is usually down to permissions on the uplad and cache folders, I have changed them to everyone having permission and still have the same behavior. I read somewhere I might need to deploy with no db setting and have all in an environment file but, I cant find any environment file or where it should go.

 

Can anyone offer any help or advice as I have been looking at this for nearly a week now

 

Thanks

Link to comment
2 hours ago, bugs78 said:

Hi all,

 

I`m relatively new to docker so please excuse my ignorance. 

 

I am trying to run Bookstack with the Database being stored on my QNAP NAS, I thought this would be fairly easy but its proving difficult. I am deploying from the CLI with the below command:


sudo docker run -d   --name=bookstack   -e PUID=1000   -e PGID=1000   -e APP_URL=http://192.168.0.23:6875   -e DB_HOST=192.168.0.2   -e DB_USERNAME=root -e DB_PASSWORD=admin   -e DB_DATABASE=bookstack-db   -p 6875:80   -v /docker/appdata/bookstack:/config   --restart unless-stopped   ghcr.io/linuxserver/bookstack

 

I have also tried having the DB port on the end of the DB_HOST variable as well as having it in a separate DB_PORT variable and both give me the same results. The user is the default db user and has full access to the db. Other things I have tried are deleting the project folder so it gets recreated, using different users but, I seem to have the same results in that it deploys ok and is running, on initial deployment it also creates all the tables in the database. I can browse to the URL and I get a login screen, I login with the defaults and I just get a blank screen. Reading the troubleshooting tips it suggests this is usually down to permissions on the uplad and cache folders, I have changed them to everyone having permission and still have the same behavior. I read somewhere I might need to deploy with no db setting and have all in an environment file but, I cant find any environment file or where it should go.

 

Can anyone offer any help or advice as I have been looking at this for nearly a week now

 

Thanks

It doesn't seem like you are running unraid, so you are in the wrong place for support. Join our discord server to get help.

Link to comment
  • 3 weeks later...

Updated my container to the newest update and it broke due to a variable that was changed. It changed DB_PASSWORD to DB_PASS, which does not work. You can just manually change it back until it gets fixed.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.