1

I have rocket.chat server connected to LDAP. When one of users try logging to their account he get logged to someone other account, it's probably because indexes. My logs look like this:

[34mI20161126-12:07:28.992(1) rocketchat_ldap rocketchat_ldap.js:341 [31mLDAP ➔ Search.error Search by id 31353036 returned 2 records [34mI20161126-12:07:28.999(1) rocketchat_ldap rocketchat_ldap.js:780

[31mLDAPSync ➔ error { [MongoError: E11000 duplicate key error index: rocketchat.users.$emails.address_1 dup key: { : "[email protected]" }]
name: 'MongoError', message: 'E11000 duplicate key error index: rocketchat.users.$emails.address_1 dup key: { : "[email protected]" }',
driver: true, index: 0, code: 11000, errmsg: 'E11000 duplicate key error index: rocketchat.users.$emails.address_1 dup key: { : "[email protected]" }' }

Can I rebuild that indexes or something else to resolve this problem?

asked Nov 26, 2016 at 11:18
3
  • 1
    I'm not familiar with Rocket.Chat's LDAP integration, but the error message suggests that the problem is with your LDAP server having user accounts with duplicate email addresses. A unique index constraint in MongoDB prevents duplicates from being created and the error message indicates the problematic email address. To fix the problem you need to remove the duplicate email addresses in your LDAP server or look into the Rocket.Chat code. I'd also suggest filing an issue directly with Rocket.Chat, but it looks like you've already done so: github.com/RocketChat/Rocket.Chat/issues/5053 Commented Nov 27, 2016 at 15:11
  • @Stennie You should post this as an answer. Commented Apr 3, 2017 at 11:14
  • @VinceBowdren I wasn't sure that really answered the question as ultimately this seems to be about configuring/using the Rocket.Chat application with LDAP. The GitHub issue related to this question also doesn't provide a direct solution. Maybe Simonell found a solution? Commented Apr 3, 2017 at 11:27

1 Answer 1

0

I am not familiar with Rocket.Chat.

Will dare to suggest to check that MongoDB collection's indexes with db.collectionName.getIndexes() and see if there is an index with the email address field as unique index. If so, then, drop it with db.collectionName.dropIndex("indexName").

answered Dec 6, 2016 at 19:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.