--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Edwin Kempin
Software Engineer
Google Germany GmbH
Dienerstraße 12
80331 München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.
Thanks for the report. Wikimedia reported the same issue but so far it's not clear what is causing this.You are right that this error message means that Gerrit tries to create a new account [1], so the question is why it did not find the existing account? To find an existing accounts it retrieves the account from the account index [2,3]. One possibility is that the account is not found because it's missing/stale in the account index. Can you please try to reindex the affected account 360 by using thePOST /accounts/360/indexREST endpoint and let us know whether this fixed the issue? It might not, since Wikimedia claims that reindexing doesn't help in this case, but I would like to confirm this.By the way your account IDs look weird, normally they should have 7 digits.On Thu, Jun 22, 2017 at 4:26 AM, Y. Li <ly6...@sohu.com> wrote:Hi,I migrate gerrit server with ldap authentication to a new gerrit-2.14 server. Ldap server address is also changed. Mysql data is restored and git repository is rsynced. And gerrit is started using "java -jar gerrit-2.14.war init -d /xxxx/gerrit" at the first time.Gerrit starts ok.When I login gerrit with an exist username, it prompt "invalide username and password".In LDAP server log, "op=2 SEARCH RESULT tag=101 err=0 nentries=0 text="In gerrit error_log, "INFO com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : 'xxxx' failed to sign in: Cannot assign external ID "gerrit:xxxx" to account 360; external ID already in use."
Thanks for the report. Wikimedia reported the same issue but so far it's not clear what is causing this.You are right that this error message means that Gerrit tries to create a new account [1], so the question is why it did not find the existing account? To find an existing accounts it retrieves the account from the account index [2,3]. One possibility is that the account is not found because it's missing/stale in the account index. Can you please try to reindex the affected account 360 by using thePOST /accounts/360/indexREST endpoint and let us know whether this fixed the issue? It might not, since Wikimedia claims that reindexing doesn't help in this case, but I would like to confirm this.By the way your account IDs look weird, normally they should have 7 digits.
On Thu, Jun 22, 2017 at 4:26 AM, Y. Li <ly6...@sohu.com> wrote:
Hi,I migrate gerrit server with ldap authentication to a new gerrit-2.14 server. Ldap server address is also changed. Mysql data is restored and git repository is rsynced. And gerrit is started using "java -jar gerrit-2.14.war init -d /xxxx/gerrit" at the first time.Gerrit starts ok.When I login gerrit with an exist username, it prompt "invalide username and password".In LDAP server log, "op=2 SEARCH RESULT tag=101 err=0 nentries=0 text="In gerrit error_log, "INFO com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : 'xxxx' failed to sign in: Cannot assign external ID "gerrit:xxxx" to account 360; external ID already in use."It seems that gerrit takes it as a new account.All usernames are lower case, so it is not a case sensitive problem.Any suggestion? Thanks!
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[2017-06-22 21:06:37,936] [main] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No index versions ready; run java -jar /var/www/html/test/bin/gerrit.war reindex
1 error
at com.google.gerrit.lucene.LuceneVersionManager.initIndex(LuceneVersionManager.java:146)
java -jar bin/gerrit.war reindex --index accounts
Cannot assign user name "maurelio" to account 5000; name already in use.
(previously was account 4997, and after each try, it increased the account number by one unit)
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
On Fri, Jun 23, 2017 at 12:07 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:It seems reindex offline broke some accounts for us now. See https://phabricator.wikimedia.org/T168707
Cannot assign user name "maurelio" to account 5000; name already in use.
Hi, here's our gerrit.config https://github.com/wikimedia/puppet/blob/production/modules/gerrit/templates/gerrit.config.erb
Though there account is a couple of years old though.
I will need to ask chad if he backported https://gerrit-review.googlesource.com/?polygerrit=0#/c/92830/ when he rebuilt from stable-2.13 but I think he did otherwise we would have got externalid error instead of name error.
I will have a look in the All-User branch later when near pc.
We haven't set userNameToLowerCase in auto though. But have set it for ldap. Could that be why?
Also per the link I gave, we did not set auth.localUsernameToLowerCase since puppet will revert any changes done on the machine. So anything in that repo is how we setup the gerrit.
We ran that programme that converted usernames to lowercase. We setup a maint date and did it.
Also per the link I gave, we did not set auth.localUsernameToLowerCase since puppet will revert any changes done on the machine. So anything in that repo is how we setup the gerrit.
~/All-Users$ git checkout refs/meta/external-ids
error: pathspec 'refs/meta/external-ids' did not match any file(s) known to git
unless it needs admin permission to view it.
On Fri, Jun 23, 2017 at 2:18 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:We ran that programme that converted usernames to lowercase. We setup a maint date and did it.Okay, then this should be confirmed by the data from the refs/meta/external-ids branch.Maybe there is also a bug in this program and it didn't do the conversion correctly.Anyway no value speculating before we have that data from your refs/meta/external-ids branch.
Also per the link I gave, we did not set auth.localUsernameToLowerCase since puppet will revert any changes done on the machine. So anything in that repo is how we setup the gerrit.
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
That branch only exists in gerrit 2.14 not 2.13.8. https://github.com/GerritCodeReview/gerrit/commit/744d2b896719e2058539db98443c80eb9368fd77
On Thursday, June 22, 2017 at 7:03:36 AM UTC+1, Y. Li wrote:Hi,I migrate gerrit server with ldap authentication to a new gerrit-2.14 server. Ldap server address is also changed. Mysql data is restored and git repository is rsynced. And gerrit is started using "java -jar gerrit-2.14.war init -d /xxxx/gerrit" at the first time.Gerrit starts ok.When I login gerrit with an exist username, it prompt "invalide username and password".In LDAP server log, "op=2 SEARCH RESULT tag=101 err=0 nentries=0 text="In gerrit error_log, "INFO com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : 'xxxx' failed to sign in: Cannot assign external ID "gerrit:xxxx" to account 360; external ID already in use."It seems that gerrit takes it as a new account.All usernames are lower case, so it is not a case sensitive problem.Any suggestion? Thanks!
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
But using a gerrit 2.14 test install, i carn't find that branch either.
--
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Actually I have found a problem as well over the week-end because of exactly that behaviour.I've submitted a fix on 2.14 to allow a "special skip" of that logic when you do Git/HTTP authentication, but the same could be done for REST-API.If you have been authenticated *and* the account is active, does not make sense anymore to try to register a new user when the external id cannot be found.That logic is meant to be used for the WebUX GUI and not for command line or non direct invocation, isn't it?We have at the moment in Gerrit 2.14 a situation where the accounts are half on the DBMS (accounts table) and half on NoteDb (All-Users for the external ids)
and additionally we have the Lucene index for searching them.If *one of them* is not up-to-date with the others, you can get into trouble :-(Luca.
On 25 Jun 2017, at 03:34, Joshua Olson <joshua...@gmail.com> wrote:
Hi,We've run into this issue and if you setup LDAP (or other external account validations like OAUTH) on gerrit then existing accounts and/or accounts created via the REST API will not be able to login via LDAP because the login validation code expects externally validated account to have an existing row in the the ACCOUNT_EXTERNAL_IDS table (or in All-Users.git if external ids have been migrated there) having the external_id value "gerrit:{username}". If gerrit doesn't find this row it attempts to create a new account. Gerrit expects all externally validated accounts to be created upon first login and thus only inserts the "gerrit:{username}" row at that time.You can solve this by running this on the DB for any account you expect to login using external auth. I believe the email address is optional in this insert.`insert into account_external_ids (account_id, email_address, external_id) values ({account_id}, '{username}@{domain}', 'gerrit:{username}');`You will also need to reindex accounts after inserting this row directly into the DB.Cheers,Josh
On Wednesday, June 21, 2017 at 11:03:36 PM UTC-7, Y. Li wrote:Hi,I migrate gerrit server with ldap authentication to a new gerrit-2.14 server. Ldap server address is also changed. Mysql data is restored and git repository is rsynced. And gerrit is started using "java -jar gerrit-2.14.war init -d /xxxx/gerrit" at the first time.Gerrit starts ok.When I login gerrit with an exist username, it prompt "invalide username and password".In LDAP server log, "op=2 SEARCH RESULT tag=101 err=0 nentries=0 text="In gerrit error_log, "INFO com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : 'xxxx' failed to sign in: Cannot assign external ID "gerrit:xxxx" to account 360; external ID already in use."It seems that gerrit takes it as a new account.All usernames are lower case, so it is not a case sensitive problem.Any suggestion? Thanks!--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
On 26 Jun 2017, at 10:52, Edwin Kempin <eke...@google.com> wrote:On Mon, Jun 26, 2017 at 9:58 AM, Luca Milanesio <luca.mi...@gmail.com> wrote:Actually I have found a problem as well over the week-end because of exactly that behaviour.I've submitted a fix on 2.14 to allow a "special skip" of that logic when you do Git/HTTP authentication, but the same could be done for REST-API.If you have been authenticated *and* the account is active, does not make sense anymore to try to register a new user when the external id cannot be found.That logic is meant to be used for the WebUX GUI and not for command line or non direct invocation, isn't it?We have at the moment in Gerrit 2.14 a situation where the accounts are half on the DBMS (accounts table) and half on NoteDb (All-Users for the external ids)This is actually not true. With 2.14 accounts and external IDs are still both in ReviewDb.The schema migration that migrates external IDs from ReviewDb to NoteDb is only part of [1] which is not included in 2.14.
I was confused about this because 2.14 already writes new external IDs to NoteDb, but reading is alwaysdone from ReviewDb (or the account index). Hence [2] must be reverted: [3]
On 26 Jun 2017, at 10:52, Edwin Kempin <eke...@google.com> wrote:On Mon, Jun 26, 2017 at 9:58 AM, Luca Milanesio <luca.mi...@gmail.com> wrote:Actually I have found a problem as well over the week-end because of exactly that behaviour.I've submitted a fix on 2.14 to allow a "special skip" of that logic when you do Git/HTTP authentication, but the same could be done for REST-API.If you have been authenticated *and* the account is active, does not make sense anymore to try to register a new user when the external id cannot be found.That logic is meant to be used for the WebUX GUI and not for command line or non direct invocation, isn't it?We have at the moment in Gerrit 2.14 a situation where the accounts are half on the DBMS (accounts table) and half on NoteDb (All-Users for the external ids)This is actually not true. With 2.14 accounts and external IDs are still both in ReviewDb.The schema migration that migrates external IDs from ReviewDb to NoteDb is only part of [1] which is not included in 2.14.Ah, I got confused as well as I've noticed that the new accounts were in NoteDb :-)That explains why the old accounts weren't migrated either.I was confused about this because 2.14 already writes new external IDs to NoteDb, but reading is alwaysdone from ReviewDb (or the account index). Hence [2] must be reverted: [3]Yes, but it is not enough :-(Using a Lucene Index lookup on slaves wouldn't work, as Gerrit Slaves have no Lucene index at all :-(
On Mon, Jun 26, 2017 at 12:03 PM, Luca Milanesio <luca.mi...@gmail.com> wrote:On 26 Jun 2017, at 10:52, Edwin Kempin <eke...@google.com> wrote:On Mon, Jun 26, 2017 at 9:58 AM, Luca Milanesio <luca.mi...@gmail.com> wrote:Actually I have found a problem as well over the week-end because of exactly that behaviour.I've submitted a fix on 2.14 to allow a "special skip" of that logic when you do Git/HTTP authentication, but the same could be done for REST-API.If you have been authenticated *and* the account is active, does not make sense anymore to try to register a new user when the external id cannot be found.That logic is meant to be used for the WebUX GUI and not for command line or non direct invocation, isn't it?We have at the moment in Gerrit 2.14 a situation where the accounts are half on the DBMS (accounts table) and half on NoteDb (All-Users for the external ids)This is actually not true. With 2.14 accounts and external IDs are still both in ReviewDb.The schema migration that migrates external IDs from ReviewDb to NoteDb is only part of [1] which is not included in 2.14.Ah, I got confused as well as I've noticed that the new accounts were in NoteDb :-)That explains why the old accounts weren't migrated either.I was confused about this because 2.14 already writes new external IDs to NoteDb, but reading is alwaysdone from ReviewDb (or the account index). Hence [2] must be reverted: [3]Yes, but it is not enough :-(Using a Lucene Index lookup on slaves wouldn't work, as Gerrit Slaves have no Lucene index at all :-(OK, let us fix this in stable-2.14 by reading from ReviewDb then.
On 26 Jun 2017, at 11:05, Edwin Kempin <eke...@google.com> wrote:On Mon, Jun 26, 2017 at 12:03 PM, Luca Milanesio <luca.mi...@gmail.com> wrote:On 26 Jun 2017, at 10:52, Edwin Kempin <eke...@google.com> wrote:On Mon, Jun 26, 2017 at 9:58 AM, Luca Milanesio <luca.mi...@gmail.com> wrote:Actually I have found a problem as well over the week-end because of exactly that behaviour.I've submitted a fix on 2.14 to allow a "special skip" of that logic when you do Git/HTTP authentication, but the same could be done for REST-API.If you have been authenticated *and* the account is active, does not make sense anymore to try to register a new user when the external id cannot be found.That logic is meant to be used for the WebUX GUI and not for command line or non direct invocation, isn't it?We have at the moment in Gerrit 2.14 a situation where the accounts are half on the DBMS (accounts table) and half on NoteDb (All-Users for the external ids)This is actually not true. With 2.14 accounts and external IDs are still both in ReviewDb.The schema migration that migrates external IDs from ReviewDb to NoteDb is only part of [1] which is not included in 2.14.Ah, I got confused as well as I've noticed that the new accounts were in NoteDb :-)That explains why the old accounts weren't migrated either.I was confused about this because 2.14 already writes new external IDs to NoteDb, but reading is alwaysdone from ReviewDb (or the account index). Hence [2] must be reverted: [3]Yes, but it is not enough :-(Using a Lucene Index lookup on slaves wouldn't work, as Gerrit Slaves have no Lucene index at all :-(OK, let us fix this in stable-2.14 by reading from ReviewDb then.
gerrit> select * from accounts where full_name = 'MarcoAurelio'; registered_on | full_name | preferred_email | inactive | account_id ----------------------+--------------+--------------------+----------+----------- 2016-07-25 01:42:27.0 | MarcoAurelio | stri...@gmail.com | N | 787 (1 row; 8 ms) gerrit> select * from account_external_ids where account_id = 787; account_id | email_address | password | external_id -----------+---------------+----------+------------------ 787 | NULL | NULL | username:maurelio (1 row; 1 ms)
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Hold on ... but the exception says "cannot assign external id gerrit:xxx" because it is in use ... but from the query the external id with gerrit prefix is the one missing.
Are we following a different problem / scenario?
@Paladox: how many users have only the username external id without the gerrit one?
On 28 Jun 2017, at 08:41, Edwin Kempin <eke...@google.com> wrote:On Wed, Jun 28, 2017 at 9:31 AM, Luca Milanesio <luca.mi...@gmail.com> wrote:Hold on ... but the exception says "cannot assign external id gerrit:xxx" because it is in use ... but from the query the external id with gerrit prefix is the one missing.Don't get confused.The error from Y. Li was:'xxxx' failed to sign in: Cannot assign external ID "gerrit:xxxx" to account 360; external ID already in use."But the error from Paladox none was:Cannot assign user name "maurelio" to account 5000; name already in use.So they are different.The error from Paladox none really means that Gerrit didn't find a 'gerrit:' ID for maurelio and hence it wants to create a new account. But the account creation fails on assigning the username to this new account (because this username is already used by the existing account).Are we following a different problem / scenario?They are different :) (see above)