I currently make a test of Sonarqube 8.9.10 enterprise in azure container instance with an mssql database. I met issues with azure mssql database. But it works when i execute my container without the mssql service. I deploy my services with terraform and use this settings as environment variables:
environment_variables = {
SONARQUBE_JDBC_URL = “jdbc:sqlserver://${azurerm_sql_server.sql.name}.database.windows.net:1433;database=${azurerm_mssql_database.sqldb.name}”
SONARQUBE_JDBC_USERNAME = “adminuser”
SONARQUBE_JDBC_PASSWORD = “${azurerm_key_vault_secret.secret.value}”
}
I have also tried to install the service without terraform. But i have also the same issue
That’s not reflected in your logs: 2023.02.14 16:02:09 INFO web[][o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://127.0.0.1:9092/sonar;NON_KEYWORDS=VALUE
While I do see plenty of errors in your logs, they appear unrelated to startup. Your server was up for ~1.5h before the trouble started:
2023.02.14 16:09:24 INFO web[][o.s.s.p.Platform] Web Server is operational
2023.02.14 17:49:58 INFO web[][o.a.c.h.Http11Processor] Error parsing HTTP request header\n Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
...
2023.02.14 17:49:58 ERROR web[][o.a.c.h.Http11Processor] Error processing request
java.lang.NullPointerException: Cannot invoke "String.replaceFirst(String, String)" because the return value of "javax.servlet.http.HttpServletRequest.getRequestURI()" is null
at org.sonar.server.platform.web.SecurityServletFilter.addSecurityHeaders(SecurityServletFilter.java:70)
It would be interesting to know what those requests are, but I suppose the first order of business is your DB connection. Can you re-evaluate your settings and try again?
BTW, in 9.9, the long-deprecated parameters SONARQUBE_JDBC_USERNAME and SONARQUBE_JDBC_PASSWORD are no longer supported. The docs should help.
If i understand, according to the documentation, i have to use this settings for the authentication:
SONAR_JDBC_URL=jdbc:sqlserver://;databaseName=sonar;integratedSecurity=true
Which directory i have to copy the file mssql-jdbc_auth-11.2.2.x64.dll?
It still doesn’t work. I changed my configuration with the settings recomanded on the documentation:
environment_variables = {
SONARQUBE_JDBC_URL = “jdbc:sqlserver://${azurerm_sql_server.sql.name}.database.windows.net;databaseName=sonar;integratedSecurity=true”
}
and i also copy the dll file.
Please find attached my log files log.zip (14.2 KB)
I don’t really understand. According to the documentation the environnement variable SONARQUBE_JDBC_URL variables have been removed. But when i go to the environement variable recomended on that link: Environment variables (sonarqube.org)
It still recommand it for azur sql database.
What environment variables should i use to make it works?
I also need to test with login and password such as in this exemple Azure ACI – SonarQube | Coding With Taz but i don’t know if these settings are still used with the sonarqube 9.9 version
Please find my logs attached log.zip (9.4 KB)
I see this a lot in es.log. What do you make of it:
2023.02.22 15:08:16 ERROR es[][o.e.b.Bootstrap] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
You will need to add following Environment variable:
SONAR_SEARCH_JAVAADDITIONALOPTS
with a value that contains
”-Dnode.store.allow_mmap=false” (in case you have some other setting also)