Forum stopped working after restart process



  • Everything was good until I've hit restart button from the admin panel. After that - this showed into log

    Error: misconfigured csrf
    at getsecret (/usr/share/nginx/html/nodebb/node_modules/csurf/index.js:195:11)
    at Object.csrf [as applyCSRF] (/usr/share/nginx/html/nodebb/node_modules/csurf/index.js:60:18)
    at Object.middleware.buildHeader (/usr/share/nginx/html/nodebb/src/middleware/header.js:23:14)
    at /usr/share/nginx/html/nodebb/src/routes/index.js:198:15
    at Layer.handle_error (/usr/share/nginx/html/nodebb/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/usr/share/nginx/html/nodebb/node_modules/express/lib/router/index.js:310:13)
    at /usr/share/nginx/html/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/usr/share/nginx/html/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/usr/share/nginx/html/nodebb/node_modules/express/lib/router/index.js:271:10)
    at Layer.handle_error (/usr/share/nginx/html/nodebb/node_modules/express/lib/router/layer.js:67:12)

    Other stuff when I performed upgrade from 0.9.3. to 1.0.0

    root@e-knigi /root/e-knigi# ./nodebb upgrade

    1. Bringing base dependencies up to date... OK

    2. Updating NodeBB data store schema.
      7/3 20:03 [32396] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: connect ECONNREFUSED
      7/3 20:03 [32396] - error: Error: connect ECONNREFUSED
      at errnoException (net.js:905:11)
      at Object.afterConnect [as oncomplete] (net.js:896:19)
      OK

                                                                                  NodeBB Upgrade Complete!
      

    root@e-knigi /root/e-knigi#

    After I've tried to start the process again - this is what I get:

    Clustering enabled: Spinning up 1 process(es).

    7/3 20:04 [32457] - info: Time: Mon Mar 07 2016 20:04:58 GMT+0000 (GMT)
    7/3 20:04 [32457] - info: Initializing NodeBB v0.9.3
    7**/3 20:04 [32457] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: connect ECONNREFUSED
    [cluster] Child Process (32457) has exited (code: 0, signal: null)
    7/3 20:04 [32457] - error: Error: connect ECONNREFUSED
    at errnoException (net.js:905:11)
    at Object.afterConnect [as oncomplete] (net.js:896:19)
    ^Croot@e-knigi /root/e-knigi# locate net.js**
    /root/.npm/natural/0.2.1/package/lib/natural/wordnet/wordnet.js
    /usr/share/nginx/html/nodebb/node_modules/natural/lib/natural/wordnet/wordnet.js

    Any suggestions ?


  • Anime Lovers

    Can you make sure that the mongodb process is running?



  • @HolyPhoenix said:

    Can you make sure that the mongodb process is running?

    Yes. I didn't realised the service was stopped..but why?

    Now I have this one. This one is killing me...

    7/3 20:09 [384] - info: Time: Mon Mar 07 2016 20:09:14 GMT+0000 (GMT)
    7/3 20:09 [384] - info: Initializing NodeBB v0.9.3
    7/3 20:09 [384] - info: [database] Checking database indices.
    [outdated] nodebb-plugin-dbsearch installed v0.3.0, package.json requires 0.3.1
    7/3 20:09 [384] - warn: One or more of NodeBB's dependent packages are out-of-date. Please run the following command to update them:
    7/3 20:09 [384] - warn: ./nodebb upgrade
    [cluster] Child Process (384) has exited (code: 0, signal: null)

    NO matter I use 0.3.1 of db-search plugin every time i have issues when I perform changes...


  • Anime Lovers

    I saw this when I first installed v1.0.0. Couldn't get it running. I fixed it the next day by doing a git fetch and running ./nodebb upgrade.

    You should probably make sure your database is backed up before doing so.



  • @HolyPhoenix said:

    I saw this when I first installed v1.0.0. Couldn't get it running. I fixed it the next day by doing a git fetch and running ./nodebb upgrade.

    You should probably make sure your database is backed up before doing so.

    Can you give me the exact commands for performing upgrade from 0.9.3 to 1.0.0 ? I will also need commands for exporting the mongodb database just in case :)


  • Anime Lovers

    Hmmm... I figured you already typed most of those in already.

    Instructions are here: https://docs.nodebb.org/en/latest/upgrading/index.html.

    If you've already pulled from the v1 repository just type (this will back up your database).

    mongodump

    cd into your directory then:

    git fetch
    ./nodebb upgrade

    If you didn't, I imagine the commands are (based on documentation above)

    git fetch # Grab the latest code from the NodeBB Repository
    git checkout v1.x.x
    git merge origin/v1.x.x
    ./nodebb upgrade


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.