Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bookstack helm chart doesn't work, "500 Internal Server Error" #650

Open
im-Kitsch opened this issue Jul 10, 2024 · 2 comments
Open

bookstack helm chart doesn't work, "500 Internal Server Error" #650

im-Kitsch opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@im-Kitsch
Copy link

Chart Name

bookstack

Chart Version

0.17.0

Problem

Hi,

I use kubenetes to try to deploy bookstack, but it doesn't work. I have not changed any command but just wanna have toy test.

I run the command in a empty clean kubernetes cluster:

helm install bookstack oci://ghcr.io/gabe565/charts/bookstack

After that I do the port-foward to try to access the the website, but it shows as follows:

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

It shows always the error about database mysql issues (see logs part). Shall I expclicitely configure the mysql externally? Since I just wanna to have a hello-world deployment and then change the configuration.

Could you do me a favor and check if this command works in your computer?

Best.

values.yaml

# I have not changed any default values

Relevant log output

In /config/log/bookstack/laravel.log reapeated shows like that 

[2024-07-10 09:34:04] production.ERROR: SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from users where system_name = public limit 1) (View: /app/www/resources/views/layouts/base.blade.php) (View: /app/www/resources/views/layouts/base.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from users where system_name = public limit 1) (View: /app/www/resources/views/layouts/base.blade.php) (View: /app/www/resources/views/layouts/base.blade.php) at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
[stacktrace]

SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from users where system_name = public limit 1) (View: /app/www/resources/views/layouts/base.blade.php) (View: /app/www/resources/views/layouts/base.blade.php) at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
@gabe565
Copy link
Owner

gabe565 commented Jul 10, 2024

@im-Kitsch I believe this is related to #470. There's an issue with the initial installation where Bookstack starts before the database is ready, causing initial migrations to fail. Most apps crash when this happens, causing the app to get restarted and migrations to run again. For Bookstack, migrations fail and then the container keeps trying to run, so none of the necessary tables exist.

Can you try restarting the app container once the database is healthy?

@im-Kitsch
Copy link
Author

Hi, @gabe565

thank you, it works.

btw. I think the default value of database is disabled. I think besides adding a init-container, shall we change the default value to follows? Or we should change readme to hint new users enabling database. I could create a small PR for that.

mariadb:
  enabled:  true # originally is false

I think by default values configuration with disabling mariadb, the installation doesn't work. I think because the bookstack pod doesn't install database internally(not sure) but could only cooperate with external datasbase Statefulset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants