Error during SonarQube Scanner execution on a newly configured project

Hi and merry xmas!,

I am running sonar scanner on my newly configured project and I have:

Ran all test suites.
INFO: Scanner configuration file: /etc/lib/sonar-scanner-2.8/conf/sonar-scanner.properties
INFO: Project root configuration file: /mnt/mesos/sandbox/builds/momagroup/icimatin-native/sonar-project.properties
INFO: SonarQube Scanner 2.8
INFO: Java 11.0.5 Debian (64-bit)
INFO: Linux 4.11.0-xxxx-std-ipv6-64 amd64
INFO: User cache: /root/.sonar/cache
ERROR: SonarQube server [https://sonar.kopaxgroup.com] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.640s
INFO: Final Memory: 4M/80M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
	at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
	at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
	... 8 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.sonarsource.scanner.api.internal.shaded.okhttp.CipherSuite.TLS_AES_128_GCM_SHA256
	at java.base/java.lang.Enum.valueOf(Enum.java:240)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.CipherSuite.valueOf(CipherSuite.java:32)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.CipherSuite.forJavaName(CipherSuite.java:382)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.Handshake.get(Handshake.java:51)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:240)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.io.RealConnection.establishProtocol(RealConnection.java:196)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.io.RealConnection.buildConnection(RealConnection.java:171)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.io.RealConnection.connect(RealConnection.java:111)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:93)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:296)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponse(RealCall.java:243)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
	at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:57)
	at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:113)
	at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:98)
	at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)
	... 11 more
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ps process exited with code 1
ERROR: Job failed: exit code 1

I expect it to pass, what can cause such issue ?

Thanks for the help and best!

Version used

  • sonarqube 6.3.1
  • sonar-scanner 2.8

Hello Kopax,

I believe the later errors you encountered overshadowed the original problem:

I suggest you verify that your SonarQube server is indeed up and running and that the machine running the scanner can resolve the sonar.kopaxgroup.com hostname and reach that address.

Hope this helps,
Jeff

Hi @Jeff_Zapotoczny, thanks for taking care.

As you can see here, the url is public: https://sonar.kopaxgroup.com/

The build heppened withing the Gitlab-CI runner.

$ curl https://sonar.kopaxgroup.com
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1438  100  1438    0     0   2797      0 --:--:-- --:--:-- --:--:--  2797
<!DOCTYPE html><html lang="en"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png"><link rel="icon" type="image/x-icon" href="/favicon.ico"><meta name="application-name" content="SonarQube"/><meta name="msapplication-TileColor" content="#FFFFFF"/><meta name="msapplication-TileImage" content="/mstile-512x512.png"/><link href="/css/sonar.175ebec8.css" rel="stylesheet"><title>SonarQube</title></head><body><div id="content"></div><script>window.baseUrl=""</script><script src="/js/vendor.056bf22d.js"></script><script src="/js/app.175ebec8.js"></script></body></html>

Since it can access the backend, shouldn’it be supposed to support sonar-scanner command using the somar sonar.url ?

Have you added the SSL cert for your server to the Java runtime which is running the scanner?

I didn’t had to.

After upgrading from sonarqube 6.3.1 and sonar-scanner 2.8 to sonarqube 7 and sonar-scanner 4.8 and all the plugins, I have no more issue with the scanner. Migration was a pretty straight forward process and involved a little bit of manual actions.

It is now all solved, thanks for your support, and happy new year,

Hello is there a way I can edit my post to delete the references of my applications? Or just delete the whole post? Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.