Having issues with starting Sonarqube after configuring postgres

Must-share information (formatted with Markdown):
Using the latest download from community edition
I am tring to configure sonar for our code
I can run sonar in default mode, but as soon as i configure postgres or sql i land in trouble starting sonarqube.

I have created the db in postgres with a user assigned
sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonardb?currentSchema=public

sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonardb?currentSchema=public

Error Log

2021.10.07 11:03:00 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Sonar\sonarqube-9.1.0.47736\sonarqube-9.1.0.47736
2021.10.07 11:03:00 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.29.0.36737 / 51d48f1f36d94330bd7cd751ca3bd01e858e6486
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin CSS Code Quality and Security / 1.4.2.2002 / faa7d4f1407df67df7ada53caf677ab783721173
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.6.2.2641 / 11f07506915923b3a0e39e4e34280644c035b925
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.4.0.2754 / 38f7ff864ae15152c9f1efc3014594f7e7ca7b6e
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 7.3.0.27589 / c8c513194e28fe5b8f4e5db5b220c573650f4432
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 8.4.0.16431 / a11eb10b34d41ae596cd9218d1ed0c538b69dc58
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 2.2.0.499 / 5dd102bda528f83955875a811f429398bfea9ed1
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.20.0.8080 / 74271733c3bf37a351dc9ad421e4f72ec399ad38
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.6.0.8488 / d52bd3c2c03b39a49d37dee663ca9d5edd758590
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.29.0.36737 / 51d48f1f36d94330bd7cd751ca3bd01e858e6486
2021.10.07 11:03:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.3.0.3155 / 69e75392176736ddd1abaf57cad63c1cc30a9e82
2021.10.07 11:03:01 WARN  web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2021.10.07 11:03:02 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
2021.10.07 11:03:02 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2021.10.07 11:03:02 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@7e4c7849 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2021.10.07 11:03:02 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2021.10.07 11:03:02 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.10.07 11:03:02 WARN  web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [SQ starter] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@17/java.io.RandomAccessFile.readBytes(Native Method)\n java.base@17/java.io.RandomAccessFile.read(RandomAccessFile.java:405)\n java.base@17/java.io.RandomAccessFile.readFully(RandomAccessFile.java:469)\n java.base@17/java.util.zip.ZipFile$Source.readFullyAt(ZipFile.java:1348)\n java.base@17/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:915)\n java.base@17/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:931)\n java.base@17/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:448)\n java.base@17/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)\n java.base@17/jdk.internal.loader.Resource.getBytes(Resource.java:126)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:859)\n java.base@17/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:773)\n java.base@17/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:768)\n java.base@17/java.security.AccessController.executePrivileged(AccessController.java:776)\n java.base@17/java.security.AccessController.doPrivileged(AccessController.java:318)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:781)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)\n java.base@17/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)\n java.base@17/java.lang.ClassLoader.loadClass(ClassLoader.java:520)\n app//org.sonar.server.platform.platformlevel.PlatformLevel4.configureLevel(PlatformLevel4.java:390)\n app//org.sonar.server.platform.platformlevel.PlatformLevel.configure(PlatformLevel.java:74)\n app//org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:210)\n app//org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)\n app//org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)\n app//org.sonar.server.platform.PlatformImpl$1$$Lambda$501/0x00000001004bd8e8.run(Unknown Source)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)\n app//org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)\n java.base@17/java.lang.Thread.run(Thread.java:833)
2021.10.07 11:03:40 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2021.10.07 11:03:41 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2021.10.07 11:03:42 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://127.0.0.1:9001]
2021.10.07 11:03:42 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.1.0.47736 / 98d09fa4f1400143dbea332952db3aa6984be125
2021.10.07 11:03:42 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost:5432/sonardb?currentSchema=public
2021.10.07 11:03:43 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.10.07 11:03:44 WARN  web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Sonar\sonarqube-9.1.0.47736\sonarqube-9.1.0.47736
2021.10.07 11:03:44 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.29.0.36737 / 51d48f1f36d94330bd7cd751ca3bd01e858e6486
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin CSS Code Quality and Security / 1.4.2.2002 / faa7d4f1407df67df7ada53caf677ab783721173
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.6.2.2641 / 11f07506915923b3a0e39e4e34280644c035b925
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.4.0.2754 / 38f7ff864ae15152c9f1efc3014594f7e7ca7b6e
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 7.3.0.27589 / c8c513194e28fe5b8f4e5db5b220c573650f4432
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 8.4.0.16431 / a11eb10b34d41ae596cd9218d1ed0c538b69dc58
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 2.2.0.499 / 5dd102bda528f83955875a811f429398bfea9ed1
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.20.0.8080 / 74271733c3bf37a351dc9ad421e4f72ec399ad38
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.6.0.8488 / d52bd3c2c03b39a49d37dee663ca9d5edd758590
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.29.0.36737 / 51d48f1f36d94330bd7cd751ca3bd01e858e6486
2021.10.07 11:03:44 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.3.0.3155 / 69e75392176736ddd1abaf57cad63c1cc30a9e82
2021.10.07 11:03:46 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
2021.10.07 11:03:46 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2021.10.07 11:03:46 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@98c9bf6 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2021.10.07 11:03:46 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2021.10.07 11:03:46 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.10.07 11:03:46 WARN  web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [SQ starter] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@17/java.util.zip.Inflater.inflateBytesBytes(Native Method)\n java.base@17/java.util.zip.Inflater.inflate(Inflater.java:378)\n java.base@17/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)\n java.base@17/jdk.internal.loader.Resource.getBytes(Resource.java:126)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:859)\n java.base@17/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:773)\n java.base@17/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:768)\n java.base@17/java.security.AccessController.executePrivileged(AccessController.java:776)\n java.base@17/java.security.AccessController.doPrivileged(AccessController.java:318)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:781)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)\n java.base@17/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)\n java.base@17/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)\n java.base@17/java.lang.ClassLoader.loadClass(ClassLoader.java:520)\n app//org.sonar.server.platform.platformlevel.PlatformLevel4.configureLevel(PlatformLevel4.java:421)\n app//org.sonar.server.platform.platformlevel.PlatformLevel.configure(PlatformLevel.java:74)\n app//org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:210)\n app//org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)\n app//org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)\n app//org.sonar.server.platform.PlatformImpl$1$$Lambda$501/0x00000001004c4678.run(Unknown Source)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)\n app//org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)\n java.base@17/java.lang.Thread.run(Thread.java:833)
2021.10.07 11:03:46 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Python Code Quality and Security [python]
	at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:77)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:573)
	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$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:833)
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/python/Python
	at org.sonar.plugins.python.PythonPlugin.define(PythonPlugin.java:67)
	at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:67)
	... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.python.Python
	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)
	... 10 common frames omitted

Hi,

Welcome to the community!

This is a very odd kind of error to encounter after setting up your DB connection & it makes me wonder if something messed up the overall distribution. Please try re-expanding the zip & configuring your DB connection values again.

And if that doesn’t do it, come back with any new errors you’re seeing.

 
Ann