ERROR uninstall SonarPython

Hi,

I updated SQ from 7.9 to 8.1 and Enterprise edition, and the server is UP.
I can install and uninstall application without problems, but I have one problem with SonarPython plugin.

If I uninstall SonarPython the server is down, I can’t get up the server.
I have the next error on web.log

2020.01.21 14:18:11 ERROR web[o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Vulnerability Rules for Python [securitypythonfrontend]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:88)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:557)
at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/python/api/PythonCustomRuleRepository
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
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 A.A.A.A.A.B.define(na:1078)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:78)
… 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.python.api.PythonCustomRuleRepository
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)
… 23 common frames omitted
2020.01.21 14:18:11 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process

Someone know where is the problem?

King regards.

Hi,

The problem is that SonarQube Enterprise Edition 8.1 embeds another plugin which depends on the python analyzer.
Indeed, that’s not a good user experience and we should prevent such scenario.
We created SONAR-12993 to track the problem.

Were you able to recover your SonarQube server? Do you need any help with that?

Hello, we are currently experiencing exactly the same issue. Can you advise on how to recover our SonarQube server?

Kind regards.

We were able to resolve the issue by downloading a fresh copy of 8.1 and copying over the plugins shipped in the archive to our extensions/plugins directory.

Kind regards.