Seems I’m not the only one with this problem, and I can see there’s several threads reporting this issue:
- Upgrade to Ghost v4, but a lot of 503 error (this one)
- 502 errors after upgrading to Ghost 4
- Ghost won't start after upgrading to v4.0.1
Please let me know if it’s best I started a new thread, or contributed here, which I’ll do for now.
I self-host and upgraded using ghost update
from version 3.42.2 to 4.0.1. I switched to the Caspar theme before doing so as a result of the warning I saw on attempting to upgrade. Other useful versions:
- Node: v14.16.0 (also tried with v12.16.2)
- Npm: 7.6.3
- OS: Debian 9.13
- MySQL: Ver 15.1 Distrib 10.2.30-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
I don’t believe the issue relates to the versions above because running ghost run
allows the blog to start correctly (that’s the state I’ve left it in for now). At the moment I’m completely stumped and don’t know what to try next. ghost log
tells me:
[2021-03-17 08:07:24] INFO Ghost is running in production...
[2021-03-17 08:07:24] INFO Your site is now available on https://blog.jonsdocs.org.uk/
[2021-03-17 08:07:24] INFO Ctrl+C to shut down
[2021-03-17 08:07:24] INFO Ghost server started in 0.833s
[2021-03-17 08:07:25] INFO Database is in a ready state.
[2021-03-17 08:07:25] INFO Ghost database ready in 1.264s
[2021-03-17 08:07:27] INFO Ghost booted in 3.536s
[2021-03-17 08:07:28] WARN Ghost is shutting down
[2021-03-17 08:07:28] WARN Ghost has shut down
[2021-03-17 08:07:28] WARN Your site is now offline
[2021-03-17 08:07:28] WARN Ghost was running for a few seconds
ghost ls
advises that the blog is running, on the correct port as confirmed against my Nginx config.
An excerpt from my migrations
table shows:
+-----+------------------------------------------------------------------+---------+----------------+
| id | name | version | currentVersion |
+-----+------------------------------------------------------------------+---------+----------------+
| 153 | 01-add-firstpromoter-settings.js | 3.41 | 3.41 |
| 154 | 01-update-mobiledoc.js | 4.0 | 4.0 |
| 155 | 02-add-status-column-to-members.js | 4.0 | 4.0 |
| 156 | 03-populate-status-column-for-members.js | 4.0 | 4.0 |
| 157 | 04-drop-apps-related-tables.js | 4.0 | 4.0 |
| 158 | 05-add-members-subscribe-events-table.js | 4.0 | 4.0 |
| 159 | 06-populate-members-subscribe-events-table.js | 4.0 | 4.0 |
| 160 | 07-alter-unique-constraint-for-posts-slug.js | 4.0 | 4.0 |
| 161 | 08-add-members-login-events-table.js | 4.0 | 4.0 |
| 162 | 09-add-members-email-change-events-table.js | 4.0 | 4.0 |
| 163 | 10-add-members-status-events-table.js | 4.0 | 4.0 |
| 164 | 11-add-members-paid-subscription-events-table.js | 4.0 | 4.0 |
| 165 | 12-delete-apps-related-settings-keys.js | 4.0 | 4.0 |
| 166 | 13-add-members-payment-events-table.js | 4.0 | 4.0 |
| 167 | 14-remove-orphaned-stripe-records.js | 4.0 | 4.0 |
| 168 | 15-add-frontmatter-column-to-meta.js | 4.0 | 4.0 |
| 169 | 16-refactor-slack-setting.js | 4.0 | 4.0 |
| 170 | 17-populate-members-status-events-table.js | 4.0 | 4.0 |
| 171 | 18-transform-urls-absolute-to-transform-ready.js | 4.0 | 4.0 |
| 172 | 19-remove-labs-members-setting.js | 4.0 | 4.0 |
| 173 | 20-refactor-unsplash-setting.js | 4.0 | 4.0 |
| 174 | 21-sanitize-email-batches-provider-id.js | 4.0 | 4.0 |
| 175 | 22-solve-orphaned-webhooks.js | 4.0 | 4.0 |
| 176 | 23-regenerate-posts-html.js | 4.0 | 4.0 |
| 177 | 24-add-missing-email-permissions.js | 4.0 | 4.0 |
| 178 | 25-populate-members-paid-subscription-events-table.js | 4.0 | 4.0 |
| 179 | 26-add-cascade-on-delete.js | 4.0 | 4.0 |
| 180 | 27-add-primary-key-brute-migrations-lock.js | 4.0 | 4.0 |
| 181 | 28-add-webhook-intergrations-foreign-key.js | 4.0 | 4.0 |
| 182 | 29-fix-foreign-key-for-members-stripe-customers-subscriptions.js | 4.0 | 4.0 |
| 183 | 30-set-default-accent-color.js | 4.0 | 4.0 |
+-----+------------------------------------------------------------------+---------+----------------+
Which at a quick glance appears consistent with the one pasted earlier.
Any advice would be greatly appreciated.