Database collation being detected incorrectly, kills process

I have spent hours on this and it’s truly baffling me, not sure what I’m doing wrong.

Here are the steps I have taken to setup a fresh install:

  • Copied over the latest .zip files into C:\sonarqube
  • Created a local database, user, appropriate permissions
  • Ran StartSonar.bat

Here is the error reported in the logs:

2022.03.03 18:35:52 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2022.03.03 18:35:54 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2022.03.03 18:35:55 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://kubernetes.docker.internal:9001]
2022.03.03 18:35:56 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.2.4.50792 / 78f7113cee15b2bd37a958455271e68f1244cb7b
2022.03.03 18:35:56 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost:1433;
2022.03.03 18:36:01 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube
2022.03.03 18:36:01 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.32.0.39516 / 339a4abca54577c2331eb89f3ccecd43279fbd11
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Configuration detection fot Code Quality and Security / 1.1.0.185 / f880796141c97fa59ac04f8ac0db56c62d862005
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.6.2.2641 / 11f07506915923b3a0e39e4e34280644c035b925
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.4.0.2754 / 38f7ff864ae15152c9f1efc3014594f7e7ca7b6e
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin IaC Code Quality and Security / 1.4.0.1294 / d5088c9df33e24593acd39bac9306136176da598
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 7.5.0.28054 / 54b377cfbc4b5d4f2780855818c6850c298ea395
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 8.6.0.16913 / 701a9ce4770cfe89eb0ac54c75eeafb2c8c514ac
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 2.7.0.948 / 9ab38bae2f6f59bd5ba6d3bed5a159d858b87daf
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.21.2.8292 / 86bd9dd559ac9a3a8dbabdf44d171395e7334590
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.8.0.8883 / 30629fbf3e871f83899ec32d3e4a05988b3d4727
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.32.0.39516 / 339a4abca54577c2331eb89f3ccecd43279fbd11
2022.03.03 18:36:02 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.4.0.3273 / 3e6d286309dbc9af364fc3c843ee8e71ed1801f7
2022.03.03 18:36:05 INFO  web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2022.03.03 18:36:05 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_AS but should be Latin1_General_CS_AS.
2022.03.03 18:36:05 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2022.03.03 18:36:05 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

The problem is that the database collation is actually set to Latin1_General_CS_AS:

Please advise

Hi,

From what I’m seeing, you can set collation at multiple levels. Is collation set to Latin1_General_CS_AS at all levels?

 
Ann

Hi Ann,

Thank you for your reply;

The server level collation is set to the default for SQL Server, which is Latin1_General_CI_AS.

Are you aware if this a known incompatibility? - I haven’t found any documentation to suggest server level collation could be the issue, although that may just be an error with my googling.

I will try recreating the server with the Latin1_General_CA_AS collation first thing tomorrow and report back with any findings, thank you for the suggestion!

Tom

1 Like