LDAP sync crashes NetXMS Core in NetXMS 5 version

Started by maredcz, June 18, 2024, 03:16:48 PM

Previous topic - Next topic

maredcz

Hello,
my NetXMS service on Windows server 2019, MariaDB crashes when start ldap sync. LDAP server is connected, can read data, then starts update the dababase and crashes

output from debug ldap 4

LDAPConnection::initLDAP(): Connecting to LDAP server
LDAPConnection::initLDAP(): servers="X.Y.X.Y:389" port=389 secure=false
LDAPConnection::syncUsers(): search base DN = OU=##############
LDAPConnection::fillLists(): hook script is empty
LDAPConnection::fillLists(): Found entry count: 714

...

LDAPConnection::closeLDAPConnection(): disconnect form LDAP server
LDAPConnection::syncUsers(): read completed, updating user database

now is server terminated


When delete all LDAP users and groups, the sync is ending successfully, but after some time have the same behaviour. Have tried change to the different LDAP search bases and maybe, there are problems with one specific OU with 211 objects. Can you give me a some advice how to activate the right debug?

Thank you. Martin

maredcz

Another finding fron debug userdb

There is a message
UpdateLDAPUser(): User with name "XYZ" already exists. Unique user name have been generated: "XYZ_LDAP6756"

Then server crashes and in the user database the new generated user " XYZ_LDAP6756" does not exists.

In our company are the users partionally managed based on user HR database. So when is an employe fired, the account in LDAP/AD remains, but the attribute CN (Full Name) is prepended with "S_". NetXMS ldapsync generate new user. So was it working up to version 5


When delete the LDAP user "XYZ" in Netxms, the sync ends without crashing.

Victor Kirhenshtein

I think I found the bug (it was really introduced in version 5). Fix will be included into upcoming patch release.

Best regards,
Victor