Issue upgrading from SonarQube 7.6 to 7.8

We attempted to upgrade from 7.6 to 7.8; however, the upgrade keeps failing and we receive the follow error messages:

2019.07.12 18:09:19 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /directory/sonarqube/temp/es6

2019.07.12 18:09:19 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001

2019.07.12 18:09:19 ERROR app[o.s.a.p.SQProcess] Fail to launch process [es]

org.sonar.process.MessageException: a JVM option can’t overwrite mandatory JVM options. The following JVM options defined by property ‘sonar.search.javaOpts’ are invalid: -Djava.io.tmpdir=/directory/sonartmp overwrites -Djava.io.tmpdir=/directory/sonarqube/temp/es6

2019.07.12 18:09:19 INFO app[o.s.a.SchedulerImpl] Process [es] is stopped

2019.07.12 18:09:19 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

WrapperSimpleApp: Encountered an error running main: org.sonar.process.MessageException: a JVM option can’t overwrite mandatory JVM options. The following JVM options defined by property ‘sonar.search.javaOpts’ are invalid: -Djava.io.tmpdir=/directory/sonartmp overwrites -Djava.io.tmpdir=/directory/sonarqube/temp/es6

org.sonar.process.MessageException: a JVM option can’t overwrite mandatory JVM options. The following JVM options defined by property ‘sonar.search.javaOpts’ are invalid: -Djava.io.tmpdir=/directory/sonartmp overwrites -Djava.io.tmpdir=/directory/sonarqube/temp/es6

<-- Wrapper Stopped

Is there any ideas on how to fix this issue?

Thanks

Sounds like you need to check out the sonar.search.javaOpts setting in your conf/sonar.properties file and remove some options.

If you need to change the temp directory for SonarQube, you should do so by adjusting sonar.path.temp in the same file.

What would you suggest changing the sonar.search.javaOpts or sonar.path.temp to? I tried removing the sonar.search.javaOpts, and then it just defaults to sonar.search.javaAdditionalOpts with the same error.

I don’t know what they’re set to now, so I really can’t say! Maybe you can provide the contents of your conf/sonar.properties file with sensitive info removed

This is what I have in the sonar.properties file:

sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false
sonar.search.javaAdditionalOpts=-Djava.io.tmpdir=/directory/sonartmp
sonar.search.javaOpts=-Djava.io.tmpdir=/directory/sonartmp

I’ve tried removing both of the last two, but it still does not get SonarQube to work. Let me know if you need more info from the file. Thanks