Reindex issues

1,189 views
Skip to first unread message

Will DeBerry

unread,
Dec 23, 2013, 9:34:19 AM12/23/13
to repo-d...@googlegroups.com
Restarted gerrit this morning and had this in the logs. The Device-Maintainers project is just a dummy project meant for rights management. Setup exactly like All-Projects, just different access rules setup.

[2013-12-23 14:49:36,635] ERROR com.google.gerrit.server.index.ChangeBatchIndexer : Failed to index project Device-Maintainers
java.util.concurrent.ExecutionException: com.google.inject.ProvisionException: Guice provision errors:

1) Automatic ReviewDb only available in request scope
  at com.google.gerrit.server.util.ThreadLocalRequestContext$1.provideReviewDb(ThreadLocalRequestContext.java:70)
  while locating com.google.gerrit.reviewdb.server.ReviewDb

1 error
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
        at java.util.concurrent.FutureTask.get(FutureTask.java:111)
        at com.google.gerrit.server.index.ChangeBatchIndexer$1.run(ChangeBatchIndexer.java:153)
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
        at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
        at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101)
        at com.google.common.util.concurrent.ListenableFutureTask.addListener(ListenableFutureTask.java:83)
        at com.google.gerrit.server.index.ChangeBatchIndexer.indexAll(ChangeBatchIndexer.java:149)
        at com.google.gerrit.lucene.OnlineReindexer.reindex(OnlineReindexer.java:79)
        at com.google.gerrit.lucene.OnlineReindexer.access$000(OnlineReindexer.java:33)
        at com.google.gerrit.lucene.OnlineReindexer$1.run(OnlineReindexer.java:62)
Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Automatic ReviewDb only available in request scope
  at com.google.gerrit.server.util.ThreadLocalRequestContext$1.provideReviewDb(ThreadLocalRequestContext.java:70)
  while locating com.google.gerrit.reviewdb.server.ReviewDb

1 error
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1014)
        at com.google.gerrit.server.index.ChangeBatchIndexer$3.call(ChangeBatchIndexer.java:211)
        at com.google.gerrit.server.index.ChangeBatchIndexer$3.call(ChangeBatchIndexer.java:203)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
        at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132)
        at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58)
        at com.google.gerrit.server.index.ChangeBatchIndexer.indexAll(ChangeBatchIndexer.java:145)
        ... 3 more
[2013-12-23 14:49:36,720] ERROR com.google.gerrit.lucene.OnlineReindexer : Online reindex of schema version 5 failed

So I try to run it manually to see what happened there and I get the following...if you need the full dump of the error, let me know, i condensed it here since it kept yelling about the same file over and over.

gerrit@ark:~/gerrit$ java -jar bin/gerrit.war reindex --dry-run                                                  
[2013-12-23 15:31:22,203] INFO  com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamF
ileThreshold to 240m
[2013-12-23 15:31:22,422] INFO  com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk cache /home/gerr
it/gerrit/cache
Exception in thread "main" com.google.inject.CreationException: Guice creation errors:

1) Error injecting constructor, org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeF
SLock@/home/gerrit/gerrit/index/changes_0005/open/write.lock
  at com.google.gerrit.lucene.LuceneChangeIndex.<init>(LuceneChangeIndex.java:162)
  while locating com.google.gerrit.lucene.LuceneChangeIndex annotated with @com.google.inject.internal.UniqueAnno
tations$Internal(value=3)
  at com.google.gerrit.lucene.LuceneIndexModule$SingleVersionModule.getIndex(LuceneIndexModule.java:74)
  at com.google.gerrit.lucene.LuceneIndexModule$SingleVersionModule.getIndex(LuceneIndexModule.java:74)
  while locating com.google.gerrit.lucene.LuceneChangeIndex
    for parameter 1 at com.google.gerrit.lucene.LuceneIndexModule$SingleVersionListener.<init>(LuceneIndexModule.
java:88)
  at com.google.gerrit.lucene.LuceneIndexModule$SingleVersionListener.class(LuceneIndexModule.java:88)
  while locating com.google.gerrit.lucene.LuceneIndexModule$SingleVersionListener
  while locating com.google.gerrit.extensions.events.LifecycleListener annotated with @com.google.inject.internal
.UniqueAnnotations$Internal(value=5)
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/home/gerrit/ge
rrit/index/changes_0005/open/write.lock
        at org.apache.lucene.store.Lock.obtain(Lock.java:84)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:672)
        at com.google.gerrit.lucene.SubIndex.<init>(SubIndex.java:62)
        at com.google.gerrit.lucene.SubIndex.<init>(SubIndex.java:56)
        at com.google.gerrit.lucene.LuceneChangeIndex.<init>(LuceneChangeIndex.java:185)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFacto
ry.java:86)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
        at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:665)
        at com.google.gerrit.lucene.$Proxy27.create(Unknown Source)
        at com.google.gerrit.lucene.LuceneIndexModule$SingleVersionModule.getIndex(LuceneIndexModule.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Currently using MySQL Db and have index in the gerrit.config file.

[index]
        type = lucene

Bruce Zu

unread,
Dec 24, 2013, 2:18:49 AM12/24/13
to repo-d...@googlegroups.com
have you try  rm the cache and run reindex again.

Bruce Zu

unread,
Dec 24, 2013, 2:22:49 AM12/24/13
to repo-d...@googlegroups.com
 check 'ps -ef|grep gerrit' to see if still there is any gerrit running. 
 stop running gerrit and try reindex.


On Monday, December 23, 2013 10:34:19 PM UTC+8, Will DeBerry wrote:

Will DeBerry

unread,
Dec 27, 2013, 8:16:01 AM12/27/13
to repo-d...@googlegroups.com
Finally found the time to be able to bring it offline and reindex. That has seemed to straighten it all out.

Was weird that just creating a new project threw it off like this. Thanks again for the help, love this group :)

Gaurav Negi

unread,
Jun 15, 2016, 7:48:44 PM6/15/16
to Repo and Gerrit Discussion
Can I please know how to do reindexing?

Gaurav Negi

unread,
Jun 15, 2016, 7:55:13 PM6/15/16
to Repo and Gerrit Discussion

--
--
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.

Larry Liu

unread,
Nov 11, 2016, 8:27:06 AM11/11/16
to Repo and Gerrit Discussion
Hi guys, I know this thread is already very old. I ran : java -jar bin/gerrit.war reindex   and get these errors:
[2016-11-10 15:57:45,848] INFO  com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk cache /mnt/gerrit_2.9.1/cache

Exception in thread "main" com.google.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NullPointerException
  at com.google.gerrit.server.config.GitUploadPackGroupsProvider.<init>(GitUploadPackGroupsProvider.java:32)
  while locating com.google.gerrit.server.config.GitUploadPackGroupsProvider
  at com.google.gerrit.server.project.AccessControlModule.configure(AccessControlModule.java:32)
  while locating java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup$UUID> annotated with interface com.google.gerrit.server.config.GitUploadPackGroups

1 error
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
    at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:230)
    at com.google.gerrit.pgm.Reindex.createSysInjector(Reindex.java:240)
    at com.google.gerrit.pgm.Reindex.run(Reindex.java:148)
    at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25)
Caused by: java.lang.NullPointerException
    at com.google.gerrit.server.account.GroupControl.isVisible(GroupControl.java:134)
    at com.google.gerrit.server.account.InternalGroupBackend$2.apply(InternalGroupBackend.java:82)
    at com.google.gerrit.server.account.InternalGroupBackend$2.apply(InternalGroupBackend.java:78)
    at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
    at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
    at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
    at com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:43)
    at com.google.common.collect.Iterators.addAll(Iterators.java:356)
    at com.google.common.collect.Lists.newArrayList(Lists.java:147)
    at com.google.common.collect.Lists.newArrayList(Lists.java:129)
    at com.google.gerrit.server.account.InternalGroupBackend.suggest(InternalGroupBackend.java:86)
    at com.google.gerrit.server.account.UniversalGroupBackend.suggest(UniversalGroupBackend.java:88)
    at com.google.gerrit.server.account.GroupBackends.findBestSuggestion(GroupBackends.java:64)
    at com.google.gerrit.server.account.GroupBackends.findBestSuggestion(GroupBackends.java:49)
    at com.google.gerrit.server.config.GroupSetProvider.<init>(GroupSetProvider.java:52)
    at com.google.gerrit.server.config.GitUploadPackGroupsProvider.<init>(GitUploadPackGroupsProvider.java:32)
    at com.google.gerrit.server.config.GitUploadPackGroupsProvider$$FastClassByGuice$$ce246933.newInstance(<generated>)
    at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
    at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)

    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)
    at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
    ... 13 more
Reply all
Reply to author
Forward
0 new messages