helm / charts

⚠️(OBSOLETE) Curated applications for Kubernetes
Apache License 2.0
15.5k stars 16.83k forks source link

[stable/sonarqube] Fail to load plugin Stash #14592

Closed papanito closed 5 years ago

papanito commented 5 years ago

Describe the bug

After enabling some plugins as follows:

plugins:
  install:
  - "https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar"
  - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar"

The sonarqube container fails with

2019.06.07 12:37:35 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Stash [stash]

Version of Helm and Kubernetes:

$ helm version
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
$ kubectl.exe version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

Which chart:

stable/sonarqube

What happened:

Container install-plugins successfully downloaded the defined plugins

--2019-06-07 12:28:52-- https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar
...
4150K .......... .......... .......... ......... 100% 29.1M=5.7s
2019-06-07 12:28:58 (730 KB/s) - 'sonar-stash-plugin-1.3.0.jar' saved [4290052/4290052]
--2019-06-07 12:28:58-- https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar
....
2019-06-07 12:29:00 (482 KB/s) - 'sonar-ldap-plugin-2.2.0.601.jar' saved [300500/300500]

but then the container sonarqube fails

2019.06.07 12:37:34 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin LDAP / 2.2.0.601 / 25e41753278ae531c5afdd0c2403d69404d326d3
2019.06.07 12:37:34 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Stash / 1.3.0
2019.06.07 12:37:34 WARN web[][o.s.c.p.PluginLoader] API compatibility mode is no longer supported. In case of error, plugin Stash [stash] should package its dependencies.
2019.06.07 12:37:34 INFO web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
2019.06.07 12:37:34 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@4a7a138a [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/properties*, ...]}]
2019.06.07 12:37:35 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2019.06.07 12:37:35 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Stash [stash]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:82)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:571)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/PostJob
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
at org.sonar.plugins.stash.StashPlugin.getExtensions(StashPlugin.java:61)
at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:72)
... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.PostJob
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 25 common frames omitted
2019.06.07 12:37:36 INFO web[][o.s.p.StopWatcher] Stopping process
2019.06.07 12:37:37 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2019.06.07 12:37:37 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2019.06.07 12:37:37 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2019.06.07 12:37:37 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

  1. Enable the plugin installation in the values.yaml

    plugins:
     install:
     - "https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar"
     - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar"
  2. Install helm

    helm install -n sonarqube --namespace sonarqube stable/sonarqube -f values.yaml
  3. Check deployment on k8s

Anything else we need to know: N/A

papanito commented 5 years ago

Ok, it seems a problem with the stash plugin only this issue should be moved to https://github.com/AmadeusITGroup/sonar-stash

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

papanito commented 5 years ago

Could somebody move this to the correct repo as suggested above?

rushrecon commented 5 years ago

Using https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.6.0/sonar-stash-plugin-1.6.0.jar instead of https://github.com/AmadeusITGroup/sonar-stash/releases/download/1.3.0/sonar-stash-plugin-1.3.0.jar helps.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue is being automatically closed due to inactivity.