Sonarcloud.io - upload test results - timeout

Analysis runs fine, unable to upload the test result to Sonarcloud.io:

  • versions used: sonarqube-gradle-plugin:2.6.2
  • error observed Execution failed for task ':sonarqube' - Fail to request https://sonarcloud.io/api/ce/submit?organization=naseukolycz&projectKey=idempiere-micro&projectName=idempiere-micro - java.net.SocketTimeoutException: timeout at okio.Okio$4.newTimeoutException(Okio.java:227)
  • steps to reproduce: clone https://github.com/iDempiere-micro/idempiere-micro, run gradle sonarqube with the correct sona.organizetion setup for sonarcloud.io
  • potential workaround
1 Like

I’m also experiencing a similar issue, but I’m using the linux sonar scanner described at https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Linux 4.15.0-30-generic amd64

The error that I get is as follows:

11:40:56.725 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Fail to request https://sonarcloud.io/api/ce/submit?organization=<org_id>&projectKey=<project_key>
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:190)
    at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:155)
    at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:114)

Caused by: java.net.SocketTimeoutException: timeout
    at okio.Okio$4.newTimeoutException(Okio.java:227)
    at okio.AsyncTimeout.exit(AsyncTimeout.java:284)
    at okio.AsyncTimeout$1.write(AsyncTimeout.java:183)

Caused by: java.net.SocketException: Connection closed by remote host
    at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1555)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:124)
    at okio.Okio$1.write(Okio.java:78)

Hi Mark,

What’s the timezone of 11:40:56.725 ? Will be easier to investigate in our logs.

Hi David,

Could you specify the time when it happens ?

Australian Eastern Standard Time (GMT+10)

After investigation, I cannot find any incident on our side.
I suspect a network issue between your CI environment and SonarCloud.

Is it systematic ?

Hi,
I’m experiencing the same issue on an android project

Fail to request https://sonarcloud.io/api/ce/submit?organization=XXXX&projectKey=XXXXX&projectName=XXXX

Caused be a timeout

@xbourguignon yes it’s systematic.

Regards

Could you share the logs ?

Hello,

my issue was fixed by using a VPN (France VPN), the git repository is accessible only via this VPN, so, either sonarcloud was not working from my network or it needs access to git to retrieve commits data.

Regards

2 Likes