{"action":"created","issue":{"url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/8","repository_url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus","labels_url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/8/comments","events_url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/8/events","html_url":"https://github.com/moodleuulm/moodle-auth_ldap_syncplus/issues/8","id":336146462,"node_id":"MDU6SXNzdWUzMzYxNDY0NjI=","number":8,"title":"Write database error in Users Sync Job task","user":{"login":"leozelion","id":15329397,"node_id":"MDQ6VXNlcjE1MzI5Mzk3","avatar_url":"https://avatars2.githubusercontent.com/u/15329397?v=4","gravatar_id":"","url":"https://api.github.com/users/leozelion","html_url":"https://github.com/leozelion","followers_url":"https://api.github.com/users/leozelion/followers","following_url":"https://api.github.com/users/leozelion/following{/other_user}","gists_url":"https://api.github.com/users/leozelion/gists{/gist_id}","starred_url":"https://api.github.com/users/leozelion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leozelion/subscriptions","organizations_url":"https://api.github.com/users/leozelion/orgs","repos_url":"https://api.github.com/users/leozelion/repos","events_url":"https://api.github.com/users/leozelion/events{/privacy}","received_events_url":"https://api.github.com/users/leozelion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-27T09:23:15Z","updated_at":"2018-06-29T12:49:14Z","closed_at":null,"author_association":"NONE","body":"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).\r\nI try to run scheduled task \"Users Sync Job\", and get the error below:\r\n\r\n```\r\nExecute scheduled task: LDAP users sync job (Sync Plus) (auth_ldap_syncplus\\task\\sync_task)\r\n... started 10:30:53. Current memory use 10.4MB.\r\nПодключение к серверу LDAP ...\r\nСоздание временной таблицы tmp_extuser\r\n................................... used 4028 dbqueries\r\n... used 1.4261510372162 seconds\r\nScheduled task failed: LDAP users sync job (Sync Plus) (auth_ldap_syncplus\\task\\sync_task), Ошибка записи в базу данных\r\nDebug info:\r\nERROR:  duplicate key value violates unique constraint \"mdl_tmpextu_mneuse_uix\"\r\nDETAIL:  Key (mnethostid, username)=(1, msmirnov) already exists.\r\nINSERT INTO mdl_tmp_extuser (username,mnethostid) VALUES($1,$2) \r\n[array (\r\n  'username' => 'msmirnov',\r\n  'mnethostid' => '1',\r\n)]\r\nBacktrace:\r\n* line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()\r\n* line 969 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()\r\n* line 952 of /auth/ldap/auth.php: call to pgsql_native_moodle_database->insert_record_raw()\r\n* line 135 of /auth/ldap_syncplus/auth.php: call to auth_plugin_ldap->ldap_bulk_insert()\r\n* line 56 of /auth/ldap_syncplus/classes/task/sync_task.php: call to auth_plugin_ldap_syncplus->sync_users()\r\n* line 105 of /lib/cronlib.php: call to auth_ldap_syncplus\\task\\sync_task->execute()\r\n* line 297 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()\r\n* line 91 of /admin/tool/task/schedule_task.php: call to cron_run_single_task()\r\n```\r\n\r\nI use last auth_ldap_syncplus version (updated today) - v3.5-r1.\r\nHelp, please ;)"},"comment":{"url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/comments/401344295","html_url":"https://github.com/moodleuulm/moodle-auth_ldap_syncplus/issues/8#issuecomment-401344295","issue_url":"https://api.github.com/repos/moodleuulm/moodle-auth_ldap_syncplus/issues/8","id":401344295,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTM0NDI5NQ==","user":{"login":"abias","id":1092118,"node_id":"MDQ6VXNlcjEwOTIxMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1092118?v=4","gravatar_id":"","url":"https://api.github.com/users/abias","html_url":"https://github.com/abias","followers_url":"https://api.github.com/users/abias/followers","following_url":"https://api.github.com/users/abias/following{/other_user}","gists_url":"https://api.github.com/users/abias/gists{/gist_id}","starred_url":"https://api.github.com/users/abias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abias/subscriptions","organizations_url":"https://api.github.com/users/abias/orgs","repos_url":"https://api.github.com/users/abias/repos","events_url":"https://api.github.com/users/abias/events{/privacy}","received_events_url":"https://api.github.com/users/abias/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T12:49:14Z","updated_at":"2018-06-29T12:49:14Z","author_association":"MEMBER","body":"Hi,\r\n\r\nrunning auth_ldap_syncplus v3.5-r1 (2018062500) on Moodle 3.5+ is fine. I just wanted to make sure that you don't run an old plugin version on Moodle 3.5.\r\n\r\nHowever, just to be sure:\r\n* When you were on Moodle 3.1, did you use the auth_ldap sync task already and did this work?\r\n* Now on Moodle 3.5, did you try to run the auth_ldap sync task as asked above and did this work?\r\n\r\nThanks,\r\nAlex"}}
{"actor":{"display_login":"abias"}}