Skip to content


Subversion checkout URL

You can clone with
Download ZIP


jitsu deploy reports 500 error, yet app is deployed #40

dominictarr opened this Issue · 5 comments

2 participants


two problems here:

# Usage is printed even though a valid command was entered.
# server returns 500, yet the app is deployed

info:   Welcome to Nodejitsu
info:   It worked if it ends with Nodejitsu ok
info:   Executing command deploy
info:   Authenticated as dominictarr
info:   Analyzing your application dependencies in server.js
warn:   Your package.json version will be incremented for you automatically.
warn:   About to write /home/dominic/source/dev/nodejitsu-tester/helloworld-fullstacktest/package.json
data:   {
data:       main: 'server.js',
data:       name: 'helloworld-fullstacktest',
data:       scripts: { start: 'server.js' },
data:       subdomain: 'helloworld-fullstacktest',
data:       version: '0.0.0-49'
data:   }
prompt: Is this ok? (yes): 
warn:   Creating new snapshot for version 0.0.0-49
info:   Done creating snapshot 0.0.0-49
info:   Updating application helloworld-fullstacktest
info:   Activating snapshot 0.0.0-49 for helloworld-fullstacktest
info:   Starting app helloworld-fullstacktest
help:   Usage:
help:   Deploys an application using the following steps:
help:     1. Creates the application (if necessary)
help:     2. Creates or validates the package.json
help:     3. Packages and creates a new snapshot
help:     4. Stops the application (if neccessary)
help:     5. Starts the application
help:   jitsu deploy
help:   jitsu apps deploy
error:  Error running command deploy
error:  Nodejitsu Error (500): Internal Server Error
warn:   Error returned from Nodejitsu
error:  Error: Attempt to start running application
error:      at /root/nodejitsu/lib/nodejitsu/resources/app/controller.js:282:23
error:      at /root/nodejitsu/lib/nodejitsu/resources/app/controller.js:255:5
error:      at /root/nodejitsu/vendor/resourcer/lib/resourcer/resource.js:147:21
error:      at loop (/root/nodejitsu/vendor/resourcer/lib/resourcer/resource.js:63:17)
error:      at Function.runAfterHooks (/root/nodejitsu/vendor/resourcer/lib/resourcer/resource.js:65:10)
error:      at /root/nodejitsu/vendor/resourcer/lib/resourcer/resource.js:144:22
error:      at Object.callback (/root/nodejitsu/vendor/resourcer/lib/resourcer/engines/database.js:39:21)
error:      at /root/nodejitsu/node_modules/cradle/lib/cradle.js:276:26
error:      at IncomingMessage.<anonymous> (/root/nodejitsu/node_modules/cradle/lib/cradle.js:214:72)
error:      at IncomingMessage.emit (events.js:81:20)
info:   Nodejitsu not ok

Did you try:

jitsu apps stop
jitsu apps start

Let me know the output there. Usage is shown whenever an error is returned, I agree this is a little clunky.


If you try to start or deploy an app that is already started, then you get an error.

If the app is stopped when you deploy or start then there will not be an error.

It should probably just say that the app is already started, or that it was stopped, deployed, and started.


@dominictarr This is unexpected. Checkout out apps.deploy:startApp(). We currently stop the application before trying to deploy it, so I'm unsure why you're getting this error. Can you investigate further?

@dominictarr dominictarr referenced this issue from a commit
@dominictarr dominictarr [fix] fix issue #40. some errors where introduced in 7087476 . existi…
…ng.state is deleted, so the branch which stops the app only when exiting.state === 'started' never gets executed.

okay, so basically the control flow in deploy has been broken in 7b23e4d

this section of code needs re-factoring. but there are no tests, at least the API client needs tests. will open another issue for that.

@dominictarr dominictarr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.