Missing site_path when trying to experiement with websession-flatfile

31 views
Skip to first unread message

christopher bradski

unread,
Dec 3, 2016, 4:08:59 AM12/3/16
to Repo and Gerrit Discussion
Been trying to experiment with Haproxy and Gerrit on shared backends. 

When leveraging load balancing through Haproxy we see unauthenticated errors over https.

I think the web session-flatfile plugin will resolve this but get the following error:

[2016-12-02 15:19:18,155] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin websession-flatfile

java.lang.NoSuchFieldError: site_path

at com.googlesource.gerrit.plugins.websession.flatfile.Module.getWebSessionDir(Module.java:47)

at com.googlesource.gerrit.plugins.websession.flatfile.Module$$FastClassByGuice$$68cfc7ff.invoke(<generated>)

at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:272)

at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172)

at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)

at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)

at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)

at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)

at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)

at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)

at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)

at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)

at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)

at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)

at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)

at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)

at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)

at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)

at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)

at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)

at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:72)

at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:228)

at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:170)

at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:461)

at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:390)

at com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:295)

at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)

at com.google.gerrit.pgm.Daemon.start(Daemon.java:293)

at com.google.gerrit.pgm.Daemon.run(Daemon.java:205)

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:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

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)

David Pursehouse

unread,
Dec 3, 2016, 4:10:46 AM12/3/16
to christopher bradski, Repo and Gerrit Discussion
On Sat, Dec 3, 2016 at 6:08 PM christopher bradski <chris....@gmail.com> wrote:
Been trying to experiment with Haproxy and Gerrit on shared backends. 

When leveraging load balancing through Haproxy we see unauthenticated errors over https.

I think the web session-flatfile plugin will resolve this but get the following error:

[2016-12-02 15:19:18,155] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin websession-flatfile

java.lang.NoSuchFieldError: site_path


What version of Gerrit are you using, and have you confirmed that you're using the plugin built from the correct corresponding branch?

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

christopher bradski

unread,
Dec 5, 2016, 8:55:03 PM12/5/16
to Repo and Gerrit Discussion, chris....@gmail.com
Hi David,
The initial pre-compiled version was for 2.12/master. I've partially got an environment up for building manually but looks like i need to bring Eclipse in to easily add dependencies? 

This is the error I'm currently facing:
 |=> //plugins/websession-flatfile:websession-flatfile__plugin...  0.5s (running javac[0.5s])
 |=> IDLE
 |=> IDLE
 |=> IDLE
 |=> IDLE
/home/cbradski/src/gerrit/plugins/websession-flatfile/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java:26: error: package org.joda.time does not exist
import org.joda.time.DateTime;
                    ^
/home/cbradski/src/gerrit/plugins/websession-flatfile/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java:86: error: cannot find symbol
      DateTime expires = new DateTime(val.getExpiresAt());
      ^
  symbol:   class DateTime
  location: class com.googlesource.gerrit.plugins.websession.flatfile.FlatFileWebSessionCache
/home/cbradski/src/gerrit/plugins/websession-flatfile/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java:86: error: cannot find symbol
      DateTime expires = new DateTime(val.getExpiresAt());
                             ^
  symbol:   class DateTime
  location: class com.googlesource.gerrit.plugins.websession.flatfile.FlatFileWebSessionCache
/home/cbradski/src/gerrit/plugins/websession-flatfile/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java:86: error: cannot find symbol
      DateTime expires = new DateTime(val.getExpiresAt());
                                         ^
  symbol:   method getExpiresAt()
  location: variable val of type com.google.gerrit.httpd.WebSessionManager.Val
/home/cbradski/src/gerrit/plugins/websession-flatfile/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java:87: error: cannot find symbol
      if (expires.isBefore(new DateTime())) {
                               ^
  symbol:   class DateTime
  location: class com.googlesource.gerrit.plugins.websession.flatfile.FlatFileWebSessionCache
Errors: 5. Warnings: 0.
BUILD FAILED: //plugins/websession-flatfile:websession-flatfile__plugin failed with exit code 1:
javac

David Pursehouse

unread,
Dec 5, 2016, 9:48:59 PM12/5/16
to christopher bradski, Repo and Gerrit Discussion
Are you building it standalone or in the gerrit tree?  I've just successfully built it in standalone mode on the head of its stable-2.12 branch.

If you're building it in the gerrit tree, you need to make sure both gerrit and the plugin are on the stable-2.12 branch.
Reply all
Reply to author
Forward
0 new messages