error while starting tomcat with deployed gerrit

682 views
Skip to first unread message

Matthias Höpfner

unread,
May 11, 2015, 2:10:53 PM5/11/15
to repo-d...@googlegroups.com
Hello,
I tried to setup a tomcat container for gerrit. So far I have a postgres database running already running and gerrit is initialized as well. But if I try to start my tomcat I see a error message. I guess (hopefully) someone of you already saw that error message. Can anyone give me some advise where to look on please...?

I use gerrit version 2.11 and did the initialization process already.
So my setup is as follow:

Folder structure:
   The folder for gerrit:
   /srv/gerrit/

   The folder for tomcat (CATALINA_HOME and CATALINA_BASE):
   /srv/tomcat/

Config files:
   /srv/gerrit/etc/gerrit.config contains:
[gerrit]
    basePath = /srv/gitrepos/
    canonicalWebUrl = http://someMachine:18080/
[database]
    type = postgresql
    hostname = localhost
    port = 5432
    database = reviewdb
    username = gerrit2
[index]
    type = LUCENE
[auth]
    type = HTTP
[sendemail]
    smtpServer = localhost
[container]
    user = someuser
    javaHome = /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre
    war = /srv/tomcat/webapps/gerrit.war
[sshd]
    listenAddress = *:29418
[httpd]
    listenUrl = http://*:18080/
[cache]
    directory = cache

If I start my tomcat with 'export CATALINA_OPTS="-Dgerrit.site_path=/local/sandbox/gerrit/ -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"' then I get that error:
  
Output in /srv/tomcat/logs/localhost.2015-05-11.log
11-May-2015 18:47:26.318 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter guiceFilter
 com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bound.
  while locating java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName()
    for parameter 2 at com.google.gerrit.server.securestore.SecureStoreProvider.<init>(SecureStoreProvider.java:44)
  at com.google.gerrit.server.config.GerritServerConfigModule.configure(GerritServerConfigModule.java:80)

1 error
    at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:162)
    at com.google.gerrit.httpd.WebAppInitializer.getInjector(WebAppInitializer.java:363)
    at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
    at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:370)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4586)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
    ...

... and if I start the tomcat without I get that:
11-May-2015 18:52:55.572 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter guiceFilter
 com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Cannot create ReviewDb
  while locating com.google.gerrit.server.schema.ReviewDbDatabaseProvider
  at com.google.gerrit.server.schema.DatabaseModule.configure(DatabaseModule.java:31)
  while locating com.google.gwtorm.jdbc.Database<com.google.gerrit.reviewdb.server.ReviewDb>
  at com.google.gerrit.server.schema.DatabaseModule.configure(DatabaseModule.java:29)
  while locating com.google.gwtorm.server.SchemaFactory<com.google.gerrit.reviewdb.server.ReviewDb>

1 error
    at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:162)
    at com.google.gerrit.httpd.WebAppInitializer.getInjector(WebAppInitializer.java:363)
    at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
    at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:370)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4586)
    ...


Hugo Arès

unread,
May 11, 2015, 4:39:06 PM5/11/15
to repo-d...@googlegroups.com
That's strange, I saw a similar error (No implementation for ...securestore.SecureStoreClassName...) when I was testing 2.11-rc1, I reported the issue[1] and it was fixed[2] and included in 2.11.

Did you download 2.11 release or you built it?

Hugo

[1]https://code.google.com/p/gerrit/issues/detail?id=3255
[2]https://gerrit-review.googlesource.com/#/c/66511/

Matthias Höpfner

unread,
May 12, 2015, 4:13:07 PM5/12/15
to repo-d...@googlegroups.com
Hi Hugo!
I use a downloaded 2.11 release version.
Now its working fine. I guess there was a miss leading config in the database.
Anyway - thank you for your replay!

Greetings,
Matthias

Eric Lemanissier

unread,
May 13, 2015, 7:01:02 AM5/13/15
to repo-d...@googlegroups.com
Hi Hugo and Matthias,

I just tried to install gerrit 2.11 war release version in tomcat, and I get the same error " No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bound." Do you have any idea what I should check ? 2.10 was working fine

Thanks in advance,

Eric

Eric Lemanissier

unread,
May 13, 2015, 9:16:58 AM5/13/15
to repo-d...@googlegroups.com
Here is the error in localhost.log

May 13, 2015 1:49:05 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter guiceFilter
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bo$
  while locating java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName()
    for parameter 2 at com.google.gerrit.server.securestore.SecureStoreProvider.<init>(SecureStoreProvider.java:44)
  at com.google.gerrit.server.config.GerritServerConfigModule.configure(GerritServerConfigModule.java:80)

1 error
        at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:162)
        at com.google.gerrit.httpd.WebAppInitializer.getInjector(WebAppInitializer.java:363)
        at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
        at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:370)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1385)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1392)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1656)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1665)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1645)
        at java.lang.Thread.run(Thread.java:745)


And the gerrit.config file:

[gerrit]
        basePath = git
        canonicalWebUrl = http://thehost:8080/gerrit/
[database]
        type = MYSQL
        hostname = localhost
        port = 3306
        database = gerrit
        username = gerrit

[index]
        type = LUCENE
[auth]
        type = LDAP
        gitBasicAuth = true
[ldap]
        server = ldap://localhost
        accountBase = cn=users,dc=ldap,dc=thehost,dc=com
        groupBase = cn=groups,dc=ldap,dc=thehost,dc=com
        accountFullName = gecos
[user]
        email = networ...@thehost.com
[container]
        user = http
        javaHome = /volume1/@appstore/JavaManager/Java/jre
[sshd]
        listenAddress = *:29418
[cache]
        directory = cache
[commentlink "mantis"]
        match = "#(\\d+)"
[commentlink "changeid"]
        match = (I[0-9a-f]{8,40})
        link = "#q,$1"
[trackingid "mantis"]
        footer = Issue:
        match = "#\\d*"
        system = MANTIS

Saša Živkov

unread,
May 13, 2015, 11:10:51 AM5/13/15
to Eric Lemanissier, repo-d...@googlegroups.com
On Wed, May 13, 2015 at 3:16 PM, Eric Lemanissier <e.lema...@physioflow.com> wrote:
Here is the error in localhost.log

May 13, 2015 1:49:05 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter guiceFilter
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bo$
  while locating java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName()
    for parameter 2 at com.google.gerrit.server.securestore.SecureStoreProvider.<init>(SecureStoreProvider.java:44)
  at com.google.gerrit.server.config.GerritServerConfigModule.configure(GerritServerConfigModule.java:80)

What is in your CATALINA_OPTS env variable? Does it contain the -Dgerrit.site_path=...  ?
Or do you define a JNDI resource jdbc/ReviewDb in your Tomcat configuration?

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

Eric Lemanissier

unread,
May 13, 2015, 11:32:31 AM5/13/15
to Saša Živkov, repo-d...@googlegroups.com
I have CATALINA_OPTS='-Xmx512m -Xms512m -XX:MaxPermSize=256m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dgerrit.site_path=/volume1/gerrit -DJENKINS_HOME=/volume1/jenkins_data/'

What is more, I created a file conf/Catalina/localhost/gerrit.xml with the following content

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Resource
       name="jdbc/ReviewDb"
       type="javax.sql.DataSource"
       username="gerrit"
       driverClassName="org.gjt.mm.mysql.Driver"
       password="qsdfazer"
       url="jdbc:mysql://localhost:3306/gerrit"
       auth="Container"
    />
</Context>
Eric LEMANISSIER
Signal Processing Engineer
Manatec Biomedical
10 bis, Rue Jacob Courant
78300 Poissy
FRANCE
Tel +33 3 72 82 50 00

Saša Živkov

unread,
May 13, 2015, 11:38:08 AM5/13/15
to Eric Lemanissier, repo-d...@googlegroups.com
On Wed, May 13, 2015 at 5:32 PM, Eric Lemanissier <e.lema...@physioflow.com> wrote:
I have CATALINA_OPTS='-Xmx512m -Xms512m -XX:MaxPermSize=256m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dgerrit.site_path=/volume1/gerrit -DJENKINS_HOME=/volume1/jenkins_data/'

What is more, I created a file conf/Catalina/localhost/gerrit.xml with the following content

You don't need both, either the gerrit.site_path system property or the jndi property is enough to start Gerrit.
If the gerrit.site_path is defined then it is used, otherwise the jndi property is used.

Just for an experiment: remove the -Dgerrit.site_path from the CATALINA_OPTS and try starting Gerrit again.

Eric Lemanissier

unread,
May 13, 2015, 11:49:05 AM5/13/15
to Saša Živkov, repo-d...@googlegroups.com
It worked ! Thanks a lot! I did not realize the site_path was also stored in the database

Saša Živkov

unread,
May 13, 2015, 12:40:51 PM5/13/15
to Eric Lemanissier, repo-d...@googlegroups.com
On Wed, May 13, 2015 at 5:49 PM, Eric Lemanissier <e.lema...@physioflow.com> wrote:
It worked ! Thanks a lot! I did not realize the site_path was also stored in the database

This means that we have a bug in Gerrit's startup when running in a servlet container
and using the site_path system property to define the site path.

I will provide a fix on Friday... if no one does it before ;-) 

Eric LEMANISSIER

unread,
May 13, 2015, 1:04:45 PM5/13/15
to Saša Živkov, repo-d...@googlegroups.com
I relayed the information on the existing issue : https://code.google.com/p/gerrit/issues/detail?id=3255
Thanks again !

Hugo Arès

unread,
May 13, 2015, 3:10:26 PM5/13/15
to repo-d...@googlegroups.com, ziv...@gmail.com

Andreas Ntaflos

unread,
Aug 17, 2015, 3:46:59 AM8/17/15
to Repo and Gerrit Discussion
I am currently experiencing the same or a similar problem it seems, trying to upgrade Gerrit from 2.8.3 to 2.11.2, running within Tomcat 7.0.62 with Java 1.7.0_67 (on Ubuntu 12.04.5)

I have defined the jdbc/ReviewDb resource within the webapp context and the database's system_config table contains the column site_path set to '/home/service/gerrit2/gerrit' in my case.

The CATALINA_OPTS variable contains -Dgerrit.init and -Dgerrit.init_path=/home/service/gerrit2/gerrit:

export CATALINA_OPTS="-Djava.awt.headless=true \
  -Dgerrit.init_path=/home/service/gerrit2/gerrit \
  -Dgerrit.init=true \
  -Djuli-logback.configurationFile=file:$CATALINA_HOME/conf/logback.xml \
  -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
  -Xms512m \
  -Xmx512m \
  -XX:MaxPermSize=512m"

Starting Tomcat results in these error messages:

2015-08-13T23:37:18.755 [ERROR] [ost-startStop-1] [o.a.c.c.C.[.[localhost].[/]   ] Exception starting filter guiceFilter
java
.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:



1) No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bound.
 
while locating java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName()
   
for parameter 2 at com.google.gerrit.server.securestore.SecureStoreProvider.<init>(SecureStoreProvider.java:44)
  at com
.google.gerrit.server.config.GerritServerConfigModule.configure(GerritServerConfigModule.java:80)


1
error
        at com
.google.gerrit.httpd.SiteInitializer.init(SiteInitializer.java:71) ~[gerrit-war-init.jar:na]
        at com
.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:142) ~[gerrit-war-init.jar:na]
        at com
.google.gerrit.httpd.WebAppInitializer.getInjector(WebAppInitializer.java:367) ~[gerrit-war-init.jar:na]
        at com
.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47) ~[guice-servlet-4.0-beta5.jar:na]
        at com
.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:374) ~[gerrit-war-init.jar:na]
        at org
.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4854) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5546) [catalina.jar:7.0.62]
        at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) [catalina.jar:7.0.62]
        at org
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677) [catalina.jar:7.0.62]
        at org
.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912) [catalina.jar:7.0.62]
        at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_67]
        at java
.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_67]
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
        at java
.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:



1) No implementation for java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName() was bound.
 
while locating java.lang.String annotated with @com.google.gerrit.server.securestore.SecureStoreClassName()
   
for parameter 2 at com.google.gerrit.server.securestore.SecureStoreProvider.<init>(SecureStoreProvider.java:44)
  at com
.google.gerrit.server.config.GerritServerConfigModule.configure(GerritServerConfigModule.java:80)


1
error
        at com
.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448) ~[guice-4.0-beta5.jar:na]
        at com
.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155) ~[guice-4.0-beta5.jar:na]
        at com
.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107) ~[guice-4.0-beta5.jar:na]
        at com
.google.inject.Guice.createInjector(Guice.java:96) ~[guice-4.0-beta5.jar:na]
        at com
.google.inject.Guice.createInjector(Guice.java:73) ~[guice-4.0-beta5.jar:na]
        at com
.google.gerrit.pgm.util.SiteProgram.getDbType(SiteProgram.java:206) ~[gerrit-pgm-util.jar:na]
        at com
.google.gerrit.pgm.util.SiteProgram.createDbInjector(SiteProgram.java:133) ~[gerrit-pgm-util.jar:na]
        at com
.google.gerrit.pgm.init.BaseInit.createSysInjector(BaseInit.java:406) ~[gerrit-pgm-init.jar:na]
        at com
.google.gerrit.pgm.init.BaseInit.createSiteRun(BaseInit.java:393) ~[gerrit-pgm-init.jar:na]
        at com
.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:119) ~[gerrit-pgm-init.jar:na]
        at com
.google.gerrit.httpd.SiteInitializer.init(SiteInitializer.java:65) ~[gerrit-war-init.jar:na]
       
... 20 common frames omitted


The proposed solution here was to make sure the gerrit.site_path property is never set, so that Gerrit looks in the database for the site path, but as you can see I never set gerrit.site_path anywhere in the first place.

I also made sure to remove the old Bouncy Castle library from CATALINA_BASE/lib and clear out the CATALINA_BASE/work directory, in case that interferes with upgrading.

I further tried removing the gerrit.init_path property from CATALINA_OPTS but that only results in Gerrit refusing to continue because the database schema is wrong:

2015-08-13T23:33:02.014 [ERROR] [ost-startStop-1] [o.a.c.c.C.[.[localhost].[/]   ] Exception starting filter guiceFilter
com
.google.inject.ProvisionException: Unable to provision, see the following errors:


1) Unsupported schema version 84; expected schema version 107.  Run init to upgrade:
$ java
-jar /home/service/gerrit2/gerrit/bin/gerrit.war init -d /home/service/gerrit2/gerrit


1 error
        at com
.google.gerrit.server.schema.SchemaVersionCheck.start(SchemaVersionCheck.java:64) ~[gerrit-server-server.jar:na]
        at com
.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74) ~[gerrit-server-server.jar:na]
        at com
.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:376) ~[gerrit-war-init.jar:na]
        at org
.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) ~[catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4854) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5546) [catalina.jar:7.0.62]
        at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.62]
        at org
.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) [catalina.jar:7.0.62]
        at org
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677) [catalina.jar:7.0.62]
        at org
.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912) [catalina.jar:7.0.62]
        at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_67]
        at java
.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_67]
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
        at java
.lang.Thread.run(Thread.java:745) [na:1.7.0_67]


The documentation at https://gerrit-documentation.storage.googleapis.com/Documentation/2.11.2/config-auto-site-initialization.html#_example_2 leads me to believe that upgrading the database and site should just work when setting gerrit.init and (optionally) gerrit.init_path. Am I mistaken? Or is this another manifestation of the same bug?

Any help and input is appreciated.

Thanks,

Andreas

Hugo Arès

unread,
Aug 17, 2015, 11:05:46 AM8/17/15
to Repo and Gerrit Discussion
Hi,

There are couple of possible paths in the code when starting Gerrit in Tomcat, we fixed 2 so far but it looks like you found another one that is still broken.

Can you try again but remove the option to run the init on startup (-Dgerrit.init and -Dgerrit.init_path) and obviously, you will need to run the init manually before starting Gerrit.
...

Andreas Ntaflos

unread,
Aug 17, 2015, 11:57:41 AM8/17/15
to repo-d...@googlegroups.com, Hugo Arès
Hi,

thanks for the reply!

On 2015-08-17 17:05, Hugo Arès wrote:
> Hi,
>
> There are couple of possible paths in the code when starting Gerrit in
> Tomcat, we fixed 2 so far but it looks like you found another one that
> is still broken.

Ok, good to know.

> Can you try again but remove the option to run the init on startup
> (-Dgerrit.init and -Dgerrit.init_path) and obviously, you will need to
> run the init manually before starting Gerrit.

This is what I ended up doing and it seems to have worked fine, thanks.

I also had to run

java -jar gerrit-2.11.2.war reindex -d /home/service/gerrit2/gerrit

manually. Is this related to the problem discussed here? Should
Tomcat/Gerrit have done that automatically (like it should have updated
the database schema)?

Just for the sake of completeness here is the stack trace that goes with
this when starting Tomcat:

2015-08-14T00:31:36.284 [ERROR] [ost-startStop-1]
[o.a.c.c.C.[.[localhost].[/] ] Exception starting filter guiceFilter
com.google.inject.ProvisionException: Unable to provision, see the
following errors:

1) No index versions ready; run Reindex

1 error
at
com.google.gerrit.lucene.LuceneVersionManager.start(LuceneVersionManager.java:119)
~[gerrit-lucene-lucene.jar:na]
at
com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
~[gerrit-server-server.jar:na]
at
com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:376)
[catalina.jar:7.0.62]
signature.asc
Reply all
Reply to author
Forward
0 new messages