vanderby / SonarQube-AzureAppService

Instructions and files to host SonarQube on an Azure App Service without a container.
MIT License
90 stars 165 forks source link

Problem with Azure SQL #8

Closed AlexZhidkov closed 5 years ago

AlexZhidkov commented 5 years ago

When I initially deployed the site worked fine with internal database. I'm trying to change to use Azure SQL Server now. I've updated sonar.properties file to set sonar.jdbc.username, sonar.jdbc.password and sonar.jdbc.url. SonarQube connected to the database and created tables but I get following errors in sonar.log:

2019.07.04 05:49:29 WARN  app[][o.s.application.App] SonarQube will require Java 11+ starting on next version
2019.07.04 05:49:29 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\home\site\wwwroot\sonarqube-7.8\temp
2019.07.04 05:49:29 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.07.04 05:49:29 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\home\site\wwwroot\sonarqube-7.8\elasticsearch]: D:\Program Files\Java\zulu8.31.0.2-jre8.0.181-win_x64\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=D:\home\site\wwwroot\sonarqube-7.8\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\home\site\wwwroot\sonarqube-7.8\elasticsearch -Des.path.conf=D:\home\site\wwwroot\sonarqube-7.8\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2019.07.04 05:49:29 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.07.04 05:49:30 INFO  app[][o.e.p.PluginsService] no modules loaded
2019.07.04 05:49:30 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Unable to set the process priority:  Access is denied. (0x0)
Attempt to set the console title failed: The handle is invalid. (0x6)
--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

What do I need to do to fix this?

vanderby commented 5 years ago

I've seen that before with out having an Azure SQL database. I don't know what causes it and it usually doesn't stop the app from working. I think it may be a second instance trying to start up.

Do you have any errors in the web.log file? When I initially setup an Azure SQL database the default collation was in-compatible with SQ and this error was in that file.

ERROR web[][o.s.s.p.Platform] Web server startup failed: Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.

vanderby commented 5 years ago

I recreated the Azure SQL database with SQL_Latin1_General_CP1_CS_AS collation and it worked. Let me know if that solves your problem.