LDAP users sync job Error

LDAP users sync job Error

by Sang Parekh -
Number of replies: 2
The scheduled task to sync LDAP users is failing with below error:


Execute scheduled task: LDAP users sync job (auth_ldap\task\sync_task)
... started 15:37:54. Current memory use 8.9MB.
Connecting to LDAP server...
Creating temporary table tmp_extuser
Did not get any users from LDAP -- error? -- exiting

Fatal error: Uncaught coding_exception: Coding error detected, it must be fixed by a programmer: A lock was created but not released at: C:\inetpub\wwwroot\lib\cronlib.php on line 279 Code should look like: $factory = \core\lock\lock_config::get_lock_factory('type'); $lock = $factory->get_lock(Resource id #507); $lock->release(); // Locks must ALWAYS be released like this. in C:\inetpub\wwwroot\lib\classes\lock\lock.php:117 Stack trace: #0 [internal function]: core\lock\lock->__destruct() #1 {main} thrown in C:\inetpub\wwwroot\lib\classes\lock\lock.php on line 117

Environment:

  • Windows Server 2012 R2
  • IIS 8
  • HeidiSQL
  • Moodle version: 3.4.1 (Build 20180115)
  • PHP ver 7


LDAP Settings:

  • Version: 3
  • TLS: No
  • Page size: 250
  • Prevent Password cachinh: Yes
  • User Lookup: MS ActiveDirectory
  • Search subcontexts: Yes
  • User attribute: samaccountname


Site Policies:

  • Allow extended characters in username: Yes


I'm stumped at what could be causing the error, can anyone help?


Thanks

Average of ratings: -
In reply to Sang Parekh

Re: LDAP users sync job Error

by Jan Wohlgemuth -
Picture of Particularly helpful Moodlers

We have the same problem.

Any solution?

The same with LDAP (sync plus).


In reply to Jan Wohlgemuth

Re: LDAP users sync job Error

by Sang Parekh -
Yes we managed to get this fixed, it turns out I had specified "User Lookup settings > Contexts" and "User Lookup settings > Object Class" incorrectly


I had pointed "Contexts" to a security group,  and left "Object Class" blank.


To get it working:


"Contexts" was pointed to the users OU

ou=users,ou=uk,dc=contoso,dc=local


"Object Class" was specified as the security group that my Moodle users were in (full query string below)

((&(objectCategory=Person)(sAMAccountName=*)(memberOf=cn=moodle_users,ou=security groups,ou=groups,ou=uk,dc=contoso,dc=local))