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

Setting the azure sql settings in the web app settings, yet sonarcube keeps using h2 #41

Closed SylvainMartel closed 4 years ago

SylvainMartel commented 4 years ago

Hi, Not sure what is done wrong, but even after setting sonar.jdbc.url sonar.jdbc.password and sonar.jdbc.username in the connection strings settings section and restarting the app, sonarqube continues to start using the embedded database.

I look in sonar.properties, and everything is still in the initial state. Nothing was changed.

Any ideas?

Here is the output when I run HttpPlatformHandlerStartup.ps1 manually

6:16:24 PM Starting HttpPlatformHandler Script 6:16:26 PM Searching for sonar.properties file 6:16:55 PM File found at: D:\home\site\wwwroot\sonarqube-8.3.0.34182\conf\sonar.properties 6:16:55 PM Resetting properties. 6:16:55 PM Updating sonar.properties based on environment/application settings. 6:16:55 PM HTTP_PLATFORM_PORT is: 6:16:55 PM Updating sonar.web.port to 6:16:55 PM Saving updated sonar.properties contents 6:16:55 PM Searching for wrapper.conf file 6:17:01 PM File found at: D:\home\site\wwwroot\sonarqube-8.3.0.34182\conf\wrapper.conf 6:17:01 PM Writing to wrapper.conf file 6:17:01 PM Searching for duplicate plugins. 6:17:01 PM Searching for StartSonar.bat 6:17:07 PM File found at: D:\home\site\wwwroot\sonarqube-8.3.0.34182\bin\windows-x86-64\StartSonar.bat 6:17:07 PM Executing StartSonar.bat wrapper | Unable to set the process priority: Access is denied. (0x5) wrapper | Attempt to set the console title failed: The handle is invalid. (0x6) wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. jvm 1 | jvm 1 | 2020.05.06 18:17:18 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\home\site\wwwroot\sonarqube-8.3.0.34182\temp jvm 1 | 2020.05.06 18:17:18 ERROR app[][o.s.application.App] Startup failure jvm 1 | java.nio.file.FileSystemException: D:\home\site\wwwroot\sonarqube-8.3.0.34182\temp\ce-exploded-plugins\csharp\sonar-csharp-plugin-8.6.1.17183.jar: The process cannot access the file because it is being used by another process. jvm 1 | jvm 1 | at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92) jvm 1 | at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) jvm 1 | at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) jvm 1 | at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:270) jvm 1 | at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105) jvm 1 | at java.base/java.nio.file.Files.delete(Files.java:1141) jvm 1 | at org.sonar.process.FileUtils2$DeleteRecursivelyFileVisitor.visitFile(FileUtils2.java:192) jvm 1 | at org.sonar.process.FileUtils2$DeleteRecursivelyFileVisitor.visitFile(FileUtils2.java:186) jvm 1 | at java.base/java.nio.file.Files.walkFileTree(Files.java:2724) jvm 1 | at java.base/java.nio.file.Files.walkFileTree(Files.java:2796) jvm 1 | at org.sonar.process.FileUtils2.deleteDirectoryImpl(FileUtils2.java:148) jvm 1 | at org.sonar.process.FileUtils2.deleteDirectory(FileUtils2.java:121) jvm 1 | at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:117) jvm 1 | at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:101) jvm 1 | at java.base/java.nio.file.Files.walkFileTree(Files.java:2724) jvm 1 | at org.sonar.application.AppFileSystem.createOrCleanTempDirectory(AppFileSystem.java:96) jvm 1 | at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:62) jvm 1 | at org.sonar.application.App.start(App.java:63) jvm 1 | at org.sonar.application.App.main(App.java:98) jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) jvm 1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566) jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) jvm 1 | at java.base/java.lang.Thread.run(Thread.java:834) wrapper | <-- Wrapper Stopped

SylvainMartel commented 4 years ago

Found it, I was putting those settings under Connection strings(since it was BD related) instead of Application settings. So the script never found them of course. It seems to be working now, I See tables being created