Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating 5.4.5 to 6.x rocket server don't start #55

Closed
CvH opened this issue Apr 26, 2023 · 3 comments
Closed

After updating 5.4.5 to 6.x rocket server don't start #55

CvH opened this issue Apr 26, 2023 · 3 comments

Comments

@CvH
Copy link

CvH commented Apr 26, 2023

updated description

After updating rocket snaps from 5.4.x to 6.1.x the rocket server won't start anymore. Looks like a mongo db problem.

Stopped Service for snap application rocketchat-server.rocketchat-server.
snap.rocketchat-server.rocketchat-server.service: Consumed 2.357s CPU time.
Started Service for snap application rocketchat-server.rocketchat-server.
node $SNAP/main.js
/snap/rocketchat-server/1546/programs/server/node_modules/fibers/future.js:313
						throw(ex);
						^
errorClass [Error]: [An error occurred when creating an index for collection "users: An equivalent index already exists with the same name but different options. Requested index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", sparse: true }, existing index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", ns: "parties.users", sparse: 1 }]
    at Collection.createIndex (packages/mongo/collection.js:801:15)
    at setupUsersCollection (packages/accounts-base/accounts_server.js:1776:9)
    at new AccountsServer (packages/accounts-base/accounts_server.js:75:5)
    at packages/accounts-base/server_main.js:7:12
    at module (packages/accounts-base/server_main.js:19:31)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at require (packages/modules-runtime.js:258:21)
    at /snap/rocketchat-server/1546/programs/server/packages/accounts-base.js:2192:15
    at /snap/rocketchat-server/1546/programs/server/packages/accounts-base.js:2199:3
    at /snap/rocketchat-server/1546/programs/server/boot.js:369:38
    at Array.forEach (<anonymous>)
    at /snap/rocketchat-server/1546/programs/server/boot.js:210:21
    at /snap/rocketchat-server/1546/programs/server/boot.js:423:7
    at Function.run (/snap/rocketchat-server/1546/programs/server/profile.js:256:14)
    at /snap/rocketchat-server/1546/programs/server/boot.js:422:13 {
  isClientSafe: true,
  error: 'An error occurred when creating an index for collection "users: An equivalent index already exists with the same name but different options. Requested index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", sparse: true }, existing index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", ns: "parties.users", sparse: 1 }',
  reason: undefined,
  details: undefined,
  errorType: 'Meteor.Error'
}
pkill: pidfile not valid
Try `pkill --help' for more information.
snap.rocketchat-server.rocketchat-server.service: Control process exited, code=exited, status=1/FAILURE
snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
snap.rocketchat-server.rocketchat-server.service: Consumed 2.338s CPU time.```
@CvH
Copy link
Author

CvH commented Apr 26, 2023

was confused with the caddy server, turns out it looks like a mongo db problem :( (updated first post accordingly)

@CvH CvH changed the title Upgrade snap 5.4.5 to 6.x fails with reverse proxy setup After updating 5.4.5 to 6.x rocket server don't start Apr 26, 2023
@CvH
Copy link
Author

CvH commented May 8, 2023

still the same problem for 6.1.6

@CvH
Copy link
Author

CvH commented May 9, 2023

Isn't a fix but a dirty workaround for making it work from RocketChat/Rocket.Chat#29167.

Stop RC Server

systemctl stop snap.rocketchat-server.rocketchat-server.service

For Ubuntu 20.04 install Mongodb client (rocketchat-server.mongo is broken for a while)

apt install mongodb-clients

Connect to the Mongodb and remove the user index.

mongo

use parties
db.users.dropIndexes()

reboot server

reboot

@CvH CvH closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant