• Whenever I return to my workspace after my application has hibernated, NodeBB stops working. I tried doing ./nodebb start but nothing happens. When I run ./nodebb log I get this error:

    9/5 06:58 [1369] - info: Initializing NodeBB v1.0.3
    9/5 06:58 [1369] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: connect ECONNREFUSED
    9/5 06:58 [1369] - error: Error: connect ECONNREFUSED
        at Object.exports._errnoException (util.js:870:11)
        at exports._exceptionWithHostPort (util.js:893:20)
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
    [cluster] Child Process (1369) has exited (code: 0, signal: null)

  • did you restart the mongo database that got terminated when the workspace got hibernated?

  • @accalia No. How do you do that?

  • same way you started it in the first place:

    $> mongod --bind_ip=$IP --nojournal

    or if you want it to detach from your terminal (instead of making you open a new one)

    $> mongod --bind_ip=$IP --nojournal &>/dev/null &

  • @accalia For some reason it gives me this error:

    Error parsing command line: unknown option small
    try 'mongod --help' for more information

    I also didn't use the tutorial in the docs, I used the one here.

  • And this error I've got when I did ./mongod &

    2016-05-09T14:43:06.142+0000 ** WARNING: --rest is specified without --httpinterface,
    2016-05-09T14:43:06.142+0000 **          enabling http interface
    warning: bind_ip of is unnecessary; listens on all ips by default
    2016-05-09T14:43:06.155+0000 [initandlisten] MongoDB starting : pid=8240 port=27017 dbpath=data 64-bit host=nsjohanness-nodebb-3124445
    2016-05-09T14:43:06.155+0000 [initandlisten] db version v2.6.12
    2016-05-09T14:43:06.155+0000 [initandlisten] git version: d73c92b1c85703828b55c2916a5dd4ad46535f6a
    2016-05-09T14:43:06.155+0000 [initandlisten] build info: Linux build5.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
    2016-05-09T14:43:06.155+0000 [initandlisten] allocator: tcmalloc
    2016-05-09T14:43:06.155+0000 [initandlisten] options: { net: { bindIp: "", http: { RESTInterfaceEnabled: true, enabled: true } }, storage: { dbPath: "data", journal: { enabled: false } } }
    Unclean shutdown detected.
    Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
    2016-05-09T14:43:06.163+0000 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
    2016-05-09T14:43:06.164+0000 [initandlisten] dbexit: 
    2016-05-09T14:43:06.164+0000 [initandlisten] shutdown: going to close listening sockets...
    2016-05-09T14:43:06.164+0000 [initandlisten] shutdown: going to flush diaglog...
    2016-05-09T14:43:06.164+0000 [initandlisten] shutdown: going to close sockets...
    2016-05-09T14:43:06.164+0000 [initandlisten] shutdown: waiting for fs preallocator...
    2016-05-09T14:43:06.164+0000 [initandlisten] shutdown: closing all files...
    2016-05-09T14:43:06.164+0000 [initandlisten] closeAllFiles() finished
    2016-05-09T14:43:06.164+0000 [initandlisten] dbexit: really exiting now

  • OK, so here is what happened.

    For some reason, the 'data' directory I created was removed when the application hibernated, I had to run all the mongodb commands again. I also had to start ./nodebb setup again and when I looked at the forum , all the data was gone and looked like this

  • @Aureney cloud 9 made a lot of changes to how things run on their workspaces after I created that tutotial. Will try to update the tutorial with latest commands when I find some time.

  • @Aureney it's not removing the .lock file when it's going to hibernate.

    do this...

    $ rm data/mongod.lock

    and then run ./mongod &

Suggested Topics

| | | |