Adding plugins makes SonarQube crash

We have Sonarqube 9.6.1 Enterprise running on GCP cloud.
This Sonarqube instance runs on kubernetes (GKE).
We want to deploy plugins on this instance.
We try to deploy these plugins thanks to helm chart :
Here you are the helm chart infos :

repository = "https://SonarSource.github.io/helm-chart-sonarqube"
chart = “sonarqube”
name = “sonar”
version = “5.0.6+370”

SonarQube runs without errors with no plugins deployed.
Sonarqube failed to start when these plugins are copied beforehand in the plugins folder.

here the error logs of the pod :

2023.01.10 15:01:50 INFO  web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.01.10 15:01:51 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc-org.sonar.server.plugins.ServerPluginManager': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to read plugin manifest from jar : /opt/sonarqube/extensions/plugins/ecocode-python-plugin-0.2.1.jar
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc-org.sonar.server.plugins.ServerPluginManager': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to read plugin manifest from jar : /opt/sonarqube/extensions/plugins/ecocode-python-plugin-0.2.1.jar
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
        at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
        at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:105)
        at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:196)
        at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:169)
        at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:77)
        at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4768)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5230)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
        at org.sonar.server.app.WebServer.start(WebServer.java:55)
        at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
        at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
        at org.sonar.server.app.WebServer.main(WebServer.java:104)
Caused by: java.lang.IllegalStateException: Unable to read plugin manifest from jar : /opt/sonarqube/extensions/plugins/ecocode-python-plugin-0.2.1.jar
        at org.sonar.updatecenter.common.PluginManifest.<init>(PluginManifest.java:125)
        at org.sonar.server.plugins.ServerPluginInfo.create(ServerPluginInfo.java:37)
        at org.sonar.server.plugins.PluginJarLoader.lambda$getExternalPluginsMetadata$5(PluginJarLoader.java:152)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.sonar.server.plugins.PluginJarLoader.loadPluginsFromDir(PluginJarLoader.java:182)
        at org.sonar.server.plugins.PluginJarLoader.getExternalPluginsMetadata(PluginJarLoader.java:152)
        at org.sonar.server.plugins.PluginJarLoader.loadPlugins(PluginJarLoader.java:90)
        at org.sonar.server.plugins.ServerPluginManager.start(ServerPluginManager.java:64)
        at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
        ... 44 common frames omitted
Caused by: java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1607)
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1497)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1504)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1308)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1271)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:733)
        at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:850)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:248)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:350)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:321)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:287)
        at org.sonar.updatecenter.common.PluginManifest.<init>(PluginManifest.java:120)
        ... 61 common frames omitted
2023.01.10 15:01:51 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2023.01.10 15:01:51 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.01.10 15:01:51 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.01.10 15:01:52 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.01.10 15:01:52 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.01.10 15:01:52 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Do you have infos about this error?

Thanks in advance

Hi @William.J

I tried with this specific plugin (ecocode-python-plugin) and everything works as expected.
Looking at the stacktrace, I think your jar file is corrupted. Check out for proxies or errors while downloading the jar file.
For any plugin-related questions, please reach out to the plugin developers.

Hi Leo

You was right, I checked my JAR files in my sonar pod and they were corrupt.
I don’t really know why but it seems that downloading JARs from a GCP bucket corrupts the files.
So I tried to import my JAR files in another way, using this command :

kubectl cp ecocode-java-plugin-0.2.1.jar sonar-pod-name:/opt/sonarqube/extensions/plugins

And with this method, sonarqube launches correctly and without errors.

Thank you for all :grin:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.