2

I'm trying to spin up a gerrit workspace on ubuntu following the details provided in the following link.

https://gerrit.googlesource.com/docker-gerrit

However, this keeps failing only in when trying to initialise gerrit. If I run with sudo, I get the following error

gerrit_postgres_1 is up-to-date
Creating gerrit_ldap_1 ... done
Creating gerrit_gerrit_1 ... done
Attaching to gerrit_gerrit_1
gerrit_1      | fatal: /var/gerrit/etc/mail
gerrit_1      | fatal: Cannot make directory /var/gerrit/etc/mail
gerrit_gerrit_1 exited with code 128

When I run it as the other user in the computer, I get the following error.

gerrit_ldap_1 is up-to-date
gerrit_postgres_1 is up-to-date
Starting gerrit_gerrit_1 ... done
Attaching to gerrit_gerrit_1
gerrit_1      | Exception in thread "main" java.io.IOException: Permission denied
gerrit_1      |     at java.io.UnixFileSystem.createFileExclusively(Native Method)
gerrit_1      |     at java.io.File.createNewFile(File.java:1012)
gerrit_1      |     at org.eclipse.jgit.util.FS_POSIX.createNewFileAtomic(FS_POSIX.java:434)
gerrit_1      |     at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:179)
gerrit_1      |     at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:227)
gerrit_1      |     at com.google.gerrit.server.index.GerritIndexStatus.save(GerritIndexStatus.java:48)
gerrit_1      |     at com.google.gerrit.server.index.IndexUtils.setReady(IndexUtils.java:43)
gerrit_1      |     at com.google.gerrit.pgm.init.InitIndex.run(InitIndex.java:71)
gerrit_1      |     at com.google.gerrit.pgm.init.SitePathInitializer.run(SitePathInitializer.java:93)
gerrit_1      |     at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:138)
gerrit_1      |     at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
gerrit_1      |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
gerrit_1      |     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
gerrit_1      |     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
gerrit_1      |     at java.lang.reflect.Method.invoke(Method.java:498)
gerrit_1      |     at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:223)
gerrit_1      |     at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:119)
gerrit_1      |     at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
gerrit_1      |     at Main.main(Main.java:24)
gerrit_gerrit_1 exited with code 1

I have just a single user in this computer apart from root. I'm not sure what I can do about this and I've looked up everywhere to no avail. All the other services are initialised successfully, but gerrit.

I've also created the external storage folder both with and without root, and I still keep receiving errors.

Any thoughts?

0 Answers0