Latest ghost wont start - openbsd 6.7

Hello! I just did a fresh install of OpenBSD 6.7 as it was released this morning.

I installed Node, 12.6.1 is current stable version for this release.

After installing sqlite3 with npm, and installing ghost successfully, starting ghost gives me these errors: (Ghost doctor says everything is good as well)

bash-5.0$ ghost install local
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking for latest Ghost version
:heavy_check_mark: Setting up install directory
:heavy_check_mark: Downloading and installing Ghost v3.16.0
:heavy_check_mark: Finishing install process
:heavy_check_mark: Configuring Ghost
:heavy_check_mark: Setting up instance
:heavy_multiplication_x: Starting Ghost
One or more errors occurred.

  1. GhostError

Message: Ghost process exited with code: 0

Debug Information:
OS: , v
Node Version: v12.16.1
Ghost Version: 3.16.0
Ghost-CLI Version: 1.13.1
Environment: development
Command: ‘ghost install local’

Additional log info available in: /var/www/ghost/.ghost/logs/ghost-cli-debug-2020-05-20T02_10_02_365Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/api/ghost-cli/ for troubleshooting.
bash-5.0$ cat /var/www/ghost/.ghost/logs/ghost-cli-debug-2020-05-20T02_10_02_365Z.log
Debug Information:
OS: , v
Node Version: v12.16.1
Ghost Version: 3.16.0
Ghost-CLI Version: 1.13.1
Environment: development
Command: ‘ghost install local’
Message: Ghost process exited with code: 0
Stack: Error: Ghost process exited with code: 0
at ChildProcess. (/var/www/ghost/node_modules/ghost-cli/lib/utils/local-process.js:56:24)
at ChildProcess.emit (events.js:311:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

bash-5.0$

If anyone can help me troubleshoot this it would be greatly appreciated. I have 3 websites down right now that I’d like to get back up.

More information shows it’s attempting to connect to mysql on 3306, even tho my config is set to only use sqlite3…

See details. I can’t figure out where it’s trying to connect to mysql at config wise…

bash-5.0$ cat config.development.json
{
“url”: “http://localhost:2368/”,
“server”: {
“port”: 2368,
“host”: “127.0.0.1”
},
“database”: {
“client”: “sqlite3”,
“connection”: {
“filename”: “/var/www/ghost/hackersnhops.com/content/data/ghost-local.db”
}
},
“mail”: {
“transport”: “Direct”
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“process”: “local”,
“paths”: {
“contentPath”: “/var/www/ghost/hnh/content”
}
}

bash-5.0$ ghost run
The ghost run command is used by the configured Ghost process manager and for debugging. If you’re not running this to debug something, y
ou should run ghost start instead.
[2020-05-20 15:16:55] ERROR connect ECONNREFUSED 127.0.0.1:3306

connect ECONNREFUSED 127.0.0.1:3306

“Unknown database error”

Error ID:
500

Error Code:
ECONNREFUSED


DatabaseError: connect ECONNREFUSED 127.0.0.1:3306
at DatabaseError.KnexMigrateError (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex-migrator/lib/errors.js:7:26)
at new DatabaseError (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex-migrator/lib/errors.js:55:26)
at /var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex-migrator/lib/database.js:47:19

Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)

at Protocol._enqueue (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/mysql/lib/Connection.js:116:18)
at /var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex/lib/dialects/mysql/index.js:69:18
at Promise._execute (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/bluebird/js/release/debuggability.js:384:9)
at Promise._resolveFromExecutor (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/bluebird/js/release/promise.js:518:18)
at new Promise (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/bluebird/js/release/promise.js:103:10)
at Client_MySQL.acquireRawConnection (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex/lib/dialects/mysql/index.js:64:
12)
at create (/var/www/ghost/hackersnhops.com/versions/3.16.1/node_modules/knex/lib/client.js:291:39)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

bash-5.0$

Ok! I figured it out!

Make sure you link your python, or else npm will not build sqlite3 for one.

cd /usr/local/bin/
ln -s python3.7 python

ghost would not start on the development config, and was searching for Mysql settings in a production config that didn’t exist. By duplicating the development config to production config made it look for sqlite3 correctly.

1 Like