nodebb does not work, i can not reset

Solved Technical Support
  • hi,

    nodebb does not work , example ; i can not create new topic button does not work, there is no edit buttons, themes does not load etc.

    i tried reset. but i got this error.

    [email protected]:/opt/nodebb# ./nodebb reset
    /opt/nodebb/node_modules/mongodb/lib/utils.js:123
    process.nextTick(function() { throw err; });
    ^TypeError: Invalid data, chunk must be a string or buffer, not function
    at WriteStream.Socket.write (net.js:654:11)
    at /opt/nodebb/src/reset.js:58:19
    at /opt/nodebb/src/database/mongo.js:108:5
    at /opt/nodebb/node_modules/mongodb/lib/db.js:1566:5
    at handleCallback (/opt/nodebb/node_modules/mongodb/lib/utils.js:120:56)
    at _callback (/opt/nodebb/node_modules/mongodb/lib/db.js:1482:5)
    at /opt/nodebb/node_modules/mongodb/lib/db.js:1525:7
    at /opt/nodebb/node_modules/mongodb-core/lib/connection/pool.js:736:7
    at /opt/nodebb/node_modules/mongodb-core/lib/connection/pool.js:714:11
    at finish (/opt/nodebb/node_modules/mongodb-core/lib/auth/scram.js:160:16)

    logs;

    [email protected]:/opt/nodebb# ./nodebb log

    Hit Ctrl-C to exit

    at ServerResponse.render (/opt/nodebb/node_modules/express/lib/response.js:971:7)
    at content (/opt/nodebb/src/middleware/render.js:70:15)
    at /opt/nodebb/node_modules/async/dist/async.js:3830:24
    at replenish (/opt/nodebb/node_modules/async/dist/async.js:946:17)
    at /opt/nodebb/node_modules/async/dist/async.js:950:9
    at eachOfLimit (/opt/nodebb/node_modules/async/dist/async.js:975:24)
    at /opt/nodebb/node_modules/async/dist/async.js:980:16
    at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1051:5)
    at _parallel (/opt/nodebb/node_modules/async/dist/async.js:3829:5)
    at Object.parallelLimit [as parallel] (/opt/nodebb/node_modules/async/dist/async.js:3912:5)
    

    EDIT: Now i can not logis as admin , it says Forbidden.

    chrome console;
    Uncaught SyntaxError: missing ) after argument list
    acp.min.js:9 Uncaught ReferenceError: config is not defined
    at acp.min.js:9
    acp.min.js:2 jQuery.Deferred exception: Cannot read property 'logout' of undefined TypeError: Cannot read property 'logout' of undefined
    at HTMLDocument.<anonymous> (http://mydomain/assets/src/admin/admin.js?v=3mtr5v3lv2h:42:44)
    at c (http://mydomain/assets/acp.min.js?v=3mtr5v3lv2h:1:31427)
    at u (http://mydomain/assets/acp.min.js?v=3mtr5v3lv2h:1:31766) undefined
    v.Deferred.exceptionHook @ acp.min.js:2
    acp.min.js:2 Uncaught TypeError: Cannot read property 'logout' of undefined
    at HTMLDocument.<anonymous> (admin.js:42)
    at c (acp.min.js:1)
    at u (acp.min.js:1)
    ace.js Failed to load resource: the server responded with a status of 404 (Not Found)
    acp.min.js:9 Uncaught Error: Script error for "ace/ace"

    at F (acp.min.js:9)
    at HTMLScriptElement.onScriptError (acp.min.js:9)
    mousetrap.js Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    acp.min.js:9 Uncaught Error: Script error for "mousetrap"
    http://requirejs.org/docs/errors.html#scripterror
    at F (acp.min.js:9)
    at HTMLScriptElement.onScriptError (acp.min.js:9)
    instance.js Failed to load resource: the server responded with a status of 404 (Not Found)
    acp.min.js:9 Uncaught Error: Script error for "admin/modules/instance"
    http://requirejs.org/docs/errors.html#scripterror
    at F (acp.min.js:9)
    at HTMLScriptElement.onScriptError (acp.min.js:9)
    search.js Failed to load resource: the server responded with a status of 404 (Not Found)
    acp.min.js:9 Uncaught Error: Script error for "admin/modules/search"
    http://requirejs.org/docs/errors.html#scripterror
    at F (acp.min.js:9)
    at HTMLScriptElement.onScriptError (acp.min.js:9)

    thanks.

  • Try ./nodebb build and if that doesn't work, try ./nodebb reset -a. You can use ./nodebb help reset to view all options.

  • @PitaJ said in nodebb does not work, i can not reset:

    ./nodebb help reset

    thanks @PitaJ

    i tried. but i cannot login as Admin . it says Forbidden.

  • i installed again with mongo but same problem. buttons does not work and it says always Checking for installed themes... i do not understand why ?

  • @atozsoft I think I had this issue on my first attemp on nodebb. If I remeber correctly, it had something to do with mongo and config.json.

  • @evoixmr said in nodebb does not work, i can not reset:

    @atozsoft I think I had this issue on my first attemp on nodebb. If I remeber correctly, it had something to do with mongo and config.json.

    please remember it 😃

  • @atozsoft Is your mongo setup correctly? Can you post your config.json? just X-out the user/password.

  • i think it is not about config. i installed maybe 20 times. result is same. now there is more errors in admin error log.

    these are 404 errors.

    /forum/footer.js 13
    /admin/appearance/ace/ace.js 3
    /admin/appearance/admin/modules/instance.js 3
    /admin/appearance/admin/modules/search.js 3
    /topic/3/evliya-%C3%A7elebi-nin-anlat%C4%B1m%C4%B1yla-erzurum/forum/footer.js 2
    /category/32/forum/footer.js 2
    /category/6/forum/footer.js 2
    /topic/3/forum/footer.js 2
    /topic/1/welcome-to-your-nodebb/forum/footer.js 2
    /category/2/forum/footer.js 2
    /about 1
    /category/21/forum/footer.js 1
    /category/18/forum/footer.js 1
    /category/11/forum/footer.js 1
    /category/25/forum/footer.js 1
    /user 1
    /category/9/forum/footer.js 1
    /category/10/forum/footer.js 1
    /category/35/forum/footer.js 1
    /category/15/forum/footer.js 1
    /category/12/forum/footer.js 1
    /category/31/forum/footer.js 1
    /category/26/forum/footer.js 1
    /category/5/forum/footer.js

    config.
    {
    "url": "http://xxxxxxxx",
    "secret": "axxxxxxxxxxxxxxxxxx-231e7xxxx7cc2",
    "database": "mongo",
    "mongo": {
    "host": "127.0.0.1",
    "port": "27017",
    "username": "xxxxx",
    "password": "xxxxx",
    "database": "xxxxxxx"
    }
    }

    i want to use this software but it crashes always. i dont know where i do mistake.

    ./nodebb dev result

    22/5 17:59:53 [2646] - error: Error: listen EADDRINUSE 0.0.0.0:4567
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at Server._listen2 (net.js:1258:14)
    at listen (net.js:1294:10)
    at net.js:1404:9
    at _combinedTickCallback (internal/process/next_tick.js:83:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
    22/5 17:59:53 [2646] - error: NodeBB address in use, exiting...
    3 restarts in 10 seconds, most likely an error on startup. Halting.

  • That ./nodebb dev error is because NodeBB is already running. You have to ./nodebb stop first

  • @PitaJ thanks.

    after stop. dev results

    22/5 18:08:39 [2742] - error: /admin/appearance/mousetrap.js
    Error: Cannot find module 'js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at new View (/var/nodebb/node_modules/express/lib/view.js:80:30)
    at EventEmitter.render (/var/nodebb/node_modules/express/lib/application.js:570:12)
    at ServerResponse.render (/var/nodebb/node_modules/express/lib/response.js:971:7)
    at content (/var/nodebb/src/middleware/render.js:70:15)
    at /var/nodebb/node_modules/async/dist/async.js:3830:24
    at replenish (/var/nodebb/node_modules/async/dist/async.js:946:17)
    at /var/nodebb/node_modules/async/dist/async.js:950:9
    at eachOfLimit (/var/nodebb/node_modules/async/dist/async.js:975:24)
    at /var/nodebb/node_modules/async/dist/async.js:980:16
    at eachOf (/var/nodebb/node_modules/async/dist/async.js:1051:5)
    at _parallel (/var/nodebb/node_modules/async/dist/async.js:3829:5)
    at Object.parallelLimit [as parallel] (/var/nodebb/node_modules/async/dist/async.js:3912:5)
    22/5 18:08:44 [2742] - error: /admin/appearance/mousetrap.js
    Error: Cannot find module 'js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at new View (/var/nodebb/node_modules/express/lib/view.js:80:30)
    at EventEmitter.render (/var/nodebb/node_modules/express/lib/application.js:570:12)
    at ServerResponse.render (/var/nodebb/node_modules/express/lib/response.js:971:7)
    at content (/var/nodebb/src/middleware/render.js:70:15)
    at /var/nodebb/node_modules/async/dist/async.js:3830:24
    at replenish (/var/nodebb/node_modules/async/dist/async.js:946:17)
    at /var/nodebb/node_modules/async/dist/async.js:950:9
    at eachOfLimit (/var/nodebb/node_modules/async/dist/async.js:975:24)
    at /var/nodebb/node_modules/async/dist/async.js:980:16
    at eachOf (/var/nodebb/node_modules/async/dist/async.js:1051:5)
    at _parallel (/var/nodebb/node_modules/async/dist/async.js:3829:5)
    at Object.parallelLimit [as parallel] (/var/nodebb/node_modules/async/dist/async.js:3912:5)

  • @atozsoft have you tried disabling all plugins with ./nodebb reset -p? That's not the entire dev log, can you get it all?

    What version of Node.js are you using? Have you tried re-running npm install? What kind of vps do you have? We need as much information as you can give us because I've never seen this before.

  • i will try. node:6.10.3 . ubuntu 16.04 on aws. 1 gb ram. 8 gb ssd.

  • @atozsoft try either increasing the memory or adding a fairly large swap partition (~ 2 GB). This could have been caused by the npm install failing due to it running out of memory.

  • @PitaJ thank you. i will try more ram.

    i tried ./nodebb reset -p and npm install . now i can not login, got forbidden error. 😢

  • @PitaJ tried with 2gb ram. same result.

  • @atozsoft what did you try with 2gb ram? Does npm install complete successfully? What does your terminal look like?

  • @PitaJ fresh install. i used this tutarial for node. https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04

    but, not succefful
    npm install not succesfull.

    npm : Depends: nodejs but it is not going to be installed
    Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
    Depends: node-ansi (>= 0.3.0-2) but it is not going to be installed
    Depends: node-ansi-color-table but it is not going to be installed
    Depends: node-archy but it is not going to be installed
    Depends: node-block-stream but it is not going to be installed
    Depends: node-fstream (>= 0.1.22) but it is not going to be installed
    Depends: node-fstream-ignore but it is not going to be installed
    Depends: node-github-url-from-git but it is not going to be installed
    Depends: node-glob (>= 3.1.21) but it is not going to be installed
    Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
    Depends: node-inherits but it is not going to be installed
    Depends: node-ini (>= 1.1.0) but it is not going to be installed
    Depends: node-lockfile but it is not going to be installed
    Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
    Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
    Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
    Depends: node-gyp (>= 0.10.9) but it is not going to be installed
    Depends: node-nopt (>= 3.0.1) but it is not going to be installed
    Depends: node-npmlog but it is not going to be installed
    Depends: node-once but it is not going to be installed
    Depends: node-osenv but it is not going to be installed
    Depends: node-read but it is not going to be installed
    Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
    Depends: node-request (>= 2.25.0) but it is not going to be installed
    Depends: node-retry but it is not going to be installed
    Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
    Depends: node-semver (>= 2.1.0) but it is not going to be installed
    Depends: node-sha but it is not going to be installed
    Depends: node-slide but it is not going to be installed
    Depends: node-tar (>= 0.1.18) but it is not going to be installed
    Depends: node-underscore but it is not going to be installed
    Depends: node-which but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

  • @atozsoft is that on apt-get install npm or what?

  • @PitaJ yes same command but it gives above error.

  • In https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04 there are several different possibilities given for installing node. Which did you use?


Suggested Topics