FAQ
I'm having a weird issue trying to push a node.js app to a vcap
environment. Everything works fine until the app is started, where I
get:


Uploading (119K): OK
Push Status: OK
Stopping Application 'fs': OK
Staging Application 'fs':
OK
Starting Application 'fs': ................
Error: Application [fs] failed to start, logs information below.

====> /logs/stderr.log <====

DEBUG: {}

====> /logs/stdout.log <====

2012-06-06T05:39:29.874Z - info: [/app.js] START
server listening xx.xx.xx.xx:49107


So my app is starting successfully, and happily listening on a port
assigned by vcap, but for some reason the dea doesn't think it
started. Can anyone point me in the right direction for debugging this
issue? Thanks!

Search Discussions

  • Asta Xie at Jun 6, 2012 at 6:38 am
    yestoday i have the same problem. I push ruby demo apps and php demo apps.
    all apps get errors as you figure out

    ---------- Forwarded message ----------
    From: conorcurlett <conorcurlett@gmail.com>
    Date: Wed, Jun 6, 2012 at 2:00 PM
    Subject: [vcap-dev] Node.js app "failing to start"
    To: vcap-dev <vcap-dev@cloudfoundry.org>


    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:


    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.

    ====> /logs/stderr.log <====

    DEBUG: {}

    ====> /logs/stdout.log <====

    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107


    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Jesse Zhang at Jun 6, 2012 at 8:07 am
    Did you have the crashes log? It could well be that an app lived only long
    enough to write a log line announcement.
    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett wrote:

    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:


    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.

    ====> /logs/stderr.log <====

    DEBUG: {}

    ====> /logs/stdout.log <====

    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107


    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Conorcurlett at Jun 8, 2012 at 12:08 am
    I'm exposing my ignorance here a little, but I'm not sure where to
    find the "crashes" log? Some cursory googling isn't bringing much up
    either.
    On Jun 6, 6:07 pm, Jesse Zhang wrote:
    Did you have the crashes log? It could well be that an app lived only long
    enough to write a log line announcement.

    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett wrote:






    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:
    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.
    ====> /logs/stderr.log <====
    DEBUG: {}
    ====> /logs/stdout.log <====
    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107
    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Conorcurlett at Jun 8, 2012 at 12:20 am
    Further information: the dea.log provides the following:

    [2012-06-08 00:17:19.425502] dea - pid=13452 tid=15ae fid=f561 WARN
    -- Giving up on connecting app.
    [2012-06-08 00:17:19.457440] dea - pid=13452 tid=15ae fid=f561 DEBUG
    -- Sent droplet.exited {"droplet":
    6,"version":"30c23a7a28d044b7cd3bc4d80e93134e6903d401-1","instance":"45a9a893017f7f666bd1b807c1f18247","index":
    0,"reason":"CRASHED","crash_timestamp":1339114639}
    [2012-06-08 00:17:19.457705] dea - pid=13452 tid=15ae fid=f561 INFO
    -- Stopping instance (name=fs app_id=6
    instance=45a9a893017f7f666bd1b807c1f18247 index=0)
    [2012-06-08 00:17:19.457880] dea - pid=13452 tid=15ae fid=f561 DEBUG
    -- Executing stop script: '/var/vcap.local/dea/apps/
    fs-0-45a9a893017f7f666bd1b807c1f18247/stop 20373 2> /dev/null',
    instance state is CRASHED
    [2012-06-08 00:17:19.458049] dea - pid=13452 tid=15ae fid=f561 DEBUG
    -- Stopping instance PID:20373
    [2012-06-08 00:17:19.499895] dea - pid=13452 tid=15ae fid=f561 DEBUG
    -- fs: Chowning crashed dir /var/vcap.local/dea/apps/
    fs-0-45a9a893017f7f666bd1b807c1f18247
    Killed
    [2012-06-08 00:17:19.516650] dea - pid=13452 tid=15ae fid=f561 INFO
    -- fs completed running with status = pid 20370 exit 137.
    [2012-06-08 00:17:19.516971] dea - pid=13452 tid=15ae fid=f561 INFO
    -- fs uptime was 62.631628467.


    ... which seems to imply that the node app isn't sending some critical
    signal to the dea that it has successfully started?
    On Jun 8, 10:07 am, conorcurlett wrote:
    I'm exposing my ignorance here a little, but I'm not sure where to
    find the "crashes" log? Some cursory googling isn't bringing much up
    either.

    On Jun 6, 6:07 pm, Jesse Zhang wrote:






    Did you have the crashes log? It could well be that an app lived only long
    enough to write a log line announcement.
    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett wrote:

    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:
    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.
    ====> /logs/stderr.log <====
    DEBUG: {}
    ====> /logs/stdout.log <====
    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107
    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Maria Shaldibina at Jun 6, 2012 at 5:52 pm
    Do you write that log after listening event was fired?

    http://nodejs.org/api/net.html#net_event_listening

    If you bind your server to "error" event what message do you get?
    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett wrote:

    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:


    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.

    ====> /logs/stderr.log <====

    DEBUG: {}

    ====> /logs/stdout.log <====

    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107


    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Conorcurlett at Jun 8, 2012 at 12:06 am
    Yeah, the log is written by

    socket.on("listening", function () {
    var address = socket.address();
    console.log("server listening " +
    address.address + ":" + address.port);
    });

    I added
    socket.on("error", function(err){
    console.log("Socket error! " + err);
    });

    Which produced no log message. As far as I can tell, node thinks its
    all copacetic, but vcap doesn't.
    On Jun 7, 3:51 am, Maria Shaldibina wrote:
    Do you write that log after listening event was fired?

    http://nodejs.org/api/net.html#net_event_listening

    If you bind your server to "error" event what message do you get?

    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett wrote:






    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:
    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.
    ====> /logs/stderr.log <====
    DEBUG: {}
    ====> /logs/stdout.log <====
    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107
    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Maria Shaldibina at Jun 8, 2012 at 1:11 am
    You need to have a server (not socket) that listens on
    process.env.VCAP_APP_PORT.
    On Thu, Jun 7, 2012 at 5:06 PM, conorcurlett wrote:

    Yeah, the log is written by

    socket.on("listening", function () {
    var address = socket.address();
    console.log("server listening " +
    address.address + ":" + address.port);
    });

    I added
    socket.on("error", function(err){
    console.log("Socket error! " + err);
    });

    Which produced no log message. As far as I can tell, node thinks its
    all copacetic, but vcap doesn't.
    On Jun 7, 3:51 am, Maria Shaldibina wrote:
    Do you write that log after listening event was fired?

    http://nodejs.org/api/net.html#net_event_listening

    If you bind your server to "error" event what message do you get?

    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett <conorcurl...@gmail.com
    wrote:






    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:
    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.
    ====> /logs/stderr.log <====
    DEBUG: {}
    ====> /logs/stdout.log <====
    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107
    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!
  • Conorcurlett at Jun 12, 2012 at 1:48 am
    Yep, that'll do it, thanks!
    On Jun 8, 11:11 am, Maria Shaldibina wrote:
    You need to have a server (not socket) that listens on
    process.env.VCAP_APP_PORT.






    On Thu, Jun 7, 2012 at 5:06 PM, conorcurlett wrote:
    Yeah, the log is written by
    socket.on("listening", function () {
    var address = socket.address();
    console.log("server listening " +
    address.address + ":" + address.port);
    });
    I added
    socket.on("error", function(err){
    console.log("Socket error! " + err);
    });
    Which produced no log message. As far as I can tell, node thinks its
    all copacetic, but vcap doesn't.
    On Jun 7, 3:51 am, Maria Shaldibina wrote:
    Do you write that log after listening event was fired?
    If you bind your server to "error" event what message do you get?
    On Tue, Jun 5, 2012 at 11:00 PM, conorcurlett <conorcurl...@gmail.com
    wrote:
    I'm having a weird issue trying to push a node.js app to a vcap
    environment. Everything works fine until the app is started, where I
    get:
    Uploading (119K): OK
    Push Status: OK
    Stopping Application 'fs': OK
    Staging Application 'fs':
    OK
    Starting Application 'fs': ................
    Error: Application [fs] failed to start, logs information below.
    ====> /logs/stderr.log <====
    DEBUG: {}
    ====> /logs/stdout.log <====
    2012-06-06T05:39:29.874Z - info: [/app.js] START
    server listening xx.xx.xx.xx:49107
    So my app is starting successfully, and happily listening on a port
    assigned by vcap, but for some reason the dea doesn't think it
    started. Can anyone point me in the right direction for debugging this
    issue? Thanks!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupvcap-dev @
postedJun 6, '12 at 6:00a
activeJun 12, '12 at 1:48a
posts9
users4

People

Translate

site design / logo © 2022 Grokbase