heroku / vulcan

A build server in the cloud.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web app crashes immediately

ariofrio opened this issue · comments

A bit after doing vulcan create, I look at the logs using heroku logs and this is what I see:

I've seen both:

2012-04-18T23:44:31+00:00 app[web.1]: undefined:0
2012-04-18T23:44:31+00:00 app[web.1]:
2012-04-18T23:44:31+00:00 app[web.1]: ^
2012-04-18T23:44:31+00:00 app[web.1]: SyntaxError: Unexpected end of input
2012-04-18T23:44:31+00:00 app[web.1]: at Object.parse (native)
2012-04-18T23:44:31+00:00 app[web.1]: at /app/web.js:56:28

And:

2012-04-18T23:41:38+00:00 app[web.1]:
2012-04-18T23:41:38+00:00 app[web.1]: node.js:201
2012-04-18T23:41:38+00:00 app[web.1]: throw e; // process.nextTick error, or 'error' event on first tick
2012-04-18T23:41:38+00:00 app[web.1]: ^
2012-04-18T23:41:38+00:00 app[web.1]: TypeError: Parameter 'url' must be a string, not undefined
2012-04-18T23:41:38+00:00 app[web.1]: at Object.urlParse as parse
2012-04-18T23:41:38+00:00 app[web.1]: at Object. (/app/web.js:24:34)
2012-04-18T23:41:38+00:00 app[web.1]: at Module._compile (module.js:441:26)
2012-04-18T23:41:38+00:00 app[web.1]: at Object..js (module.js:459:10)
2012-04-18T23:41:38+00:00 app[web.1]: at Module.load (module.js:348:31)
2012-04-18T23:41:38+00:00 app[web.1]: at Function._load (module.js:308:12)
2012-04-18T23:41:38+00:00 app[web.1]: at Array.0 (module.js:479:10)
2012-04-18T23:41:38+00:00 app[web.1]: at EventEmitter._tickCallback (node.js:192:40)

This error probably means that your account is not verified and you were unable to add the cloudant addon. You can try manually doing heroku addons:add cloudant -a YOUR_VULCAN_APP_NAME. I'll make this error more obvious.

My account is verified. When I run heroku addons:add cloudant -a YOUR_VULCAN_APP_NAME, I get this:

-----> Adding cloudant to MY_VULCAN_APP_NAME... failed
! Add-on already installed

For some reason it thinks your CLOUDANT_URL is invalid:

https://github.com/heroku/vulcan/blob/master/server/web.js#L24

Having the same issue

$ heroku addons:add cloudant -a MY_VULCAN_APP_NAME
----> Adding cloudant to MY_VULCAN_APP_NAME... failed
 !    Add-on already installed

2012-05-08T13:29:59+00:00 heroku[web.1]: State changed from created to starting
2012-05-08T13:30:03+00:00 heroku[web.1]: Starting process with command `node web.js`
2012-05-08T13:30:04+00:00 app[web.1]: listening on port 48528
2012-05-08T13:30:05+00:00 heroku[web.1]: State changed from starting to up
2012-05-08T13:45:56+00:00 app[web.1]: 
2012-05-08T13:45:56+00:00 app[web.1]: undefined:0
2012-05-08T13:45:56+00:00 app[web.1]: 
2012-05-08T13:45:56+00:00 app[web.1]: ^
2012-05-08T13:45:56+00:00 app[web.1]:     at Object.parse (native)
2012-05-08T13:45:56+00:00 app[web.1]: SyntaxError: Unexpected end of input
2012-05-08T13:45:56+00:00 app[web.1]:     at /app/web.js:56:28
2012-05-08T13:45:56+00:00 app[web.1]:     at IncomingForm.<anonymous> (/app/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js:117:9)
2012-05-08T13:45:56+00:00 app[web.1]:     at IncomingForm.emit (events.js:64:17)
2012-05-08T13:45:56+00:00 app[web.1]:     at IncomingForm._maybeEnd (/app/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js:373:8)
2012-05-08T13:45:56+00:00 app[web.1]:     at /app/node_modules/connect-form/node_modules/formidable/lib/file.js:59:5
2012-05-08T13:45:56+00:00 app[web.1]:     at /app/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js:207:12
2012-05-08T13:45:56+00:00 app[web.1]:     at Object.oncomplete (fs.js:1298:9)
2012-05-08T13:45:56+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST MY_VULCAN_APP_NAME.herokuapp.com/make dyno=web.1 queue= wait= service= status=503 bytes=

What command are you using to run vulcan?

For some reason it's choking on parsing your deps: https://github.com/heroku/vulcan/blob/master/server/web.js#L56

I can't seem to reproduce this locally. You could consider cloning your vulcan app locally and adding some debugging statements around the deps stuff to figure out what's going on.

Is it possible you're using an older version of vulcan to run vulcan build than you used to vulcan update ?

I have vulcan as installed with gem install vulcan. I'm running simply:

$ vulcan build -v -o $TEMPDIR/libgda-$LIBGDA_VERSION.tgz

so no deps provided in this case.

I made the following change:

    var deps = [];
    if (fields.deps) {
      deps    = JSON.parse(fields.deps);
    }

And now it seems to at least store to CouchDB:

2012-05-08T14:23:18+00:00 app[web.1]: f15986af-456f-4b21-be22-ecd6799a990a: saving to couchdb
2012-05-08T14:23:19+00:00 app[web.1]: f15986af-456f-4b21-be22-ecd6799a990a: saving attachment - [id:f15986af-456f-4b21-be22-ecd6799a990a, rev:1-1a95d156ffd7a1f5cd74e6b6d63469f4

If you submit that as a pull request, I'll merge and release a new version.

Released as vulcan 0.6.1, thanks!

My newly created vulcan server kept failing similarly to how this issue describes. After some digging in, I saw that heroku addons:add cloudant -a my-vulcan-server outputs:

Adding cloudant on vulcan-fusic... failed
 !    Could not create resource with vendor, please try again later

I'm guessing the issue is with cloudant, but I think vulcan should be able to better handle this condition and report it in a more meaningful manner than a traceback.