gerrit setup fails with RepositoryNotFoundException: repository not found on schema 81

1,437 views
Skip to first unread message

Paresh Purabhiya

unread,
Mar 24, 2014, 6:44:02 AM3/24/14
to repo-d...@googlegroups.com

 Hi
 I am very new to gerrit. But I need to setup gerrit for certain projects in my company. can somebody in this group please help me understand what could be the issue or what could
 be wrong in my gerrit setup with the steps mentioned below please.

 Thanks a lot for your help and support. Below are the set of errors that I get.

  I have followed the below steps to setup gerrit.
  1. Downloaded gerrit 2.8.2.war file from "https://code.google.com/p/gerrit/"
  2. Followed the instructions from the site "https://git.eclipse.org/r/Documentation/install.html"
  3. followed the instructions for Apache web configuration from Gerrit documentation
  4. when I am trying to start gerrit with the command ./gerrit.sh start it fails and gives me the following error mentioned below

     1) Unsupported schema version 80; expected schema version 84.  Run init to upgrade:
         $ java -jar /path/to/gerrit.war init -d /Path/to/gerrit_site

  When I run the above command in the instructions i get the below mentioned errors.

  Upgrading schema to 81 ...
  Upgrading schema to 82 ...
  Upgrading schema to 83 ...
  Upgrading schema to 84 ...
  Migrating data to schema 81 ...
  Exception in thread "main" com.google.gwtorm.server.OrmException: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /basePath/in/gerrit.config 
  /All-Projects
    at com.google.gerrit.server.schema.Schema_81.migrateData(Schema_81.java:65)
    at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:143)
    at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:88)
    at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:79)
    at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:64)
    at com.google.gerrit.pgm.BaseInit$SiteRun.upgradeSchema(BaseInit.java:212)
    at com.google.gerrit.pgm.BaseInit.run(BaseInit.java:91)
    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:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:169)
    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: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /home/cmadmin/Work/test_repo_sync/.repo/All-Projects
    at com.google.gerrit.server.git.LocalDiskRepositoryManager.openRepository(LocalDiskRepositoryManager.java:171)
    at com.google.gerrit.server.schema.Schema_81.migrateStartReplicationCapability(Schema_81.java:106)
    at com.google.gerrit.server.schema.Schema_81.migrateStartReplicationCapability(Schema_81.java:100)
    at com.google.gerrit.server.schema.Schema_81.migrateData(Schema_81.java:63)
    ... 15 more


  This is my gerrit.config file parameters :
  -----------------------------------------------------------

 [gerrit]
    basePath = /home/user/Work/test_repo_sync/.repo
    canonicalWebUrl = http://review.example.com/
[database]
    type = mysql
    hostname = review.example.com
    database = reviewdb
    username = user
[auth]
    type = LDAP
[ldap]
    server = ldap://review.example.com
    username = uid=user,ou=people,dc=example,dc=com
    accountBase = ou=people,dc=example,dc=com
    groupBase = ou=groups,dc=example,dc=com
    sslVerify = false
    accountPattern = (uid=${username})
    accountEmailAddress = user...@mycompanyname.com
    accountSshUserName = uid
    groupName = uid=cmadmin,ou=groups,dc=example,dc=com
    groupMemberPattern = (cn=${groupName})
[sendemail]
    smtpServer = mail.mycompanyname.com
    smtpEncryption = SSL
    smtpUser = user...@mycompanyname.com
[container]
    user = username
    javaHome = /usr/local/java/jdk1.6.0_38/jre
[sshd]
    listenAddress = *:29418
[httpd]
    listenUrl = http://*:8080/
[cache]
    directory = cache
 
Apprecaite your help in this regards.

Thanks & Regards
Paresh Purabhiya 

 

David Pursehouse

unread,
Mar 24, 2014, 12:01:10 PM3/24/14
to Paresh Purabhiya, repo-discuss
On Mon, Mar 24, 2014 at 3:44 AM, Paresh Purabhiya <pareshp...@gmail.com> wrote:
 
Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /home/cmadmin/Work/test_repo_sync/.repo/All-Projects
    at com.google.gerrit.server.git.LocalDiskRepositoryManager.openRepository(LocalDiskRepositoryManager.java:171)
    at com.google.gerrit.server.schema.Schema_81.migrateStartReplicationCapability(Schema_81.java:106)
    at com.google.gerrit.server.schema.Schema_81.migrateStartReplicationCapability(Schema_81.java:100)
    at com.google.gerrit.server.schema.Schema_81.migrateData(Schema_81.java:63)
    ... 15 more



Does All-Projects actually exist in  the /home/user/Work/test_repo_sync/.repo folder?

Message has been deleted

Paresh Purabhiya

unread,
Mar 25, 2014, 5:08:46 AM3/25/14
to repo-d...@googlegroups.com
Hi David,

Thanks for the response. No the All-Projects did not exist in the /home/user/Work/test_repo_sync/.repo folder?.

But the issue has been resolved now, Since after going thru this issue in this discussion gtoup "https://code.google.com/p/gerrit/issues/detail?id=1305"  I deleted the mysql database and re-created the same and that resolved the issue.

However I have one more query where in I would like to request you to please help me with your inputs. I have setup gerrit version 2.8.2 and was able to set it up with LDAP authenticaton method.

But I do not see the Admin TAB with the 1st user logged in But instead I see the People TAB.
However the 1st user has all the rights and privileges of an administrator (attached is the screenshot for the same)
 1. has something changed with this gerrit version about Admin TAB in gerrit Webpage ?
 2. is this the correct or is something missing ?
Screenshot.png

David Pursehouse

unread,
Mar 25, 2014, 3:25:41 PM3/25/14
to Paresh Purabhiya, repo-discuss
This is expected.  The Admin tab was removed; functions like "create new group" and "create new project" are now listed under the "people" and "projects" tabs respectively, for users who have the necessary permissions.

Paresh Purabhiya

unread,
Mar 27, 2014, 7:47:28 AM3/27/14
to repo-d...@googlegroups.com

 Hi David,

 Thanks a lot for your support.
Reply all
Reply to author
Forward
0 new messages