-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Integrity constraint violation: 1062 Duplicate entry for key user_ldap_membership_unique #43496
Comments
Can you double check you do not have a duplicated LDAP configuration? |
Here is the output of the command:
|
Hi,
|
Hi,
So far so good. |
Yes there is a mapping and ldap groups appear as Nextcloud groups. |
@rpelissi Is that still a problem? If yes can you try 28.0.3? |
fwiw i just ran into this with 28.0.3, it seems. |
Ok, so, i just spend some time debugging this. The issue is that the regular job with id 52 ( Maybe a timeout or sth. when retrieving groups being overly strict, hence falling back to the login group from the user object only? Specifically, Could this be related to #42576, specifically #42576 (comment) ? |
Are you sure your user<->group relation ship is correctly configured for Nextcloud to pick up? Recently I’ve seen a lot of instances where group were detected through memberof but the other way was misconfigured. We should add a check for that at some point. |
Moin, This actually makes sense, i.e., if upon login group membership is established via 'memberOf', but the regular job iterates over the group entries. Checking now, I indeed see that the config seems to have defaulted to use Changing between So, i think that this explains the occurrence of this. However, what it does not explain is why this did not happen with NC27? Was there a change there? |
Yes the way group membership is cached in database was changed. |
See #39446 |
Thanks; I cannot speak for the original reporter, but from my reading of this issue, that should be the explanation. |
Bug description
So I have upgrade to latest 28.02 versin using occ upgrade. Everything is working fine but received some popup from time to time saying that an administrator remove my user from an ldap group.
Now checking in the logs
DbalException An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'
I am using groups and users from an openldap server and the ldap connection is/was working fine so far.
The issue happen after the update to 28.02
I see some references to this issue here #42576 and #42482 but not sure it really apply and cannot found a fix for this.
Steps to reproduce
Expected behavior
We should not have this duplicate entry issue
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
RHEL/CentOS
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: