Skip to content

Instantly share code, notes, and snippets.

@Hiobi
Created August 19, 2017 14:59
Show Gist options
  • Save Hiobi/21d7c8ae1439fcfb05544fe61465afba to your computer and use it in GitHub Desktop.
Save Hiobi/21d7c8ae1439fcfb05544fe61465afba to your computer and use it in GitHub Desktop.
Debug Information:
Node Version: v6.11.2
Ghost-CLI Version: 1.1.1
Environment: production
Command: 'ghost install'
An error occurred.
Message: 'Command failed: /bin/sh -c sudo -E -u ghost /usr/lib/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
[2017-08-19 16:44:18] ERROR
NAME: InternalServerError
CODE: ECONNREFUSED
MESSAGE: The server has encountered an error.
level:normal
InternalServerError: The server has encountered an error.
at new KnexMigrateError (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/errors.js:7:26)
at /usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:52:19
at tryCatcher (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
Error: connect ECONNREFUSED 127.0.0.1:3306
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
--------------------
at Protocol._enqueue (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/Connection.js:130:18)
at /usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:106:18
at Promise._execute (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:79:10)
at Client_MySQL.acquireRawConnection (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:104:12)
at Object.create (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:239:16)
at Pool._createResource (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:354:17)
at Pool._ensureMinimum (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:408:12)
at new Pool (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:157:8)
at Client_MySQL.initializePool (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:269:17)
at Client_MySQL.Client (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:116:12)
at new Client_MySQL (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:62:20)
at Knex (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/index.js:60:34)
at Object.connect (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:25:12)
at Object.createDatabaseIfNotExist (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:40:30)
at KnexMigrator.init (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/index.js:73:21)
at KnexMigrator.migrate (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/index.js:160:21)
at /usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/bin/knex-migrator-migrate:26:29
at tryCatcher (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/util.js:16:23)
'
Stack: Error: Command failed: /bin/sh -c sudo -E -u ghost /usr/lib/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
[2017-08-19 16:44:18] ERROR
NAME: InternalServerError
CODE: ECONNREFUSED
MESSAGE: The server has encountered an error.
level:normal
InternalServerError: The server has encountered an error.
at new KnexMigrateError (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/errors.js:7:26)
at /usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:52:19
at tryCatcher (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
Error: connect ECONNREFUSED 127.0.0.1:3306
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
--------------------
at Protocol._enqueue (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/Connection.js:130:18)
at /usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:106:18
at Promise._execute (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:79:10)
at Client_MySQL.acquireRawConnection (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:104:12)
at Object.create (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:239:16)
at Pool._createResource (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:354:17)
at Pool._ensureMinimum (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:408:12)
at new Pool (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:157:8)
at Client_MySQL.initializePool (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:269:17)
at Client_MySQL.Client (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:116:12)
at new Client_MySQL (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:62:20)
at Knex (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/index.js:60:34)
at Object.connect (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:25:12)
at Object.createDatabaseIfNotExist (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/database.js:40:30)
at KnexMigrator.init (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/index.js:73:21)
at KnexMigrator.migrate (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/index.js:160:21)
at /usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/bin/knex-migrator-migrate:26:29
at tryCatcher (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise.all.then.arr (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:236:11)
at process._tickCallback (internal/process/next_tick.js:109:7)
Code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment