Install pull-replication failed

135 views
Skip to first unread message

Alexey Ponomarev

unread,
Jun 11, 2024, 2:35:45 AMJun 11
to Repo and Gerrit Discussion
Hi

I have problem with pull-replication plugin.

When I install this plugin (pull-replication  v3.5.6-245-g91394d6e06) I have error:

gerrit-gerrit-1 | [2024-06-09T19:06:06.970Z] [SSH gerrit plugin reload (gerritadmin)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user gerritadmin account 1000000) during gerrit plugin reload
gerrit-gerrit-1 | com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/googlesource/gerrit/plugins/deleteproject/fs/RepositoryDelete
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2085)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache.get(LocalCache.java:4036)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4059)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5041)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5048)
gerrit-gerrit-1 | at com.google.inject.internal.FailableCache.get(FailableCache.java:61)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:53)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:152)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:607)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:990)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:902)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:881)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:881)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:302)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:225)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:996)
gerrit-gerrit-1 | at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:48)
gerrit-gerrit-1 | at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:60)
gerrit-gerrit-1 | at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:137)
gerrit-gerrit-1 | at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:240)
gerrit-gerrit-1 | at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:265)
gerrit-gerrit-1 | at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:196)
gerrit-gerrit-1 | at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:523)
gerrit-gerrit-1 | at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:444)
gerrit-gerrit-1 | at com.google.gerrit.sshd.commands.PluginReloadCommand.doRun(PluginReloadCommand.java:33)
gerrit-gerrit-1 | at com.google.gerrit.sshd.commands.PluginAdminSshCommand.run(PluginAdminSshCommand.java:35)
gerrit-gerrit-1 | at com.google.gerrit.sshd.SshCommand.lambda$start$1(SshCommand.java:81)
gerrit-gerrit-1 | at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:495)
gerrit-gerrit-1 | at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:113)
gerrit-gerrit-1 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
gerrit-gerrit-1 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
gerrit-gerrit-1 | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
gerrit-gerrit-1 | at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:703)
gerrit-gerrit-1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
gerrit-gerrit-1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
gerrit-gerrit-1 | at java.base/java.lang.Thread.run(Thread.java:840)
gerrit-gerrit-1 | Caused by: java.lang.NoClassDefFoundError: com/googlesource/gerrit/plugins/deleteproject/fs/RepositoryDelete
gerrit-gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
gerrit-gerrit-1 | at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
gerrit-gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2555)
gerrit-gerrit-1 | at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:299)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:121)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:737)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:982)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:902)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:302)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:225)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.createParameterInjector(InjectorImpl.java:1083)
gerrit-gerrit-1 | at com.google.inject.internal.InjectorImpl.getParametersInjectors(InjectorImpl.java:1070)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:74)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
gerrit-gerrit-1 | at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
gerrit-gerrit-1 | at com.google.inject.internal.FailableCache$1.load(FailableCache.java:48)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2328)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2187)
gerrit-gerrit-1 | at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2081)
gerrit-gerrit-1 | ... 36 more
gerrit-gerrit-1 | Caused by: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryDelete
gerrit-gerrit-1 | at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
gerrit-gerrit-1 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
gerrit-gerrit-1 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
gerrit-gerrit-1 | ... 57 more

Plugins:

❯ ssh -p 29418 gerritadmin@localhost gerrit plugin ls
Name                           Version    Api-Version      Status   File
-------------------------------------------------------------------------------
avatars-gravatar               b687eb0b55 3.10.0-SNAPSHOT  ENABLED  avatars-gravatar.jar
codemirror-editor              v3.10.0    3.10.1-SNAPSHOT  ENABLED  codemirror-editor.jar
commit-message-length-validator v3.9.5     3.10.1-SNAPSHOT  ENABLED  commit-message-length-validator.jar
delete-project                 v3.10.0    3.10.1-SNAPSHOT  ENABLED  delete-project.jar
download-commands              v3.9.5     3.10.1-SNAPSHOT  ENABLED  download-commands.jar
gitiles                        v3.9.5     3.10.1-SNAPSHOT  ENABLED  gitiles.jar
hooks                          v3.10.0    3.10.1-SNAPSHOT  ENABLED  hooks.jar
plugin-manager                 v3.10.0    3.10.1-SNAPSHOT  ENABLED  plugin-manager.jar
replication                    v3.10.0    3.10.1-SNAPSHOT  ENABLED  replication.jar
reviewnotes                    v3.10.0    3.10.1-SNAPSHOT  ENABLED  reviewnotes.jar
singleusergroup                v3.10.0    3.10.1-SNAPSHOT  ENABLED  singleusergroup.jar
uploadvalidator                v3.0.0-rc1-317-g81b06d201b 3.10.0-SNAPSHOT  ENABLED  uploadvalidator.jar
webhooks                       v3.10.0    3.10.1-SNAPSHOT  ENABLED  webhooks.jar

What the problem with this plugin? 


Dariusz Luksza

unread,
Jun 11, 2024, 3:39:58 AMJun 11
to Alexey Ponomarev, Repo and Gerrit Discussion
Hi Alexey,

You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.

This will be improved in the next release.

Hope this helps

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/732bb80f-b7b7-4627-b85c-95664bd2c7fen%40googlegroups.com.


--
Blog: https://luksza.org http://HabitChallenge.co
LinkedIn: https://linkedin.com/in/dluksza

P.S. Have you checked the Habit Challenge app? You should ;)

Matthias Sohn

unread,
Jun 11, 2024, 4:23:11 AMJun 11
to Dariusz Luksza, Alexey Ponomarev, Repo and Gerrit Discussion
On Tue, Jun 11, 2024 at 9:39 AM Dariusz Luksza <dariusz...@gmail.com> wrote:
Hi Alexey,

You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.

This will be improved in the next release.

The documentation [1] mentions that the delete-projects and replication plugins need to be installed in the $GERRIT_SITE/plugins folder.
Can you correct the documentation until this has been improved ?

 

Luca Milanesio

unread,
Jun 11, 2024, 3:23:34 PMJun 11
to Repo and Gerrit Discussion

On 11 Jun 2024, at 09:22, Matthias Sohn <matthi...@gmail.com> wrote:

On Tue, Jun 11, 2024 at 9:39 AM Dariusz Luksza <dariusz...@gmail.com> wrote:
Hi Alexey,

You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.

This will be improved in the next release.

The documentation [1] mentions that the delete-projects and replication plugins need to be installed in the $GERRIT_SITE/plugins folder.
Can you correct the documentation until this has been improved ?

Actually, I believe that was a mistake from the very beginning.
The classes needed *must* be shaded with the plugin, we should fix the issue and result the normal operations with the installation of pull-replication into the $GERRIT_SITE/plugins directory.

Luca.

Luca Milanesio

unread,
Jun 11, 2024, 5:38:23 PMJun 11
to Repo and Gerrit Discussion, Luca Milanesio

On 11 Jun 2024, at 20:23, Luca Milanesio <luca.mi...@gmail.com> wrote:


On 11 Jun 2024, at 09:22, Matthias Sohn <matthi...@gmail.com> wrote:

On Tue, Jun 11, 2024 at 9:39 AM Dariusz Luksza <dariusz...@gmail.com> wrote:
Hi Alexey,

You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.

This will be improved in the next release.

The documentation [1] mentions that the delete-projects and replication plugins need to be installed in the $GERRIT_SITE/plugins folder.
Can you correct the documentation until this has been improved ?

Actually, I believe that was a mistake from the very beginning.
The classes needed *must* be shaded with the plugin, we should fix the issue and result the normal operations with the installation of pull-replication into the $GERRIT_SITE/plugins directory.

Alexey Ponomarev

unread,
Jun 12, 2024, 7:07:04 AMJun 12
to Dariusz Luksza, Repo and Gerrit Discussion
You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.
Thank you. It's help, but I have next error:

gerrit-gerrit-1      | [2024-06-12T10:57:33.574Z] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin pull-replication
gerrit-gerrit-1      | com.google.inject.ProvisionException: Unable to provision, see the following errors:
gerrit-gerrit-1      |
gerrit-gerrit-1      | 1) [Guice/NullInjectedIntoNonNullable]: null returned by binding at PluginGuiceEnvironment$2.configure(PluginGuiceEnvironment.java:595) (installed by: PluginGuiceEnvironment$1 -> PluginGuiceEnvironment$2)
gerrit-gerrit-1      |  but the 10th parameter instanceId of ReplicationQueue.<init>(ReplicationQueue.java:125) is not @Nullable
gerrit-gerrit-1      |   at PluginGuiceEnvironment$2.configure(PluginGuiceEnvironment.java:595)
gerrit-gerrit-1      |       \_ installed by: PluginGuiceEnvironment$1 -> PluginGuiceEnvironment$2
gerrit-gerrit-1      |   at ReplicationQueue.<init>(ReplicationQueue.java:125)
gerrit-gerrit-1      |       \_ for 10th parameter instanceId
gerrit-gerrit-1      |   at PullReplicationModule.configure(PullReplicationModule.java:122)
gerrit-gerrit-1      |   while locating ReplicationQueue
gerrit-gerrit-1      |   while locating LifecycleListener annotated with @UniqueAnnotations$Internal(233)
gerrit-gerrit-1      |
gerrit-gerrit-1      | Learn more:
gerrit-gerrit-1      |   https://github.com/google/guice/wiki/NULL_INJECTED_INTO_NON_NULLABLE
gerrit-gerrit-1      |
gerrit-gerrit-1      | 1 error
gerrit-gerrit-1      |
gerrit-gerrit-1      | ======================
gerrit-gerrit-1      | Full classname legend:
gerrit-gerrit-1      | ======================
gerrit-gerrit-1      | LifecycleListener:          "com.google.gerrit.extensions.events.LifecycleListener"
gerrit-gerrit-1      | PluginGuiceEnvironment$1:   "com.google.gerrit.server.plugins.PluginGuiceEnvironment$1"
gerrit-gerrit-1      | PluginGuiceEnvironment$2:   "com.google.gerrit.server.plugins.PluginGuiceEnvironment$2"
gerrit-gerrit-1      | PullReplicationModule:      "com.googlesource.gerrit.plugins.replication.pull.PullReplicationModule"
gerrit-gerrit-1      | ReplicationQueue:           "com.googlesource.gerrit.plugins.replication.pull.ReplicationQueue"
gerrit-gerrit-1      | UniqueAnnotations$Internal: "com.google.inject.internal.UniqueAnnotations$Internal"
gerrit-gerrit-1      | ========================
gerrit-gerrit-1      | End of classname legend:
gerrit-gerrit-1      | ========================
gerrit-gerrit-1      |
gerrit-gerrit-1      |  at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
gerrit-gerrit-1      |  at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1151)
gerrit-gerrit-1      |  at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:93)
gerrit-gerrit-1      |  at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:274)

gerrit-gerrit-1      |  at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:196)
gerrit-gerrit-1      |  at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:523)
gerrit-gerrit-1      |  at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:444)
gerrit-gerrit-1      |  at com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:344)
gerrit-gerrit-1      |  at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:95)
gerrit-gerrit-1      |  at com.google.gerrit.pgm.Daemon.start(Daemon.java:407)
gerrit-gerrit-1      |  at com.google.gerrit.pgm.Daemon.run(Daemon.java:300)
gerrit-gerrit-1      |  at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:62)
gerrit-gerrit-1      |  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
gerrit-gerrit-1      |  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
gerrit-gerrit-1      |  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
gerrit-gerrit-1      |  at java.base/java.lang.reflect.Method.invoke(Method.java:568)
gerrit-gerrit-1      |  at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:251)
gerrit-gerrit-1      |  at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:147)
gerrit-gerrit-1      |  at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:92)
gerrit-gerrit-1      |  at Main.main(Main.java:30)
gerrit-gerrit-1      |
gerrit-gerrit-1      | Jun 12, 2024 10:57:33 AM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
gerrit-gerrit-1      | WARNING: AssistedInject factory com.googlesource.gerrit.plugins.replication.Destination$Factory will be slow because class com.googlesource.gerrit.plugins.replication.Destination has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!)  The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@com.googlesource.gerrit.plugins.replication.Destination.<init>()[0]]
g


вт, 11 июн. 2024 г. в 10:39, Dariusz Luksza <dariusz...@gmail.com>:


--

Luca Milanesio

unread,
Jun 12, 2024, 9:11:44 AMJun 12
to Repo and Gerrit Discussion

On 12 Jun 2024, at 12:06, Alexey Ponomarev <miel...@gmail.com> wrote:

You need to put the delete-project plugin into the lib/ directory so that pull-replication can access it classes when it loads.
Thank you. It's help, but I have next error

Daniil Gan’kov

unread,
Jun 21, 2024, 11:40:37 AM (12 days ago) Jun 21
to Repo and Gerrit Discussion
Hello everyone

I have exactly the same problem as mentioned by Alexey in the last message. This is not fixed even in the last successful build. I am still unable to load pull-replication on Gerrit 3.10.0

Regards,
Daniil Gan'kov

Luca Milanesio

unread,
Jun 21, 2024, 1:08:24 PM (11 days ago) Jun 21
to Repo and Gerrit Discussion, Luca Milanesio

On 21 Jun 2024, at 16:40, Daniil Gan’kov <danyg...@gmail.com> wrote:

Hello everyone

I have exactly the same problem as mentioned by Alexey in the last message. This is not fixed even in the last successful build. I am still unable to load pull-replication on Gerrit 3.10.0

I’d suggest to:
1) Raise an issue on [1]
2) Include your full log (relevant to the issue)
3) Include your full gerrit.config and replication.config

HTH

Luca.


Luca Milanesio

unread,
Jun 21, 2024, 2:55:50 PM (11 days ago) Jun 21
to Repo and Gerrit Discussion, Luca Milanesio
The 10th parameter of the ReplicationQueue (see [1]) is the Gerrit instance-id:
@GerritInstanceId String instanceId,
Do you have it in your gerrit.config?

Luca.

Daniil Gan’kov

unread,
Jun 22, 2024, 7:50:17 AM (11 days ago) Jun 22
to Repo and Gerrit Discussion
Yes, that was the root of the problem. gerrit.instanceId must be set to run pull-replication plugin. Thank you!

Just to note, this problem is reproducible in the clean environment (e.g. docker.io/gerritcodereview/gerrit:3.10.0). There no gerrit.instanceId is being set by default on Gerrit initialization. Maybe it should be generated if not present, like the gerrit.serverId

Regards,
Daniil Gan'kov
Reply all
Reply to author
Forward
0 new messages