Running SonarQube with Gradle fails with "SonarQube server [xxx] can not be reached,. What can I do?

First, you should rerun your job adding --stacktrace and --info options to get more details on the problem. Then, once you rerun it, and the check the log contents, if you get something like this: Caused by: java.security.cert.CertPathValidatorException: The certificate issued by CN=DST Root CA X3, O=Digital Signature Trust Co. is not trusted; internal cause is: java.security.cert.CertPathValidatorException: Certificate chaining error

it means that there is an issue between the installed 1.8 JVM and the https connection to the sonarQube server. One way to resolve it is to install an open JDK 1.8 JVM with the proper certificates. To do this, add these lines to your job before calling "gradle sonarqube".