I'm trying to authenticate Gerrit users using ldap against Active Directory. I get the following error.

ERROR com.google.gerrit.server.cache.PopulatingCache : Cannot lookup CN%3DORG+%C3%96resund+ALL%2COU%3DOrganisation%2COU%3DGroups%2COU%3DOther%2C DC%3Dcompany%2CDC%3Dcom in "groups_byext" net.sf.ehcache.CacheException: Could not fetch object for cache entry with key "CN%3DORG+%C3%96resund+ALL%2COU%3DOrganisation%2COU%3DGroups%2COU%3DOther%2CDC%3Dcompany%2CDC% 3Dcom".


Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

I am not very experienced in mysql or Active Directory, so I'm pretty much clueless on this issue.

Any suggestions of what the problem might be?

  • I should add that I have successfully authenticated against an OpenLDAP server. (Experimental setup only.) – Robert Apr 13 '11 at 12:16

That is a MySQL error, not an LDAP error. Sounds like you're getting a list of groups, but it can't check against its local group permission table because the database connection is using the wrong encoding.

This thread suggests a solution in the JDBC connection string in gerrit.conf:

url = jdbc:mysql://foo/reviewdb?user=x&password=y&useUnicode=false&characterEncoding=latin1 
  • Thanks, I have tried that. Still the same error. The reason why I tagged the question with ldap is that the error stems from the authentication over LDAP. – Robert Apr 13 '11 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.