Issues in Setting up Sonarqube

Must-share information (formatted with Markdown):

  • Version of SonarQube - sonarqube-8.1.0.31237
  • Trying for Installation of Developer Edition. I am able to configure the community edition very smoothly, wanted to evaluate Developer edition, so trying to install Sonarqube DB on SQL Server 2008 Express Edition. With H2 DB is working fine but not with exclusive DB.
  • In the Logs I am getting connection error. I got our IT Admin and checked, everything is working on database side. We are able to connect to the DB and perform CRUD operation with other applications, but not with Sonar

Logs
2020.02.25 19:42:02 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#8]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.6/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
java.base@11.0.6/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:339)
java.base@11.0.6/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:167)
java.base@11.0.6/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
java.base@11.0.6/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
java.base@11.0.6/java.lang.Thread.run(Thread.java:834)

Those are some logs, but probably not all the logs. What info do you have in your web.log file, if you have one? Anything in es.log or ce.log?

Web Logs

2020.03.03 11:59:59 INFO web[o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube-8.1.0.31237
2020.03.03 11:59:59 INFO web[o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.9.1.1834 / 178899f274b2e5340ea158ab885608a8ea228b61
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin JaCoCo / 1.0.2.475 / b79a4724f3a9af1051266b4f8ca0460977295ead
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarC# / 8.1.0.13383 / 422e0b5c1b0035cfb39db94f36f6efecdcd89bfd
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarCSS / 1.1.1.1010 / 365e21fd0cb9035669fc59f6fec7c8fd28a7303b
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarFlex / 2.5.1.1831 / a0c44437f6abb0feec76edd073f91fec64db2a6c
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarGo / 1.6.0.719 / edcc6a9e42fcdd30bb6f84a779c6cd7009ec72fd
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarHTML / 3.2.0.2082 / 997a51b39c4d0a5399c73a8fb729030a69eb392b
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS / 6.1.0.11503 / e78f55aea499e1f368b32c5b0c6f996db984fcb8
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava / 5.14.0.18788 / 5722010157fd66ae9f3141184891501b4165f75a
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarKotlin / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 3.3.0.5166 / 88e11dffb965aeef9d5bdd6d8413f394d35fecba
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython / 2.3.0.5351 / b816a5e837c8bcb31c74ce651044fb77cb7bee1f
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarRuby / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarScala / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarTS / 2.1.0.4359 / 268ba9581b700c4fb2bc194d4069d283da915213
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarVB / 8.1.0.13383 / 422e0b5c1b0035cfb39db94f36f6efecdcd89bfd
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML / 2.0.1.2020 / c5b84004face582d56f110e24c29bf9c6a679e69
2020.03.03 12:00:00 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Svn / 1.9.0.1295 / 942e075773975354e32691a60bfd968065703e04
2020.03.03 12:00:02 INFO web[o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2020.03.03 12:00:02 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed: Database collation must be case-sensitive and accent-sensitive. It is Latin1_General_CI_AI but should be Latin1_General_CS_AS.
2020.03.03 12:00:03 WARN web[o.a.c.u.SessionIdGeneratorBase] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [369] milliseconds.
2020.03.03 12:00:04 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2020.03.03 12:00:04 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process

es Logs

2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [analysis-common]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [lang-painless]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [mapper-extras]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [parent-join]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [percolator]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [reindex]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [repository-url]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] loaded module [transport-netty4]
2020.03.03 11:59:37 INFO es[o.e.p.PluginsService] no plugins loaded
2020.03.03 11:59:41 WARN es[o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2020.03.03 11:59:43 INFO es[o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
2020.03.03 11:59:43 INFO es[o.e.n.Node] initialized
2020.03.03 11:59:43 INFO es[o.e.n.Node] starting …
2020.03.03 11:59:44 INFO es[o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2020.03.03 11:59:44 INFO es[o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2020.03.03 11:59:47 INFO es[o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{fwK97ksHQAqtjXPNHR4m0g}{vJpzi1auT-WVOkRtfLKG1A}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2020.03.03 11:59:47 INFO es[o.e.c.s.ClusterApplierService] new_master {sonarqube}{fwK97ksHQAqtjXPNHR4m0g}{vJpzi1auT-WVOkRtfLKG1A}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{fwK97ksHQAqtjXPNHR4m0g}{vJpzi1auT-WVOkRtfLKG1A}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
2020.03.03 11:59:47 INFO es[o.e.n.Node] started
2020.03.03 11:59:47 INFO es[o.e.g.GatewayService] recovered [0] indices into cluster_state

Here’s your error!

2020.03.03 12:00:02 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed: Database collation must be case-sensitive and accent-sensitive. It is Latin1_General_CI_AI but should be Latin1_General_CS_AS.

Also keep in mind the requirements documentation that states a minimum SQL Server version of 2014. 2008 won’t cut it.

https://docs.sonarqube.org/latest/requirements/requirements/

Thank you. It worked !!!

This is not a default setting, once should be care full while creating the database.