Active Directory sync problem
Hi, with version 0.59.1 I've this problem, but I don't know why because with a snap version the autentication work well.
[34mI20171020-17:48:26.446(2) [34mMeteor ➔ method ldap_sync_now -> userId: oXJzuxv4GfTE8Lso4 , arguments: {}
[34mI20171020-17:48:26.450(2) [34mLDAP ➔ Connection.info Init setup
[34mI20171020-17:48:26.461(2) [34mLDAP ➔ Connection.info Connecting ldap://ptsdc101.prontoseat.it:389
[34mI20171020-17:48:26.467(2) [34mLDAP ➔ Connection.debug connectionOptions { url: 'ldap://server.mydomain.com:389', timeout: 60000, connectTimeout: 1000, idleTimeout: 1000, reconnect: false, log: Logger { domain: null, _events: {}, _eventsCount: 0, _maxListeners: undefined, _level: 10, streams: [ [Object] ], serializers: null, src: false, fields: { name: 'ldapjs', component: 'client', hostname: 'chat', pid: 13946 } } }
[34mI20171020-17:48:26.475(2) [34mLDAP ➔ Connection.info LDAP connected
[34mI20171020-17:48:26.477(2) [34mLDAP ➔ Bind.info Binding UserDN CN=RO_AD,OU=Users,OU=STAFF,DC=mydomain,DC=com
[34mI20171020-17:48:26.488(2) [34mLDAP ➔ Search.info Searching user *
[34mI20171020-17:48:26.491(2) [34mLDAP ➔ Search.debug searchOptions { filter: '(&(objectclass=)(|(sAMAccountName=)(mail=*)))', scope: 'sub', sizeLimit: 1000, paged: { pageSize: 250, pagePause: true } }
[34mI20171020-17:48:26.492(2) [34mLDAP ➔ Search.debug BaseDN DN=mydomain,DN=com
[34mI20171020-17:48:26.511(2) rocketchat_logger rocketchat_logger.js:375 [31mLDAP ➔ Search.error { [OperationsError: 000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0 ] lde_message: '000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0
\u0000', lde_dn: null }
[34mI20171020-17:48:26.515(2) Exception in callback of async function: OperationsError: 000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0 at messageCallback (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1419:45) at Parser.onMessage (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1089:14) at emitOne (events.js:77:13) at Parser.emit (events.js:169:7) at Parser.write (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/messages/parser.js:111:8) at Socket.onData (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1076:22) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:540:20)
[34mI20171020-17:48:27.510(2) [34mLDAP ➔ Search.info Idle
[34mI20171020-17:48:27.512(2) [34mLDAP ➔ Connection.info Disconecting
[34mI20171020-17:48:27.520(2) [34mLDAP ➔ Search.info Closed
someone can point me ? i've erased all the filter.
Thanks
Can you post your LDAP settings (redacted)?
LDAP Enable : true Login Fallback : true Host : pdc.mydomain.com Port : 389 Reconnect : false Base DN : DN=mydomain,DN=com
Sync/Import
Username Field : sAMAccountName Unique Identifier Field : objectGUID,ibm-entryUUID,GUID,dominoUNID,nsuniqueId,uidNumber Default Domain : Merge existing users : true Sync User Data : true User Data Field Map : {"cn":"name", "mail":"email"} Sync User Avatar : false Background Sync : false
User Search Filter : (objectCategory=person)(objectclass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=CHAT,OU=Groups,OU=STAFF,DC=mydomain,DC=com) Scope : sub Search Field : sAMAccountName,mail Search Page Size : 250 Search Size Limit : 1000
The test connection work fine and when I push "Execute Syncìronization Now" it tell me ok "syncronization in progress..." then nothing.
here the log :
Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mMeteor ➔ method#033[39m ldap_sync_now -> userId: oXJzuxv4GfTE8Lso4 , arguments: {} Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Connection.info#033[39m Init setup Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Connection.info#033[39m Connecting ldap://pdc.mydomain.com:389 Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Connection.debug#033[39m connectionOptions { url: 'ldap://pdc.mydomain.com:389', Oct 23 09:58:01 chat nodejs-example[13946]: timeout: 60000, Oct 23 09:58:01 chat nodejs-example[13946]: connectTimeout: 1000, Oct 23 09:58:01 chat nodejs-example[13946]: idleTimeout: 1000, Oct 23 09:58:01 chat nodejs-example[13946]: reconnect: false, Oct 23 09:58:01 chat nodejs-example[13946]: log: Oct 23 09:58:01 chat nodejs-example[13946]: Logger { Oct 23 09:58:01 chat nodejs-example[13946]: domain: null, Oct 23 09:58:01 chat nodejs-example[13946]: _events: {}, Oct 23 09:58:01 chat nodejs-example[13946]: _eventsCount: 0, Oct 23 09:58:01 chat nodejs-example[13946]: _maxListeners: undefined, Oct 23 09:58:01 chat nodejs-example[13946]: _level: 20, Oct 23 09:58:01 chat nodejs-example[13946]: streams: [ [Object] ], Oct 23 09:58:01 chat nodejs-example[13946]: serializers: null, Oct 23 09:58:01 chat nodejs-example[13946]: src: false, Oct 23 09:58:01 chat nodejs-example[13946]: fields: Oct 23 09:58:01 chat nodejs-example[13946]: { name: 'ldapjs', Oct 23 09:58:01 chat nodejs-example[13946]: component: 'client', Oct 23 09:58:01 chat nodejs-example[13946]: hostname: 'chat', Oct 23 09:58:01 chat nodejs-example[13946]: pid: 13946 } } } Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Connection.info#033[39m LDAP connected Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Bind.info#033[39m Binding UserDN CN=RO_AD,OU=Users,OU=STAFF,DC=mydomain,DC=it Oct 23 09:58:01 chat nodejs-example[13946]: {"name":"ldapjs","component":"client","hostname":"chat","pid":13946,"clazz":"Client","ldap_id":"2304__ldap://pdc.mydomain.com:389","level":20,"msg":"connected after 1 attempt(s)","time":"2017-10-23T07:58:01.843Z","v":0} Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Search.info#033[39m Searching user * Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Search.debug#033[39m searchOptions { filter: '(&(objectCategory=person)(objectclass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=CHAT,OU=Groups,OU=STAFF,DC=mydomain,DC=it)(|(sAMAccountName=)(mail=)))', Oct 23 09:58:01 chat nodejs-example[13946]: scope: 'sub', Oct 23 09:58:01 chat nodejs-example[13946]: sizeLimit: 1000, Oct 23 09:58:01 chat nodejs-example[13946]: paged: { pageSize: 250, pagePause: true } } Oct 23 09:58:01 chat nodejs-example[13946]: #033[34mLDAP ➔ Search.debug#033[39m BaseDN DN=mydomain,DN=it Oct 23 09:58:01 chat nodejs-example[13946]: rocketchat_logger rocketchat_logger.js:375 #033[31mLDAP ➔ Search.error#033[39m { [OperationsError: 000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0 Oct 23 09:58:01 chat nodejs-example[13946]: lde_message: '000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0\n\u0000', Oct 23 09:58:01 chat nodejs-example[13946]: lde_dn: null } Oct 23 09:58:01 chat nodejs-example[13946]: Exception in callback of async function: OperationsError: 000020D6: SvcErr: DSID-031007DB, problem 5012 (DIR_ERROR), data 0 Oct 23 09:58:01 chat nodejs-example[13946]: at messageCallback (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1419:45) Oct 23 09:58:01 chat nodejs-example[13946]: at Parser.onMessage (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1089:14) Oct 23 09:58:01 chat nodejs-example[13946]: at emitOne (events.js:77:13) Oct 23 09:58:01 chat nodejs-example[13946]: at Parser.emit (events.js:169:7) Oct 23 09:58:01 chat nodejs-example[13946]: at Parser.write (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/messages/parser.js:111:8) Oct 23 09:58:01 chat nodejs-example[13946]: at Socket.onData (/var/www/Rocket.Chat/programs/server/npm/node_modules/ldapjs/lib/client/client.js:1076:22) Oct 23 09:58:01 chat nodejs-example[13946]: at emitOne (events.js:77:13) Oct 23 09:58:01 chat nodejs-example[13946]: at Socket.emit (events.js:169:7) Oct 23 09:58:01 chat nodejs-example[13946]: at readableAddChunk (_stream_readable.js:153:18) Oct 23 09:58:01 chat nodejs-example[13946]: at Socket.Readable.push (_stream_readable.js:111:10) Oct 23 09:58:01 chat nodejs-example[13946]: at TCP.onread (net.js:540:20) Oct 23 09:58:02 chat nodejs-example[13946]: #033[34mLDAP ➔ Search.info#033[39m Idle Oct 23 09:58:02 chat nodejs-example[13946]: #033[34mLDAP ➔ Connection.info#033[39m Disconecting Oct 23 09:58:02 chat nodejs-example[13946]: #033[34mLDAP ➔ Search.info#033[39m Closed
The ldap search with the filter work:
ldapsearch -LLL -h mydomain.com -b 'dc=mydomain,dc=com' -D "ro_ad" -W "(&(objectCategory=person)(objectclass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=CHAT,OU=Groups,OU=STAFF,DC=mydomain,DC=com)(|(sAMAccountName=)(mail=)))"
i've reinstalled all with Ubuntu 17.10 and with the same filter all work fine...
@exagon It was an error in your LDAP server or in Rocket.Chat server?
I don't know, i think in the installation of rocket.chat, because I don't change nothing on LDAP, but with fresh ubuntu 17.10 and fresh RC installation all worked.
Awesome, so I'll close this issue, reopen it if you need.
Thanks