Starting Gerrit Code Review: FAILED

8,812 views
Skip to first unread message

YenCheng Wang

unread,
Jul 10, 2013, 10:50:21 PM7/10/13
to repo-d...@googlegroups.com
Hi all,
    I can't start up my gerrit. could u please give my some hints ?? any information would be appreciated, very thanks !!

    my mysql-connector.jar version is 5.1.21

    here is my gerrit.config
[gerrit]
        basePath = /mnt/git_base/
        canonicalWebUrl = http://127.0.0.1:8080/
[database]
        type = MYSQL
        hostname = localhost
        database = reviewdb
        username = gerrit
        port = 3306
[auth]
        type = OPENID
[sendemail]
        smtpServer = localhost
[container]
        user = gerrit
        javaHome = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = http://*:8080/
[cache]
        directory = cache

    and here is my secure.config
[database]
        username = gerrit
        password = secret
[auth]
        registerEmailPrivateKey = C72QCLLA8cyyxxgZpFqFvNK2RqS3owj8tpc=
        restTokenPrivateKey = 40eoejLNVudnDt3wvXTaDSuSZZwU3aqxkLk=

    here is my error_log
[2013-07-11 10:41:14,420] INFO  com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk cache /home/gerrit/test/cache
[2013-07-11 10:41:15,022] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.inject.CreationException: Guice creation errors:

1) Error injecting constructor, com.google.gwtorm.server.OrmException: fetch failure on accounts
  at com.google.gerrit.server.account.AccountManager.<init>(AccountManager.java:67)
  at com.google.gerrit.server.config.GerritGlobalModule.configure(GerritGlobalModule.java:251)
  while locating com.google.gerrit.server.account.AccountManager

1 error
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:183)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
        at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:217)
        at com.google.gerrit.pgm.Daemon.createSysInjector(Daemon.java:351)
        at com.google.gerrit.pgm.Daemon.run(Daemon.java:176)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:67)
        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.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:168)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:92)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
        at Main.main(Main.java:25)
Caused by: com.google.gwtorm.server.OrmException: fetch failure on accounts
        at com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:151)
        at com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:448)
        at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:146)
        at com.google.gerrit.reviewdb.client.Account_Access_accounts_GwtOrm$$11.anyAccounts(Unknown Source)
        at com.google.gerrit.server.account.AccountManager.<init>(AccountManager.java:80)
        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.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        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:40)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:204)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:198)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:198)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:179)
        ... 13 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'reviewdb.accounts' doesn't exist
        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.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2318)
        at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:134)
        ... 32 more

Björn Pedersen

unread,
Jul 11, 2013, 5:16:02 AM7/11/13
to repo-d...@googlegroups.com


Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'reviewdb.accounts' doesn't exist

That indicattes that the database has not been initialised correctly. Did you run:
  java -jar gerrit.war init ?

 If yes, does your gerrit db user have create table rights on the database reviewdb?
 Or does this  database not exist yet, then the gerrit db user needs db superuser rights to create the database.

YenCheng Wang

unread,
Jul 11, 2013, 8:00:36 AM7/11/13
to repo-d...@googlegroups.com
Hi Björns,
    thank you for your reply~
    I have done the command --> java -jar gerrit.war init -d my_gerrit
    and, about the MYSQL setting, I followed the official document:
    is it enough ??

Björn Pedersen於 2013年7月11日星期四UTC+8下午5時16分02秒寫道:

Magnus Bäck

unread,
Jul 11, 2013, 8:26:44 AM7/11/13
to repo-d...@googlegroups.com
On Thursday, July 11, 2013 at 08:00 EDT,
YenCheng Wang <yenche...@gmail.com> wrote:

> I have done the command --> java -jar gerrit.war init -d my_gerrit
> and, about the MYSQL setting, I followed the official document:
>
> http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/install.html
> is it enough ??

Should be. But, if Gerrit still complains about a missing table
something didn't go right. Was there any indication of error in
the output from the init command? Is there a reviewdb database?
Is there a an 'accounts' table in it? Is Gerrit connecting to
that database and not some other database?

--
Magnus Bäck
ba...@google.com

YenCheng Wang

unread,
Jul 11, 2013, 8:54:05 PM7/11/13
to repo-d...@googlegroups.com
Hi Magnus,
    thank you for your information,
    this problem is solved, I just kill my MYSQL account, gerrit, and re-create again~
    then gerrit server works~
    thank you~

Magnus Bäck於 2013年7月11日星期四UTC+8下午8時26分44秒寫道:

Mohan .S

unread,
Apr 2, 2015, 1:15:24 AM4/2/15
to repo-d...@googlegroups.com, yenche...@gmail.com

  HI Team,

Now I am getting the same problem.

My Environment details as follows,

Operating System: Ubuntu 12.04.3 LTS – Server (64-Bit)

Kernel Version:  Linux GITSERVER 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Git Version: git version 1.7.9.5

Java Version: java version "1.7.0_75"

OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~precise1)

OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

Mysql Version: mysql  Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.2

Error message:-

root@gitserver:~# /home/mohan.s08/gerrit-2.10/bin/gerrit.sh start

Starting Gerrit Code Review: FAILED

Kindly help me to solve the same.

Thanks,

Mohan

Bassem Rabil

unread,
Apr 2, 2015, 8:00:42 AM4/2/15
to repo-d...@googlegroups.com, yenche...@gmail.com
You can check the error_log which is located at $REVIEW_SITE/logs/error_log. This log can give hints on which step starting Gerrit was failing, or otherwise paste the error here to get some guidance from the community here on how to troubleshoot the specific error you are having.

Regards
Bassem


On Thursday, April 2, 2015 at 1:15:24 AM UTC-4, Mohan .S wrote:

  HI Team,

Now I am getting the same problem.

My Environment details as follows,

Operating System: Ubuntu 12.04.3 LTS – Server (64-Bit)

Kernel Version:  Linux GITSERVER 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Git Version: git version 1.7.9.5

Java Version: java version "1.7.0_75"

OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~precise1)

OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

Mysql Version: mysql  Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.2

Error message:-

ro...@gitserver:~# /home/mohan.s08/gerrit-2.10/bin/gerrit.sh start

manas biswal

unread,
Apr 24, 2015, 7:29:13 AM4/24/15
to repo-d...@googlegroups.com, yenche...@gmail.com
Hi I am getting below error

[2015-04-24 21:29:12,957] INFO  com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk cache /home/oscontroller/gerrit2/cache
[2015-04-24 21:29:14,864] INFO  com.google.gerrit.server.config.ScheduleConfig : gc schedule parameter "gc.interval" is not configured
[2015-04-24 21:29:16,035] WARN  com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour256: invalid parameter passed to RC4 init - org.bouncycastle.crypto.params.ParametersWithIV
[2015-04-24 21:29:16,035] WARN  com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour128: invalid parameter passed to RC4 init - org.bouncycastle.crypto.params.ParametersWithIV
[2015-04-24 21:29:16,066] WARN  com.google.gerrit.httpd.GitWebConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2015-04-24 21:29:16,624] INFO  org.eclipse.jetty.util.log : Logging initialized @11323ms
[2015-04-24 21:29:17,008] INFO  com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 148m
[2015-04-24 21:29:17,055] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /home/oscontroller/gerrit2/plugins
[2015-04-24 21:29:17,061] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
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:118)
        at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
        at com.google.gerrit.pgm.Daemon.start(Daemon.java:291)
        at com.google.gerrit.pgm.Daemon.run(Daemon.java:203)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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)


Edwin Kempin

unread,
Apr 24, 2015, 7:30:30 AM4/24/15
to manas biswal, Repo and Gerrit Discussion, yenche...@gmail.com
2015-04-24 13:23 GMT+02:00 manas biswal <manas.b...@gmail.com>:
Hi I am getting below error

[2015-04-24 21:29:12,957] INFO  com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk cache /home/oscontroller/gerrit2/cache
[2015-04-24 21:29:14,864] INFO  com.google.gerrit.server.config.ScheduleConfig : gc schedule parameter "gc.interval" is not configured
[2015-04-24 21:29:16,035] WARN  com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour256: invalid parameter passed to RC4 init - org.bouncycastle.crypto.params.ParametersWithIV
[2015-04-24 21:29:16,035] WARN  com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour128: invalid parameter passed to RC4 init - org.bouncycastle.crypto.params.ParametersWithIV
[2015-04-24 21:29:16,066] WARN  com.google.gerrit.httpd.GitWebConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2015-04-24 21:29:16,624] INFO  org.eclipse.jetty.util.log : Logging initialized @11323ms
[2015-04-24 21:29:17,008] INFO  com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 148m
[2015-04-24 21:29:17,055] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /home/oscontroller/gerrit2/plugins
[2015-04-24 21:29:17,061] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) No index versions ready; run Reindex

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

Michał Sochoń

unread,
Apr 24, 2015, 1:53:10 PM4/24/15
to repo-d...@googlegroups.com, yenche...@gmail.com
You may need to totally wipe index directory, and that few times.
In your case its probably
rm -rf  /home/oscontroller/gerrit2/index/*
Then run reindex as Edwin sugessted.
Reply all
Reply to author
Forward
0 new messages