ghost-on-heroku icon indicating copy to clipboard operation
ghost-on-heroku copied to clipboard

Ghost server.js not starting

Open kichappa opened this issue 5 years ago • 3 comments

I cloned cobyism to my GitHub account and connected my app to it. When I deploy the app, I get the following error in heroku logs --tail --app app_name npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: 'node server.js' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

kichappa avatar May 25 '19 05:05 kichappa

Hmm, not much there. Is there more information further up in the logs?

paulmelnikow avatar May 27 '19 19:05 paulmelnikow

I also can't get the server to start. I recognize this project isn't really actively maintained but some help would be great—it seems like a really useful tool!

Gets stuck at this phase in the Heroku build (well I assume it shouldn't take 20+ mins): image

Heroku logs:

2020-01-31T15:32:16.086025+00:00 heroku[web.1]: Starting process with command `npm start --production`
2020-01-31T15:32:16.000000+00:00 app[api]: Build succeeded
2020-01-31T15:32:18.801566+00:00 app[web.1]:
2020-01-31T15:32:18.801598+00:00 app[web.1]: > [email protected] start /app
2020-01-31T15:32:18.801600+00:00 app[web.1]: > node server.js
2020-01-31T15:32:18.801602+00:00 app[web.1]:
2020-01-31T15:32:56.190698+00:00 app[web.1]: Ghost server error: Migration lock was never released or currently a migration is running. MigrationsAreLockedError: Migration lock was never released or currently a migration is running.
2020-01-31T15:32:56.190737+00:00 app[web.1]: at MigrationsAreLockedError.KnexMigrateError (/app/node_modules/knex-migrator/lib/errors.js:7:26)
2020-01-31T15:32:56.190740+00:00 app[web.1]: at new MigrationsAreLockedError (/app/node_modules/knex-migrator/lib/errors.js:37:26)
2020-01-31T15:32:56.190744+00:00 app[web.1]: at /app/node_modules/knex-migrator/lib/locking.js:62:23
2020-01-31T15:32:56.190747+00:00 app[web.1]: at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
2020-01-31T15:32:56.190749+00:00 app[web.1]: at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
2020-01-31T15:32:56.190751+00:00 app[web.1]: at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
2020-01-31T15:32:56.190753+00:00 app[web.1]: at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
2020-01-31T15:32:56.190755+00:00 app[web.1]: at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
2020-01-31T15:32:56.190757+00:00 app[web.1]: at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
2020-01-31T15:32:56.190759+00:00 app[web.1]: at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
2020-01-31T15:32:56.190761+00:00 app[web.1]: at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
2020-01-31T15:32:56.190763+00:00 app[web.1]: at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
2020-01-31T15:32:56.190766+00:00 app[web.1]: at runCallback (timers.js:705:18)
2020-01-31T15:32:56.190768+00:00 app[web.1]: at tryOnImmediate (timers.js:676:5)
2020-01-31T15:32:56.190770+00:00 app[web.1]: at processImmediate (timers.js:658:5)
2020-01-31T15:32:56.204005+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-01-31T15:32:56.204791+00:00 app[web.1]: npm ERR! errno 1
2020-01-31T15:32:56.206872+00:00 app[web.1]: npm ERR! [email protected] start: `node server.js`
2020-01-31T15:32:56.207045+00:00 app[web.1]: npm ERR! Exit status 1
2020-01-31T15:32:56.207299+00:00 app[web.1]: npm ERR!
2020-01-31T15:32:56.207491+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2020-01-31T15:32:56.207677+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-01-31T15:32:56.214960+00:00 app[web.1]:
2020-01-31T15:32:56.215257+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-01-31T15:32:56.215509+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-01-31T15_32_56_208Z-debug.log
2020-01-31T15:32:56.290557+00:00 heroku[web.1]: State changed from starting to crashed
2020-01-31T15:32:56.274438+00:00 heroku[web.1]: Process exited with status 1
2020-01-31T15:33:50.515132+00:00 heroku[run.1545]: State changed from up to complete
2020-01-31T15:33:50.497811+00:00 heroku[run.1545]: Process exited with status 0
2020-01-31T15:33:50.779101+00:00 heroku[web.1]: State changed from crashed to starting
2020-01-31T15:33:58.401436+00:00 heroku[web.1]: Starting process with command `npm start --production`
2020-01-31T15:34:00.854807+00:00 app[web.1]:
2020-01-31T15:34:00.854852+00:00 app[web.1]: > [email protected] start /app
2020-01-31T15:34:00.854854+00:00 app[web.1]: > node server.js
2020-01-31T15:34:00.854856+00:00 app[web.1]:
2020-01-31T15:34:58.897123+00:00 heroku[web.1]: State changed from starting to crashed
2020-01-31T15:34:58.908347+00:00 heroku[web.1]: State changed from crashed to starting
2020-01-31T15:34:58.794280+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-01-31T15:34:58.794375+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-01-31T15:34:58.873568+00:00 heroku[web.1]: Process exited with status 137
2020-01-31T15:35:07.737593+00:00 heroku[web.1]: Starting process with command `npm start --production`
2020-01-31T15:35:10.754840+00:00 app[web.1]:
2020-01-31T15:35:10.754863+00:00 app[web.1]: > [email protected] start /app
2020-01-31T15:35:10.754865+00:00 app[web.1]: > node server.js
2020-01-31T15:35:10.754867+00:00 app[web.1]:
2020-01-31T15:36:08.129448+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-01-31T15:36:08.129503+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-01-31T15:36:08.245587+00:00 heroku[web.1]: State changed from starting to crashed
2020-01-31T15:36:08.224185+00:00 heroku[web.1]: Process exited with status 137

cacabo avatar Jan 31 '20 16:01 cacabo

@cacabo Looks like the database needs to be reset.

paulmelnikow avatar May 01 '20 23:05 paulmelnikow