Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Failure At "Running database migrations" #400

Closed
1 of 2 tasks
crunchprank opened this issue Jul 29, 2017 · 8 comments · Fixed by #422
Closed
1 of 2 tasks

Installation Failure At "Running database migrations" #400

crunchprank opened this issue Jul 29, 2017 · 8 comments · Fixed by #422
Labels

Comments

@crunchprank
Copy link

crunchprank commented Jul 29, 2017

This issue is a

  • Bug Report
  • Feature Request

Summary

When attempting to perform a ghost install local, I receive the following error:

Error occurred running command: 'undefined'

Steps to Reproduce (for a bug report)

  1. Install ghost-cli@latest via NPM or yarn.
  2. Run the command ghost install local as root or user with sudo.

The failure appears to happen at the Running database migrations stage. Here is a log:

[admin@local ghost]$ ghost install local
✔ Checking system Node.js version
✔ Checking current folder permissions
ℹ Checking operating system [skipped]
ℹ Checking MySQL is installed [skipped]
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v1.1.0
✔ Finishing install process
✔ Configuring Ghost
✔ Setting up instance
✖ Running database migrations
A ProcessError occured.

Error occurred running command: 'undefined'

Debug Information:
    Node Version: v6.10.3
    Ghost-CLI Version: 1.0.0
    Environment: development
    Command: 'ghost install local'

Technical details (will be automatically output by Ghost-CLI if an error occurs):

  • OS: CentOS 6.9
  • Node Version: 6.10.3
  • Ghost-CLI Version: 1.0.0
@acburdine
Copy link
Member

@crunchprank can you try upgrading to the latest ghost-cli release (1.0.2)? I still have no idea what's happening here but maybe an upgrade would fix it?

@dcinzona
Copy link

dcinzona commented Aug 1, 2017

I got the same error when doing an upgrade from 1.1.0 to 1.2.0 - using the latest ghost cli version 1.0.2

✖ Running database migrations
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/ghost1/current
[2017-08-01 07:58:31] ERROR

NAME: InternalServerError
MESSAGE: Please provide a file named MigratorConfig.js in your project root.

level:normal

Read through the README.md to see which values are expected.
InternalServerError: Please provide a file named MigratorConfig.js in your project root.
    at new KnexMigrateError (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/errors.js:7:26)
    at new KnexMigrator (/usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/lib/index.js:20:19)
    at /usr/lib/node_modules/ghost-cli/node_modules/knex-migrator/bin/knex-migrator-migrate:20:28
    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:693:18)
    at Promise._fulfill (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:524:17)
    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)


'

Debug Information:
Node Version: v6.11.1
Ghost-CLI Version: 1.0.2
Environment: production
Command: 'ghost update'

@dcinzona
Copy link

dcinzona commented Aug 1, 2017

Resolved my upgrade issue by running ghost update --force. Website is back up!

@crunchprank
Copy link
Author

Unfortunately I will be out of town until next week but I will try as soon as possible to attempt this solution, as I know you don't want Issues sitting around with no activity.

@ErisDS
Copy link
Member

ErisDS commented Aug 2, 2017

@crunchprank really appreciate you taking the time to let us know that :)

@SparkyDoosan
Copy link

SparkyDoosan commented Aug 2, 2017

Today I got the same error as OP with only an additional line emitted "→ id: ghost: No such user".

This happens whether installing local or not, using Ghost-CLI 1.0.3 with ghost install --no-setup-linux-user ... I'm on a shared hosting plan so need that flag. Also I could mention, I'm using nvm. Thanks!

@acburdine
Copy link
Member

Ah ok - I think I actually might have a better idea of what's causing this. I'll look into it more tonight.

@acburdine
Copy link
Member

Figured out what the issue was 😅 PR incoming.

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Aug 3, 2017
closes TryGhost#400
- for `id -u ghost` -> centos returns "No such user" - this made the use-ghost-user check fail
acburdine added a commit that referenced this issue Aug 3, 2017
closes #400
- for `id -u ghost` -> centos returns "No such user" - this made the use-ghost-user check fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants