Ghost Unable to Start After File Upload

  • What’s your URL?
    [redacted after solution]

  • What version of Ghost are you using?
    Ghost-CLI version: 1.26.0

  • How was Ghost installed and configured?
    Through Bitnami’s AWS package.

  • What Node version, database, OS & browser are you using?
    Node: v18.19.1, Internal Database (mysql Ver 8.0.36), Windows & IOS through Brave, Safari, Firefox, & Curl

  • What errors or information do you see in the console?

"code":"ERR_NON_2XX_3XX_RESPONSE","statusCode":403,"message":"Response code 403 (Forbidden)","context":"\"Checking for updates failed, your site will continue to function.\"","help":"\"If you get this error repeatedly, please seek help from\"","stack":"HTTPError: Response code 403 (Forbidden)\n    at Request.<anonymous>


"code":"ECONNREFUSED","name":"DatabaseError","statusCode":500,"level":"critical","message":"connect ECONNREFUSED","help":"\"Unknown database error\"","stack":"Error: connect ECONNREFUSED\n    at /opt/bitnami/ghost/versions/5.81.0/node_modules/knex-migrator/lib/database.js:57:19\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)","hideStack":false},"msg":"connect ECONNREFUSED","time":"2024-04-30T17:08:44.627Z","v":0
  • Describe the bug in more detail:
    Upon uploading a handful of high quality images to a story, the site stopped responding and quickly became inaccessible. I upgraded the hardware (VM specs) because I believed it to be just an extreme slowdown due to the quality of processing the images. That allowed me to successfully SSH into the machine, however, ghost wasn’t running and had the same errors. As I was making the support ticket, it reccomended I update, so I went and updated Ghost. Now Bitnami’s script says Ghost is running (which it didn’t before), but the site is still down.

It sounds like MySQL isn’t running. Getting it up and running (on where Ghost is looking for it) or confirming that it is up and running would be the first step.

Note that depending on OS, localhost might be mapping to the ipv6 address (something that changed fairly recently) - check carefully if you see ‘localhost’ as the address that there’s not a mismatch between MySQL and Ghost.

1 Like

I’m slightly confused, as running sudo service mysql start returned the error: Failed to start mysql.service: Unit mysql.service not found.

Then, I tried sudo /etc/init.d/mysql start and it also didn’t work, as the init.d directory does not exist.

However, when I run just the command mysql or sudo mysql, I get an access denied error, which would indicate that it is running.

Ok, so let’s suppose it’s running. What does netstat -ant show? What IP is MySQL listening on? (Look for port 3306…)

tcp        0      0*               LISTEN
tcp        0      0         ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0      0         ESTABLISHED
tcp6       0      0 :::33060                :::*                    LISTEN

Here is all the netstat results relating to 3306. If I’m reading it correctly, wouldn’t this mean that it is properly listening on both IPv4 and IPv6?

Thank you for your help, it’s very much apricated. (Also sorry if I’m being a bit dumb, I’m new to Linux server management.)

Figured out this morning that upgrading the VM had let to the static IP being changed, so the domain pointed to nothing and the IP I was using for SSH was wrong. I guess updating ghost fixed the crashing issue.

Thanks @Cathy_Sarisky so much for the help, I really appreciate it.

1 Like