Hello! I have moodle 3.5+ with php 7.1.18, pgsql 9.3.23 and 15100 users by auth_ldap from Active Directory. And now these users in auth_ldap_syncplus (I use "Migrating from auth_ldap to auth_ldap_syncplus" instruction).
I try to run scheduled task "Users Sync Job", and get the error below:
Execute scheduled task: LDAP users sync job (Sync Plus) (auth_ldap_syncplus\task\sync_task)
... started 10:30:53. Current memory use 10.4MB.
Подключение к серверу LDAP ...
Создание временной таблицы tmp_extuser
................................... used 4028 dbqueries
... used 1.4261510372162 seconds
Scheduled task failed: LDAP users sync job (Sync Plus) (auth_ldap_syncplus\task\sync_task), Ошибка записи в базу данных
Debug info:
ERROR: duplicate key value violates unique constraint "mdl_tmpextu_mneuse_uix"
DETAIL: Key (mnethostid, username)=(1, msmirnov) already exists.
INSERT INTO mdl_tmp_extuser (username,mnethostid) VALUES($1,$2)
[array (
'username' => 'msmirnov',
'mnethostid' => '1',
)]
Backtrace:
* line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 969 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 952 of /auth/ldap/auth.php: call to pgsql_native_moodle_database->insert_record_raw()
* line 135 of /auth/ldap_syncplus/auth.php: call to auth_plugin_ldap->ldap_bulk_insert()
* line 56 of /auth/ldap_syncplus/classes/task/sync_task.php: call to auth_plugin_ldap_syncplus->sync_users()
* line 105 of /lib/cronlib.php: call to auth_ldap_syncplus\task\sync_task->execute()
* line 297 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 91 of /admin/tool/task/schedule_task.php: call to cron_run_single_task()
I use last auth_ldap_syncplus version (updated today) - v3.5-r1.
Help, please ;)