[Support] Linuxserver.io - Bookstack


Recommended Posts

On 9/23/2019 at 10:06 PM, cback said:

I'm having basically exactly this same problem, except I'm using bridge not br0... I can't get Bookstack to connect to mariaDB i just keep getting this same error:

My run command:

I know this has the port in the DB_HOST field but I've also tried it without the port there and that doesn't work either... I'm able to log into the user cli and the user has % in the host permissions table. Haven't had much luck getting help on the linuxserver  #docker-support discord channel as of yet

With the help of GilbN on Discord (the guy who wrote the guide I was following) the container is now working. The current theory is that in /appdata/bookstack/www/.env the wrong database credentials were stored. After deleting the entirety of the bookstack appdata folder and running the container again it regenerated it all with the proper database credentials stored this time and the container worked immediately. So if anyone sees this and ran into this same problem before its fixed - check your .env file and see whats in there. Just update that file with the right vals or delete it and have it regen. Shout out again to GilbN.

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

I recently started having issues with Bookstack container and NginxProxyManager giving "502 Bad Gateway" when accessing from the domain pointed at it. The Bookstack container is accessible for it IP on local network, restarting the NginxProxyManager fixes the issue for a few minutes then back to 502. I originally posted on the NginxProxyManager thread but maybe the issue is with bookstack? I have NAT refection turned on my firewall and all other domains I have are working. The bookstack container is accessible from its IP address.

 

Bookstack log

 

[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] 10-adduser: executing...

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


Brought to you by linuxserver.io
We gratefully accept donations at:
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 63: warning: command substitution: ignored null byte in input
/var/run/s6/etc/cont-init.d/50-config: line 63: warning: command substitution: ignored null byte in input
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.

Below is a log excerpt from when it stops working. It never recovers unless I restart the NginxProxyManger container then fails after i close my session with the bookstack.

 

[02/Nov/2019:21:11:22 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "http://10.0.0.77:8181/nginx/proxy"

 

[06/Nov/2019:23:10:18 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "-"

 

Link to comment
4 hours ago, swingline said:

I recently started having issues with Bookstack container and NginxProxyManager giving "502 Bad Gateway" when accessing from the domain pointed at it. The Bookstack container is accessible for it IP on local network, restarting the NginxProxyManager fixes the issue for a few minutes then back to 502. I originally posted on the NginxProxyManager thread but maybe the issue is with bookstack? I have NAT refection turned on my firewall and all other domains I have are working. The bookstack container is accessible from its IP address.

 

Bookstack log

 


[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] 10-adduser: executing...

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


Brought to you by linuxserver.io
We gratefully accept donations at:
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 63: warning: command substitution: ignored null byte in input
/var/run/s6/etc/cont-init.d/50-config: line 63: warning: command substitution: ignored null byte in input
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.

Below is a log excerpt from when it stops working. It never recovers unless I restart the NginxProxyManger container then fails after i close my session with the bookstack.

 


[02/Nov/2019:21:11:22 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "http://10.0.0.77:8181/nginx/proxy"

 


[06/Nov/2019:23:10:18 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "-"

 

If bookstack works using the IP at all times, I would say that the problem is not with the container.

I don't know Nginx proxy manager, so can't help there.

Link to comment
5 hours ago, swingline said:

I recently started having issues with Bookstack container and NginxProxyManager giving "502 Bad Gateway" when accessing from the domain pointed at it. The Bookstack container is accessible for it IP on local network, restarting the NginxProxyManager fixes the issue for a few minutes then back to 502. I originally posted on the NginxProxyManager thread but maybe the issue is with bookstack? I have NAT refection turned on my firewall and all other domains I have are working. The bookstack container is accessible from its IP address.

 

Bookstack log

 


[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] 10-adduser: executing...

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


Brought to you by linuxserver.io
We gratefully accept donations at:
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 63: warning: command substitution: ignored null byte in input
/var/run/s6/etc/cont-init.d/50-config: line 63: warning: command substitution: ignored null byte in input
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.

Below is a log excerpt from when it stops working. It never recovers unless I restart the NginxProxyManger container then fails after i close my session with the bookstack.

 


[02/Nov/2019:21:11:22 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "http://10.0.0.77:8181/nginx/proxy"

 


[06/Nov/2019:23:10:18 +0400] - 502 502 - GET https wiki.domain.pw "/" [Client 10.0.0.1] [Length 166] [Gzip -] [Sent-to 10.0.0.64] "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" "-"

 

I've never had much luck with NginxProxyManager... I've got bookstack reverse proxying fine with the LetsEncrypt docker container.

Link to comment
  • 2 months later...

Is Draw.io drawing integration working for other people in WYSIWYG mode? For some reason, when I click the 'draw' button I just get a white screen, rather than being redirected to Draw.io. 


Eventually I'd like to self-host a Draw.io instance and link that to Bookstack, but I wanted to test it out first. 

 

Any ideas how I can figure out what the problem is?

Link to comment
  • 2 months later...

This is just for anyone else who hits this wall. Setting up the Bookstack container, I got an endless amount of: 

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

In the end, I noticed in one of log files in the container persistence files (./appdata/bookstack/...) that it had my mariaDB username and password logged, and the password was truncated. Despite trying the `root` user and the customer `bookstack` user I created, both passwords contained a `#` character that wasn't being handled properly and the password would truncate.

 

Removed the `#` and it fired up like I hadn't lost 3 evenings chasing my tail. Hope this helps someone.

/klogg

Link to comment
  • 3 weeks later...
1 hour ago, CurtisFeatures said:

Has anyone had any issues running this on HTTPS? Everything works fine when im using http through my reverse proxy but when I try to use https the page is not formatted correctly and looks like this in plane text where everything is huge

Looks like CSS isn't making it through the HTTPS. Check what the web browser's console (In Dev tools - F12?) says when you try to load the page, could be trying to reference some HTTP thing somewhere.

Link to comment
  • 2 weeks later...
On 3/23/2020 at 11:48 PM, klogg said:

This is just for anyone else who hits this wall. Setting up the Bookstack container, I got an endless amount of: 


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

In the end, I noticed in one of log files in the container persistence files (./appdata/bookstack/...) that it had my mariaDB username and password logged, and the password was truncated. Despite trying the `root` user and the customer `bookstack` user I created, both passwords contained a `#` character that wasn't being handled properly and the password would truncate.

 

Removed the `#` and it fired up like I hadn't lost 3 evenings chasing my tail. Hope this helps someone.

/klogg

Jesus christ, thank you so much.  I was going nuts.  I used a password manager to generate the DB password and it had some symbols in it to include a '#'.  I appreciate you!!

Link to comment
  • 2 weeks later...

when configuring this container, there seems to be a problem in how the host_db parameter is managed.

 

I have both mariadb and bookstack in separate containers, bridged.

 

When I launch bookstack, I use either mariadb or linuxserver/mariadb as the database address. Unfortuntely does not work.

When I put in the actual ip address given by docker (172.xx.xx.xx), then works fine.

Unfortunately this is not supportable, as these numbers will change when bringing up/down the server.

 

How do you configure the dbhost parameter in the bookstack template. I'm curious.

 

image.thumb.png.f483a10030ca6e4b07354ae6e91117fe.png

Edited by bucky2076
pase
Link to comment
2 hours ago, bucky2076 said:

when configuring this container, there seems to be a problem in how the host_db parameter is managed.

 

I have both mariadb and bookstack in separate containers, bridged.

 

When I launch bookstack, I use either mariadb or linuxserver/mariadb as the database address. Unfortuntely does not work.

When I put in the actual ip address given by docker (172.xx.xx.xx), then works fine.

Unfortunately this is not supportable, as these numbers will change when bringing up/down the server.

 

How do you configure the dbhost parameter in the bookstack template. I'm curious.

 

image.thumb.png.f483a10030ca6e4b07354ae6e91117fe.png

You set it to the host IP address, the same as unraid. If you are not using the standard port, that might be the reason you have issues.

Link to comment

I tried this again... and it worked after a fashion. I used my top level ip instead of the container ip for the DB.

Interesting though when I appended the port number to the IP, it barfed.

I simply added a new variable for DB_PORT and it liked that better... despite what the documentation said.

 

Not very container friendly at this stage... but it worked !

 

Link to comment
4 hours ago, bucky2076 said:

I tried this again... and it worked after a fashion. I used my top level ip instead of the container ip for the DB.

Interesting though when I appended the port number to the IP, it barfed.

I simply added a new variable for DB_PORT and it liked that better... despite what the documentation said.

 

Not very container friendly at this stage... but it worked !

 

By top level up, you mean your wan IP?

 

Post the run command for both containers.

Edited by saarg
Link to comment

mariadb...

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='mariadb' --net='bridge' -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'MYSQL_ROOT_PASSWORD'='XYZ' -p '3306:3306/tcp' -v '/mnt/user/appdata/mariadb':'/config':'rw' 'linuxserver/mariadb'
 

bookstack....

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='bookstack' --net='bridge' -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.xx.254' -e 'DB_USERNAME'='abc' -e 'DB_PASSWORD'='XYZ' -e 'DB_DATABASE'='bookstack' -e 'APP_URL'='' -e 'PUID'='99' -e 'PGID'='100' -e 'DB_PORT'='3306' -p '8083:80/tcp' -v '/mnt/user/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack'

 

and finally .env

DB_HOST=172.17.0.3
DB_PORT=5506
DB_DATABASE=stack
DB_USERNAME=n
DB_PASSWORD=me

 

 

This config actually works... because of the following:

  • .env is ignored if overidden with params...
  • DB_USER in template replaced with USERNAME
  • DB_PASS changed to PASSWORD
  • DB_PORT was added

 

Would be better if it accepted the host as the container name rather than the ip.

 

 

 

 

 

Link to comment
9 hours ago, bucky2076 said:

mariadb...

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='mariadb' --net='bridge' -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'MYSQL_ROOT_PASSWORD'='XYZ' -p '3306:3306/tcp' -v '/mnt/user/appdata/mariadb':'/config':'rw' 'linuxserver/mariadb'
 

bookstack....

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='bookstack' --net='bridge' -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.xx.254' -e 'DB_USERNAME'='abc' -e 'DB_PASSWORD'='XYZ' -e 'DB_DATABASE'='bookstack' -e 'APP_URL'='' -e 'PUID'='99' -e 'PGID'='100' -e 'DB_PORT'='3306' -p '8083:80/tcp' -v '/mnt/user/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack'

 

and finally .env

DB_HOST=172.17.0.3
DB_PORT=5506
DB_DATABASE=stack
DB_USERNAME=n
DB_PASSWORD=me

 

 

This config actually works... because of the following:

  • .env is ignored if overidden with params...
  • DB_USER in template replaced with USERNAME
  • DB_PASS changed to PASSWORD
  • DB_PORT was added

 

Would be better if it accepted the host as the container name rather than the ip.

 

 

 

 

 

The default bridge doesn't support DNS resolving, so you can't use the name of the container as the host for the database. This has nothing to do with the containers. So you have to use the unraid IP in DB_HOST.

 

You can make a custom bridge to use the container name in DB_HOST, but it doesn't really matter if you use the name or the IP as it works both ways.

 

Is 192.168.1.254 the IP of unraid?

Link to comment

oh thanks I did not realise that about unraid docker.... I have done some docker stuff in a normal linux host, and the docker networking is quite sophisticated. You would simply use the name of the docker rather than its internal IP. You also have the opportunity to manage your own networking so that you can split your backend from your foreground tasks across different network subnets (sql database, versus web server hosts).

I did obscure a few things in the above post for obvious reasons... Name/PW and such. My server IP internally is actually 192.168.92.254, so there you go.

 

I am ok using the host IP since that dosen't change. The 172.xx.xx.x.. ip changes each time you present a different order during startup.

 

I did leave a message on bookstack issues section (git) suggesting the parameters need some attention.

 

Thanks again for the chat... hopefully this will help the next newbie...

 

/bucky2076

 

Link to comment
3 hours ago, bucky2076 said:

oh thanks I did not realise that about unraid docker.... I have done some docker stuff in a normal linux host, and the docker networking is quite sophisticated. You would simply use the name of the docker rather than its internal IP. You also have the opportunity to manage your own networking so that you can split your backend from your foreground tasks across different network subnets (sql database, versus web server hosts).

I did obscure a few things in the above post for obvious reasons... Name/PW and such. My server IP internally is actually 192.168.92.254, so there you go.

 

I am ok using the host IP since that dosen't change. The 172.xx.xx.x.. ip changes each time you present a different order during startup.

 

I did leave a message on bookstack issues section (git) suggesting the parameters need some attention.

 

Thanks again for the chat... hopefully this will help the next newbie...

 

/bucky2076

 

What do you mean with the parameters need some attention?

Link to comment
14 hours ago, bucky2076 said:

simply the template variables are misleading, causing some confusion. Also, the port assignment did not work when adding port to host name., I had to break this out to its on env var.

The .env provides the proper name for these variables.

 

What exactly is misleading?

I don't see anything misleading and they are pretty clear in my opinion.

You can specify the database port as a variable and set it that way. Most people use the standard port.

We don't add every option available in the application in the template as we can't foresee all the different options. Usually there are documentation that the user can look up themselves, as now. A quick Google search will find the way to set the database port.

 

Neither me or the template told you to set the port in the DB_HOST variable.

Link to comment
On 9/25/2019 at 1:25 PM, cback said:

With the help of GilbN on Discord (the guy who wrote the guide I was following) the container is now working. The current theory is that in /appdata/bookstack/www/.env the wrong database credentials were stored. After deleting the entirety of the bookstack appdata folder and running the container again it regenerated it all with the proper database credentials stored this time and the container worked immediately. So if anyone sees this and ran into this same problem before its fixed - check your .env file and see whats in there. Just update that file with the right vals or delete it and have it regen. Shout out again to GilbN.

When I set it up the first time, my DB password had a # in it, and either MariaDB or Bookstack couldn’t handle that. I spent a lot of time troubleshooting when I really just needed to generate a new password without that character. 

Link to comment

saarg,

the basic unraid template did not work for me, and I had to tear my hair out.

  • DB_USER variable was incorrect. Needed to be DB_USERNAME
  • Same issue for DB_PASS
  • Passing IP/Port did not work for me on the DB_HOST

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='bookstack' --net='bridge' -e TZ="Australia/Sydney" -e HOST_OS="Unraid" -e 'DB_HOST'='192.168.92.254' -e 'DB_USERNAME'='ben' -e 'DB_PASSWORD'='xyz' -e 'DB_DATABASE'='bookstack' -e 'APP_URL'='' -e 'PUID'='99' -e 'PGID'='100' -e 'DB_PORT'='3306' -p '8083:80/tcp' -v '/mnt/user/appdata/bookstack':'/config':'rw' 'linuxserver/bookstack'

 

I've moved on now, experimenting with Traefik for reverse proxy.

 

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.