-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDBC settings from sonar.properties are ignored #323
Comments
sns-seb
added a commit
that referenced
this issue
Sep 30, 2019
sns-seb
added a commit
that referenced
this issue
Sep 30, 2019
sns-seb
added a commit
that referenced
this issue
Sep 30, 2019
sns-seb
added a commit
that referenced
this issue
Sep 30, 2019
2 tasks
sns-seb
added a commit
that referenced
this issue
Sep 30, 2019
ghost
closed this as completed
Oct 2, 2019
ghost
mentioned this issue
Nov 5, 2019
This bug is still present in 7.9.4-community version |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Observed behavior
When mounting the
conf
directory with a customizedsonar.properties
file which defines the JDBC properties to connect to the database, SonarQube ignores these properties.Expected behavior
SonarQube connects to the database I specify by properties in the
sonar.properties
file.How to reproduce
(with SQ 8 community built from branch feature/sl/initialized_read_volumes)
Create a
conf
directory to mount in SQ container:Start SQ container to get an initialized conf directory. Observe that SQ is running on H2.
Stop SQ:
Add JDBC properties to
sonar.properties
:Sample jdbc properties, exact values do not matter since they are ignored:
Restart SQ container:
Connect to SQ and/or check logs, SQ still connect to an H2 database.
Suspected cause
Entry point script
run.sh
passes env properties to the SonarQube process for JDBC propertiessonar.jdbc.name
,sonar.jdbc.password
andsonar.jdbc.url
.These properties takes precedence over the content of
sonar.properties
even when empty.In the scenario above,
sonar.jdbc.url
is empty because its value is the one of the env variableSONAR_JDBC_URL
. Even whenSONAR_JDBC_URL
is not set, this defines an empty value to the env property.An empty
sonar.jdbc.url
is interpreted by SonarQube as "connect to H2".Note that as a consequence, the same problem applies to property
sonar.web.javaAdditionalOpts
.The text was updated successfully, but these errors were encountered: