Setting up Gerrit with MySql and LDAP

161 views
Skip to first unread message

Rich Schmitt

unread,
Jan 15, 2013, 3:03:54 PM1/15/13
to repo-d...@googlegroups.com
I've tried to set this up and really not having much luck. 

I follow the instructions that I've seen on the web and mentioned in this group.

1- First set up the database, add the user, create the database, set the permissions for the user, flush-privileges
2- initialize a gerrit installation and answer all the various questions
3- start gerrit

The web page comes up, but when I log in the first time I get a semi-black screen that says Application Error. 

The error_log shows:

[2013-01-15 12:56:18,793] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerri
t SSHD on *:29418
[2013-01-15 12:56:18,796] INFO  org.eclipse.jetty.util.log : jetty-7.2.1.v201011
11
[2013-01-15 12:56:19,441] INFO  org.eclipse.jetty.util.log : Started SelectChann
elCon...@0.0.0.0:8181
[2013-01-15 12:56:19,445] INFO  com.google.gerrit.pgm.Daemon : Gerrit Code Revie
w 2.5.1 ready
[2013-01-15 12:57:21,860] WARN  / : Error in authenticate
java.util.NoSuchElementException
        at java.util.ArrayList$Itr.next(ArrayList.java:794)
        at com.google.gerrit.server.account.AccountManager.create(AccountManager
.java:291)
        at com.google.gerrit.server.account.AccountManager.authenticate(AccountM
anager.java:122)
        at com.google.gerrit.httpd.auth.ldap.UserPassAuthServiceImpl.authenticat
e(UserPassAuthServiceImpl.java:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.google.gwtjsonrpc.server.MethodHandle.invoke(MethodHandle.java:91
)
        at com.google.gwtjsonrpc.server.JsonServlet.doService(JsonServlet.java:3
79)
        at com.google.gwtjsonrpc.server.JsonServlet.service(JsonServlet.java:265
)
        at com.google.gerrit.httpd.rpc.GerritJsonServlet.service(GerritJsonServl
et.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefiniti
on.java:263)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition

I can still successfully log in.  Once I do, I can look around and see that there is an Administrator group and that I am a member of that group.  But it seems the Administrators group doesn't have any privileges.  For instance, I can list projects, I can't create any.

Any ideas?


Edwin Kempin

unread,
Jan 16, 2013, 9:18:00 AM1/16/13
to Rich Schmitt, repo-d...@googlegroups.com
Issue 1475 [1] is about a smililar exception, can you check that the permissions for the All-Projects repository in the file system are set correctly so that the user which is running Gerrit can access it?

[1] http://code.google.com/p/gerrit/issues/detail?id=1475

2013/1/15 Rich Schmitt <blue6...@gmail.com>

Rich Schmitt

unread,
Jan 16, 2013, 10:23:19 AM1/16/13
to repo-d...@googlegroups.com, Rich Schmitt
Thanks alot Edwin.  That is the issue. 

I started by using the H2 database.  So the All Projects was created at that time.  I use a git repository from outside of gerrit site.  So it was reused for each git installation.  It appears that that confuses Gerrit a bit.  I also noticed that gerrit seems to add the groups to the All-Projects repo even if they already exist.

Anyway, deleting All-Projects was all I had to do.

Thanks,
Rich
Reply all
Reply to author
Forward
0 new messages