2020-11-05T11:12:23.117Z [4568/1522469] - error: uncaughtException: Collection already exists. NS: forum_bb.socket.io
MongoError: Collection already exists. NS: forum_bb.socket.io
at MessageStream.messageHandler (/public_html/nodebb/node_modules/mongodb/lib/cmap/connection.js:268:20)
at MessageStream.emit (events.js:314:20)
at processIncomingData (/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
at MessageStream._write (/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)
at MessageStream.Writable.write (_stream_writable.js:318:11)
at Socket.ondata (_stream_readable.js:719:22)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:298:12) {"error":{"ok":0,"code":48,"codeName":"NamespaceExists","name":"MongoError"},"stack":"MongoError: Collection already exists. NS: forum_bb.socket.io\n at MessageStream.messageHandler (/public_html/nodebb/node_modules/mongodb/lib/cmap/connection.js:268:20)\n at MessageStream.emit (events.js:314:20)\n at processIncomingData (/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:144:12)\n at MessageStream._write (/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:42:5)\n at doWrite (_stream_writable.js:403:12)\n at writeOrBuffer (_stream_writable.js:387:5)\n at MessageStream.Writable.write (_stream_writable.js:318:11)\n at Socket.ondata (_stream_readable.js:719:22)\n at Socket.emit (events.js:314:20)\n at addChunk (_stream_readable.js:298:12)","exception":true,"date":"Thu Nov 05 2020 11:12:23 GMT+0000 (Coordinated Universal Time)","process":{"pid":1522469,"uid":1001,"gid":1001,"cwd":"/public_html/nodebb","execPath":"/usr/bin/node","version":"v12.19.0","argv":["/usr/bin/node","/public_html/nodebb/app.js"],"memoryUsage":{"rss":148234240,"heapTotal":102612992,"heapUsed":75559232,"external":20261562,"arrayBuffers":18742940}},"os":{"loadavg":[0.82,0.9,0.53],"uptime":1094243},"trace":[{"column":20,"file":"/public_html/nodebb/node_modules/mongodb/lib/cmap/connection.js","function":"MessageStream.messageHandler","line":268,"method":"messageHandler","native":false},{"column":20,"file":"events.js","function":"MessageStream.emit","line":314,"method":"emit","native":false},{"column":12,"file":"/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js","function":"processIncomingData","line":144,"method":null,"native":false},{"column":5,"file":"/public_html/nodebb/node_modules/mongodb/lib/cmap/message_stream.js","function":"MessageStream._write","line":42,"method":"_write","native":false},{"column":12,"file":"_stream_writable.js","function":"doWrite","line":403,"method":null,"native":false},{"column":5,"file":"_stream_writable.js","function":"writeOrBuffer","line":387,"method":null,"native":false},{"column":11,"file":"_stream_writable.js","function":"MessageStream.Writable.write","line":318,"method":"write","native":false},{"column":22,"file":"_stream_readable.js","function":"Socket.ondata","line":719,"method":"ondata","native":false},{"column":20,"file":"events.js","function":"Socket.emit","line":314,"method":"emit","native":false},{"column":12,"file":"_stream_readable.js","function":"addChunk","line":298,"method":null,"native":false}]}
Might be related to #8815.
Try running npm install and then ./nodebb upgrade
Try running npm install and then ./nodebb upgrade
tried same issue
any idea as this forum is running in production and down for 5+ hrs now, can we resolve it quickly or wait for the next release ?
What are the versions of these dependencies on your install?
"@nodebb/mubsub": "1.7.0",
"@nodebb/socket.io-adapter-mongo": "3.1.0",
$ npm list | grep mubsub
├─┬ @nodebb/[email protected]
│ ├── @nodebb/[email protected] deduped
$ npm list | grep socket.io-adapter-mongo
├─┬ @nodebb/[email protected]
Are you on mongodb 4.4.x as well?
Are you on mongodb 4.4.x as well?
yes
$ mongo
MongoDB shell version v4.4.1
@mysterydata do you have multiple ports in config.json? If yes, try to set only one port instead of the array of ports.
Yeah that would fix the issue until I can publish the fix in @nodebb/mubsub.
Please install
"@nodebb/mubsub": "1.7.1",
"@nodebb/socket.io-adapter-mongo": "3.1.1",
and try again, let me know if you are still having issues.
thanks solved.
Gonna reopen this for visibility until we release 1.15.1