Hello!
I installed Ghost on Ubuntu 20.04 with OpenLiteSpeed. I followed this guide here:
https://openlitespeed.org/kb/ghost-openlitespeed/
As far as I know, everything has been configured on the server properly, and I’m now trying to get Ghost to run, but whenever I visit the URL of my Ghost instance, the request doesn’t complete.
I checked the Ghost error log and found this:
{
"name": "Log",
"hostname": "blog.example.org",
"pid": 1259007,
"level": 50,
"err": {
"id": "7531a510-060e-11ed-aecc-178b1de9c182",
"domain": "https://blog.example.org",
"code": null,
"name": "InternalServerError",
"statusCode": 500,
"level": "critical",
"message": "Knex: run\n$ npm install mysql2 --save\nEEXIST: file already exists, uv_pipe_open",
"stack": "Error: Knex: run\n$ npm install mysql2 --save\n$ npm install mysql2 --save\nEEXIST: file already exists, uv_pipe_open\n at Client_MySQL2.initializeDriver (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex/lib/client.js:194:13)\n at new Client (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex/lib/client.js:75:12)\n at new Client_MySQL (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex/lib/dialects/mysql/index.js:21:1)\n at new Client_MySQL2 (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex/lib/dialects/mysql2/index.js:9:1)\n at knex (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex/lib/knex-builder/Knex.js:16:28)\n at Object.connect (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex-migrator/lib/database.js:36:12)\n at KnexMigrator.isDatabaseOK (/home/blog.example.org/public_html/versions/5.4.0/node_modules/knex-migrator/lib/index.js:566:32)\n at DatabaseStateManager.getState (/home/blog.example.org/public_html/versions/5.4.0/core/server/data/db/state-manager.js:40:37)\n at DatabaseStateManager.makeReady (/home/blog.example.org/public_html/versions/5.4.0/core/server/data/db/state-manager.js:73:36)\n at initDatabase (/home/blog.example.org/public_html/versions/5.4.0/core/boot.js:69:26)\n at bootGhost (/home/blog.example.org/public_html/versions/5.4.0/core/boot.js:419:15)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)",
"hideStack": false
},
"msg": "Knex: run\n$ npm install mysql2 --save\nEEXIST: file already exists, uv_pipe_open",
"time": "2022-07-17T20:24:28.387Z",
"v": 0
}
It looks like it’s failing to install mysql2, because it already exists, but I’m not sure what it means in order to troubleshoot this further on my own.
Along the lines of database, I should note that I have MariaDB installed on the server that will be running Ghost, however I’ve configured a remote database server with MySQL 8 for Ghost to use.
When I run ghost start, it does appear to boot up, because that’s when it created the database tables, however when I try to run Ghost using OpenLiteSpeed (as documented in the instructions on the link above), I get the error.
Any guidance to resolve this would be appreciated!