You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I am attempting to set up the openKB app in my lab environment with MongoDB as my database. I can confirm when running with neDB configured it works wonderfully. However, when configured for MongoDB the app fails to start. MongoDB is running on a different server than the application.
After issuing npm start I get the following.
Console Output of npm start
cisco@php-test:~/openKB$ npm start
> [email protected] start /home/cisco/openKB
> node app.js
(node:4034703) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
TypeError: db.collection is not a function
at MongoClient.connect (/home/cisco/openKB/app.js:351:23)
at executeCallback (/home/cisco/openKB/node_modules/mongodb/lib/operations/execute_operation.js:74:5)
at err (/home/cisco/openKB/node_modules/mongodb/lib/operations/connect.js:210:7)
at connectCallback (/home/cisco/openKB/node_modules/mongodb/lib/operations/connect.js:375:5)
at server.connect (/home/cisco/openKB/node_modules/mongodb/lib/operations/connect.js:468:5)
at Server.connectHandler (/home/cisco/openKB/node_modules/mongodb/lib/topologies/server.js:291:9)
at Object.onceWrapper (events.js:286:20)
at Server.emit (events.js:198:13)
at Pool.<anonymous> (/home/cisco/openKB/node_modules/mongodb/lib/core/topologies/server.js:384:12)
at Pool.emit (events.js:198:13)
clean
/home/cisco/openKB/app.js:375
app.db.close();
^
TypeError: Cannot read property 'close' of undefined
at exitHandler (/home/cisco/openKB/app.js:375:20)
at process.emit (events.js:198:13)
at process.exit (internal/process/per_thread.js:168:15)
at exitHandler (/home/cisco/openKB/app.js:382:17)
at process.emit (events.js:203:15)
at process._fatalException (internal/bootstrap/node.js:497:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/cisco/.npm/_logs/2021-09-22T18_43_49_637Z-debug.log
cisco@php-test:~/openKB$
Hello I am attempting to set up the openKB app in my lab environment with MongoDB as my database. I can confirm when running with neDB configured it works wonderfully. However, when configured for MongoDB the app fails to start. MongoDB is running on a different server than the application.
After issuing npm start I get the following.
Console Output of npm start
Config.json
Can share my app.json, but no changes were made other than adding AppDynamics APM agent.
The text was updated successfully, but these errors were encountered: