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

Upgrading from 5.68.X throws an "Unknown database error" #21058

Open
1 task done
97WaterPolo opened this issue Sep 20, 2024 · 1 comment
Open
1 task done

Upgrading from 5.68.X throws an "Unknown database error" #21058

97WaterPolo opened this issue Sep 20, 2024 · 1 comment
Labels
needs:triage [triage] this needs to be triaged by the Ghost team

Comments

@97WaterPolo
Copy link

Issue Summary

I had an existing issue #20995 that was closed due to it possibly being an environment issue.

After further digging into the setup of the container and configurations, it looks like something isn't being passed into that database.js file even though the ghost config command returns correctly.

Inside I did a console.log(options) so I would get whatever value is being passed in the knex() call for the database.js file. In
v5.68.0
367999668-14f861c7-8c81-470d-a5c2-025a2cb97530

v5.98.0
367999714-7f9a0454-3868-44ee-871a-b28729f89dc6

The interesting thing is that if I run

ghost config database.client - I get `mysql`
ghost config database.connection.database - I get `ghost`
ghost config database.connection.host - I get `my_db_instance_ip`
ghost config database.connection.password - I get `my_db_instance_pw`

So it seems like the application acknowledges my config.production.json as is correctly loading it when running the ghost config via CLI, however when I upload past v5.68.0 it doesn't seem to pass it into the connection even though the command line config is indicating the right values.

I no longer feel this is an environment issue as the provided ghost CLI config command is returning the correct configuration values in both v5.68.0 AND 5.98.0 but in 5.98.0 it fails to pass the correct options to the database.js file.

Steps to Reproduce

1. Upgrade ghost to any tag version >= 5.69.0 (used 5.94.0 for testing purposes)
2. Ghost fails to start when using ghost run -D! with a database error
3. Run `ghost config` and verify all the configurations are correct and match config.production.json
4. Revert back to version 5.68.0 or below
5.  Run `ghost config` and verify all the configurations are correct and match config.production.json, same result as step 3
6. Ghost starts and runs normally without any issues

Ghost Version

5.98.0

Node.js Version

20.X

How did you install Ghost?

docker

Database type

Other

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Sep 20, 2024
@markstos
Copy link
Contributor

Sorry, this still appears to be environment-specific.

You can ask on https://forum.ghost.org/ if you want troubeshooting help.

I believe you start a clean and working install of Ghost 5.68 and follow your steps to produce that it would not triggered.

There is not a enough detail here to be certain there's a bug in Ghost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage [triage] this needs to be triaged by the Ghost team
Projects
None yet
Development

No branches or pull requests

2 participants