nodebb + passenger = lack of cooperation



  • When I run NodeBB without passanger using reserved port everything is OK. There is problem when Passenger is involved.

    My configuration:

    Passenger v5.0.30
    Node.js v4.7.2
    OS: FreeBSD 10.3-STABLE

    nodeBB version:
    git clone -b v1.x.x https://github.com/NodeBB/NodeBB.git
    Configured using ./nodebb Set up for use of MongoDB.

    Problem:
    After I try to load page I get error page from Passanger and nodeBB is not loading

    In errorlog

    17/3 15:34:42 [92102] - �[32minfo�[39m: NodeBB v1.4.5 Copyright (C) 2013-2017 NodeBB Inc.
    17/3 15:34:42 [92102] - �[32minfo�[39m: This program comes with ABSOLUTELY NO WARRANTY.
    17/3 15:34:42 [92102] - �[32minfo�[39m: This is free software, and you are welcome to redistribute it under certain conditions.
    17/3 15:34:42 [92102] - �[32minfo�[39m:
    17/3 15:34:42 [92102] - �[32minfo�[39m: Time: Fri Mar 17 2017 15:34:42 GMT+0100 (CET)
    17/3 15:34:42 [92102] - �[32minfo�[39m: Initializing NodeBB v1.4.5
    Error: Cannot find module './node_modules/mongodb/package.json'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at module.checkCompatibility (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/database/mongo.js:171:31)
    at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:760:23
    at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:166:37
    at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:718:13
    at async.forEachOf.async.eachOf (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:233:13)
    at _parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:717:9)
    at Object.async.parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:731:9)

    After I edit:
    /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/database/mongo.js
    kine number: 171
    Substitution of:
    var mongoPkg = require.main.require('./node_modules/mongodb/package.json');
    to:
    var mongoPkg = require.main.require('/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/mongodb/package.json');
    Page is loading but does not have full functionality (e.g. I can't post to the forum).

    Now inside log file:

    App 9980 stdout:
    App 9980 stdout: 17/3 15:42:41 [9980] - info: NodeBB v1.4.5 Copyright (C) 2013-2017 NodeBB Inc.
    App 9980 stdout: 17/3 15:42:41 [9980] - info: This program comes with ABSOLUTELY NO WARRANTY.
    App 9980 stdout: 17/3 15:42:41 [9980] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    App 9980 stdout: 17/3 15:42:41 [9980] - info:
    App 9980 stdout: 17/3 15:42:41 [9980] - info: Time: Fri Mar 17 2017 15:42:41 GMT+0100 (CET)
    App 9980 stdout: 17/3 15:42:41 [9980] - info: Initializing NodeBB v1.4.5
    App 9980 stdout: 17/3 15:42:43 [9980] - info: [socket.io] Restricting access to origin: http://nodebb.somesite.net😘
    App 9980 stdout: 17/3 15:42:43 [9980] - warn: [plugins] Unable to parse library for: nodebb-plugin-composer-default
    App 9980 stdout: 17/3 15:42:43 [9980] - warn: [plugins] Unable to parse library for: nodebb-theme-persona
    App 9980 stderr: 17/3 15:42:43 [9980] - error: Error: Cannot find module './src/socket.io/plugins'
    App 9980 stderr: at Function.Module._resolveFilename (module.js:325:15)
    App 9980 stderr: at Function.Module._load (module.js:276:25)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-composer-default/library.js:10:31)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.Plugins.requireLibrary (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins.js:40:33)
    App 9980 stderr: at registerHooks (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:138:13)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:81:6
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:718:13
    App 9980 stderr: at async.forEachOf.async.eachOf (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:233:13)
    App 9980 stderr: at _parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:717:9)
    App 9980 stderr: at Object.async.parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:731:9)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:79:10
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:346:4
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:726:13
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:52:16
    App 9980 stderr: at done (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:246:17)
    App 9980 stderr: 17/3 15:42:43 [9980] - error: Error: Cannot find module 'string'
    App 9980 stderr: at Function.Module._resolveFilename (module.js:325:15)
    App 9980 stderr: at Function.Module._load (module.js:276:25)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-theme-persona/library.js:3:22)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.Plugins.requireLibrary (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins.js:40:33)
    App 9980 stderr: at registerHooks (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:138:13)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:81:6
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:718:13
    App 9980 stderr: at async.forEachOf.async.eachOf (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:233:13)
    App 9980 stderr: at _parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:717:9)
    App 9980 stderr: at Object.async.parallel (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:731:9)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:79:10
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:346:4
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:726:13
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:52:16
    App 9980 stderr: at done (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:246:17)
    App 9980 stderr: 17/3 15:42:43 [9980] - error: Error: Cannot find module './src/groups'
    App 9980 stderr: at Function.Module._resolveFilename (module.js:325:15)
    App 9980 stderr: at Function.Module._load (module.js:276:25)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-rewards-essentials/lib/rewards.js:4:27)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stdout: 17/3 15:42:43 [9980] - warn: [plugins] Unable to parse library for: nodebb-rewards-essentials
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-rewards-essentials/library.js:10:18)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.Plugins.requireLibrary (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins.js:40:33)
    App 9980 stderr: at registerHooks (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:138:13)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:81:6
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:718:13
    App 9980 stderr: at async.forEachOf.async.eachOf (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:233:13)
    App 9980 stderr: 17/3 15:42:43 [9980] - error: Error: Cannot find module './src/settings'
    App 9980 stderr: at Function.Module._resolveFilename (module.js:325:15)
    App 9980 stderr: at Function.Module._load (module.js:276:25)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-emoji-extended/lib/settings.js:7:29)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-emoji-extended/lib/sets/active.js:6:16)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stdout: 17/3 15:42:43 [9980] - warn: [plugins] Unable to parse library for: nodebb-plugin-emoji-extended
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-emoji-extended/lib/sets/controller.js:3:14)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: 17/3 15:42:43 [9980] - error: Error: Cannot find module './src/meta'
    App 9980 stderr: at Function.Module._resolveFilename (module.js:325:15)
    App 9980 stderr: at Function.Module._load (module.js:276:25)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-emoji-one/lib/settings.js:6:25)
    App 9980 stdout: 17/3 15:42:43 [9980] - warn: [plugins] Unable to parse library for: nodebb-plugin-emoji-one
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.<anonymous> (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/nodebb-plugin-emoji-one/lib/controller.js:6:16)
    App 9980 stderr: at Module._compile (module.js:409:26)
    App 9980 stderr: at Object.Module._extensions..js (module.js:416:10)
    App 9980 stderr: at Module.load (module.js:343:32)
    App 9980 stderr: at Function.Module._load (module.js:300:12)
    App 9980 stderr: at Module.require (module.js:353:17)
    App 9980 stderr: at require (internal/module.js:12:17)
    App 9980 stderr: at Object.Plugins.requireLibrary (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins.js:40:33)
    App 9980 stderr: at registerHooks (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:138:13)
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/src/plugins/load.js:81:6
    App 9980 stderr: at /usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:718:13
    App 9980 stderr: at async.forEachOf.async.eachOf (/usr/home/someuser/domains/nodebb.somesite.net/public_nodejs/node_modules/async/lib/async.js:233:13)
    App 9980 stdout: 17/3 15:42:43 [9980] - info: Routes added
    App 9980 stdout: 17/3 15:42:43 [9980] - info: NodeBB Ready
    App 9980 stdout: 17/3 15:42:43 [9980] - info: Enabling 'trust proxy'
    App 9980 stdout: 17/3 15:42:43 [9980] - info: NodeBB is now listening on: 0.0.0.0:4567

    I do not have any problems with running other Node.js apps with use of Passenger. It seems like Node.js modules have some problems with loading full path.


Log in to reply
 


Star

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