Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

RocketChat cannot start

Open sophornsna opened this issue 9 years ago • 11 comments

hello RocketChat team,

I have a problem during start rocketchat. Please help to check my error bellow:

Will load cache for rocketchat_roles 0 records load from rocketchat_roles LocalStore: store created at {"line":"147","file":"rocketchat_migrations.js","message":"Migrations: Not migrating, already at version 93","time":{"$date":1494239048514},"level":"info"} Exception in callback of async function: MongoError: Mod on _id not allowed at Object.Future.wait (/opt/RocketChat/programs/server/node_modules/fibers/future.js:449:15) at [object Object]. (packages/meteor.js:213:24) at [object Object].MongoConnection.(anonymous function) [as update] (/opt/RocketChat/programs/server/packages/mongo.js:836:49) at Object. (packages/matb33_collection-hooks.js:504:27) at Object.collection.(anonymous function) [as update] (packages/matb33_collection-hooks.js:146:21) at [object Object].update (/opt/RocketChat/programs/server/packages/mongo.js:3899:31) at ModelsBaseDb.update (/opt/RocketChat/programs/server/packages/rocketchat_lib.js:9640:32) at ModelsBaseDb.upsert (/opt/RocketChat/programs/server/packages/rocketchat_lib.js:9715:16) at ModelPermissions.upsert (/opt/RocketChat/programs/server/packages/rocketchat_lib.js:4192:36) at /opt/RocketChat/programs/server/packages/rocketchat_authorization.js:1192:34 at Function.time (/opt/RocketChat/programs/server/profile.js:309:28) at /opt/RocketChat/programs/server/boot.js:312:13 at /opt/RocketChat/programs/server/boot.js:353:5 at Function.run (/opt/RocketChat/programs/server/profile.js:510:12) at /opt/RocketChat/programs/server/boot.js:351:11

- - - - -

at Function.MongoError.create (/opt/RocketChat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11) at toError (/opt/RocketChat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:114:22) at /opt/RocketChat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1048:60 at getLastErrorCallback (/opt/RocketChat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js:463:18)

sophornsna avatar May 08 '17 10:05 sophornsna

are you still stuck? have you tried again?

looks related to migrations but no sure.

sampaiodiego avatar May 08 '17 18:05 sampaiodiego

I tries to start two times, but still show this error. How can I fix it? Does it is from the mongodb or RocketChat package?

sophornsna avatar May 09 '17 01:05 sophornsna

you can try removing migrations record.

Connect to you MongoDB database and run:

db['migrations'].remove({});

Then you can try starting Rocket.Chat again.

sampaiodiego avatar May 09 '17 12:05 sampaiodiego

Thanks, I will try to start it again.

sophornsna avatar May 16 '17 01:05 sophornsna

I try to use your command, but it still error like before. Now I have changed the database but it still error.

sophornsna avatar May 19 '17 02:05 sophornsna

are you sure you have connected to correct database? you need to connecto mongo shell and then switch to rocket.chat's database (using use command, e.g.: use rocketchat).

you can confirm you're on the correct database doing a show collections, you'll see a lot of rocketchat_ collections.

sampaiodiego avatar May 19 '17 11:05 sampaiodiego

@sampaiodiego I'm getting the same issue with Ubuntu on aws

{"line":"147","file":"rocketchat_migrations.js","message":"Migrations: Not migrating, already at version 105","time":{"$date":1515636480591},"level":"info"}
Exception in callback of async function: MongoError: Mod on _id not allowed
  at Function.MongoError.create (/root/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
  at toError (/root/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22)
  at /root/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1058:60
  at getLastErrorCallback (/root/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js:466:18)
  at /root/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
  at _combinedTickCallback (internal/process/next_tick.js:131:7)
  at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Updating process.env.MAIL_URL

AhmadIbrahiim avatar Jan 11 '18 02:01 AhmadIbrahiim

@AhmadIbrahiim you probably tried using different versions using the same database. you can fix this installing rocket.chat's latest version.

sampaiodiego avatar Jan 11 '18 20:01 sampaiodiego

hello, I would like to attach tothis issue, as I am getting the same thing. Using: db['migrations'].remove({}); Only remove the warning:

{"line":"147","file":"rocketchat_migrations.js","message":"Migrations: Not migrating, already at version 105","time":{"$date":1517098827704},"level":"info"}

While the error itself is still showing:

Exception in callback of async function: MongoError: Mod on _id not allowed at Function.MongoError.create (/home/chat/domains/chat.imarkus.pl/public_html/ Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongo db-core/lib/error.js:31:11) at toError (/home/chat/domains/chat.imarkus.pl/public_html/Rocket.Chat/program s/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139 :22) at /home/chat/domains/chat.imarkus.pl/public_html/Rocket.Chat/programs/server/ npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1058:60 at getLastErrorCallback (/home/chat/domains/chat.imarkus.pl/public_html/Rocket .Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-cor e/lib/wireprotocol/2_4_support.js:466:18) at /home/chat/domains/chat.imarkus.pl/public_html/Rocket.Chat/programs/server/ npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool. js:469:18 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Is there anything else that could be wrong here? Using Node 8.9.3 with mongo 3.0.15. Fresh install, never tryied it on this VPS previously. Does OpenVZ has any impact in this case?

markusvisse avatar Jan 28 '18 00:01 markusvisse

Had the same issue on Debian Jessie. Apparently it's related to mongo 2.4, upgrading to mongo 2.6 (available at deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main) solved the issue.

drcursor avatar Jun 06 '18 05:06 drcursor

Thanks for sharing. Going to go ahead and close

geekgonecrazy avatar Dec 01 '18 10:12 geekgonecrazy