Gerrit: All-Projects repo not created

2,241 views
Skip to first unread message

Joe Robinson

unread,
Mar 23, 2012, 9:37:56 AM3/23/12
to Repo and Gerrit Discussion
I'm having some issues with setting up Gerrit. I've tried with both
2.2.2.1 and 2.3-rc0, and had the same results. I'm currently trying to
use mysql, though I also tried using the builtin H2 database and had
the same results.

After running the gerrit init, I'm unable to use the site. The home
page gives the error

Application Error
Server Error
Internal Server Error

The error given in the logs is:

[2012-03-23 13:09:02,021] WARN / : Error in allQueryNext
java.lang.IllegalStateException: Missing project All-Projects
at
com.google.gerrit.server.project.ProjectCacheImpl.getAllProjects(ProjectCacheImpl.java:
115)
at
com.google.gerrit.server.account.CapabilityControl.<init>(CapabilityControl.java:
50)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:
513)
at com.google.inject.DefaultConstructionProxyFactory
$2.newInstance(DefaultConstructionProxyFactory.java:81)
at
com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:
85)
at com.google.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:
758)
at
com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
at
com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:
218)
at $Proxy25.create(Unknown Source)
at
com.google.gerrit.server.CurrentUser.getCapabilities(CurrentUser.java:
80)
at
com.google.gerrit.httpd.rpc.ChangeListServiceImpl.safePageSize(ChangeListServiceImpl.java:
297)
at com.google.gerrit.httpd.rpc.ChangeListServiceImpl.access
$800(ChangeListServiceImpl.java:56)
at com.google.gerrit.httpd.rpc.ChangeListServiceImpl
$QueryNext.<init>(ChangeListServiceImpl.java:327)
at com.google.gerrit.httpd.rpc.ChangeListServiceImpl
$6.<init>(ChangeListServiceImpl.java:133)
at
com.google.gerrit.httpd.rpc.ChangeListServiceImpl.allQueryNext(ChangeListServiceImpl.java:
133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwtjsonrpc.server.MethodHandle.invoke(MethodHandle.java:91)
at
com.google.gwtjsonrpc.server.JsonServlet.doService(JsonServlet.java:
382)
at
com.google.gwtjsonrpc.server.JsonServlet.service(JsonServlet.java:268)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
717)
at
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:
216)
at
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:
141)
at
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:
93)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
63)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:
76)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
129)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
134)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.gerrit.httpd.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:
54)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
129)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:
122)
at
com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
at org.eclipse.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1322)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:
473)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:
921)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
403)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:
856)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:
117)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:
114)
at
org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:
59)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:
114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:
596)
at org.eclipse.jetty.server.HttpConnection
$RequestHandler.content(HttpConnection.java:1069)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:
805)
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:
426)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:
510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access
$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint
$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool
$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:662)

As far as I can tell from reading around, there should be an All-
Projects repo in the git directory, but this is not here (the git
directory is empty). This is using a new git directory rather than
importing from existing repos.

I tried manually creating an empty All-Projects repo, and this
resolved the initial error, but then no users (including the first
created one) had any admin rights, and I wasn't able to configure any
settings or access any administration sections on the site.

Unsure if this is related, but I also tried using the ssh interface to
create repos, using the following command:

ssh -p 29418 localhost gerrit create-project --name test-project

Using the gerrit2 user, I get a "Permission denied (publickey)."
error.

I also tried setting up an SSH key for the first user, but it said
that this user had no privileges.

Not sure what else to try here. I've googled for all of the errors and
no one else seems to have this issue. I'm running this on a Gentoo
Linux server, using Java 1.6.0.31 (also tried with 1.6.0.26
previously). Let me know if you need any more info.

Joe Robinson

unread,
Mar 23, 2012, 10:42:35 AM3/23/12
to Repo and Gerrit Discussion
I tried using an older version 2.2.1, and did not have this error.
Seems to be some sort of problem with the newer versions? (Though
obviously doesn't apply to everyone since I haven't seen the error
reported by anyone else).

Martin Fick

unread,
Mar 23, 2012, 1:56:14 PM3/23/12
to repo-d...@googlegroups.com, Joe Robinson
On Friday, March 23, 2012 08:42:35 am Joe Robinson wrote:
> I tried using an older version 2.2.1, and did not have
> this error. Seems to be some sort of problem with the
> newer versions? (Though obviously doesn't apply to
> everyone since I haven't seen the error reported by
> anyone else).
>
> On Mar 23, 1:37 pm, Joe Robinson <j...@lc8n.com> wrote:
> > I'm having some issues with setting up Gerrit. I've
> > tried with both 2.2.2.1 and 2.3-rc0, and had the same
> > results. I'm currently trying to use mysql, though I
> > also tried using the builtin H2 database and had the
> > same results.

Can you try running the standard gerrit init on a clean
directory and accept all the defaults to see if it works for
you? If it does, maybe you can then slowly modify things
until it no longer works?

-Martin


Things to make sure: you can write to the site dir and you
have enough space in your home directory.

osebelin

unread,
Apr 20, 2012, 4:36:42 AM4/20/12
to Repo and Gerrit Discussion

> > On Mar 23, 1:37 pm, Joe Robinson <j...@lc8n.com> wrote:
> > > I'm having some issues with setting up Gerrit. I've
> > > tried with both 2.2.2.1 and 2.3-rc0, and had the same
> > > results. I'm currently trying to use mysql, though I
> > > also tried using the builtin H2 database and had the
> > > same results.

I had the same issue using a postgresql DB. Dropping and recreating
the DB did the trick. Did you delete the H2-DB?

Regards,
Olaf
Reply all
Reply to author
Forward
0 new messages