GH Check eternally queued

Hi Ann,

I replay now because we have updated our server and now we are on SonarSource Developer 9.7.1.

we follow the installation guide from SonarSource documentation:

  • Create the GitHub App
  • Setup Sonarqube

Pull Request analysis is correctly done in SonarQube, as expected.
We have an issue about the decoration on GitHub
On GitHub, the pipeline (Jenkins/Sonarqube/GitHub) seems to perform some activities and we see the new hash and related commit message. Below we see the Application name we have created with some queued links (Re-run all checks, Re-run failed checks)
Here the images (I’m not sure is correctly displayed)
image

On Sonarqube we have 2 wornings:

  1. Property ‘sonar.jacoco.reportPaths’ is deprecated (JaCoCo binary format). ‘sonar.coverage.jacoco.xmlReportPaths’ should be used instead (JaCoCo XML format). Please check that the JaCoCo plugin is installed on your SonarQube Instance.
  2. Pull request decoration did not happen. Please install SonarQube Github application on the repository’s organization or user.

In our opinion the communication works, Payload are well processed by GitHub:
**Request URL:** https://sonarqube.../ **Request method:** POST **content-type:** application/json **Expect:** **User-Agent:** GitHub-Hookshot/4104263 **X-GitHub-Delivery:** 147d45e0-11d2-11ea-8957-8f03f5033e0e **X-GitHub-Enterprise-Host:** github.... **X-GitHub-Enterprise-Version:** 2.18.4 **X-GitHub-Event:** check_suite

response is 200
**Cache-Control:** no-cache, no-store, must-revalidate **Content-Length:** 43663 **Content-Type:** text/html;charset=utf-8 **Date:** Thu, 28 Nov 2019 11:27:37 GMT **Server:** Apache **Transfer-Encoding:** chunked **Vary:** Accept-Encoding **X-Content-Type-Options:** nosniff **X-Frame-Options:** SAMEORIGIN **X-XSS-Protection:** 1; mode=block

We have activated TRACE logging and we found following error in CE log

2019.11.28 12:19:08 ERROR ce[AW6xvB6HlMiTJavX9xAn][c.s.C.A.C.A.A.C] Failed to request /repos/Spikes/Pond/installation
java.net.SocketTimeoutException: timeout
	at okio.Okio$4.newTimeoutException(Okio.java:232)
	at okio.AsyncTimeout.exit(AsyncTimeout.java:286)
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358)
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230)
	at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242)
	at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213)
	at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.java:400)
	at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.java:236)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:177)
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
.....

We try to search documentation about the API of GitHub for the “/repos/:org/:repo/installation” but we didn’t found it.
Is this request from Sonarsource correct?

Please help
Thanks
Stefano Bianda

@dmeneses could you take a look, please?

Hi,

we have updated our server and now we are on SonarSource Developer 9.7.1.

That version doesn’t exist, is there a typo?

Could you please provide more logs of the CE? At least the full stack of the error and also the logs leading to it.

Yes, sorry it’s a typo error
Version 7.9.1.27448

Scanner Context: Pond [Project Analysis]

SonarQube plugins:

  • SonarCSS 1.1.1.1010 (cssfamily)
  • Svn 1.9.0.1295 (scmsvn)
  • SonarPLSQL 3.4.1.2576 (plsql)
  • SonarScala 1.5.0.315 (sonarscala)
  • SonarC# 8.0.0.9566 (csharp)
  • Vulnerability Analysis 7.9.0.5105 (security)
  • SonarJava 5.14.0.18788 (java)
  • LDAP 2.2.0.608 (ldap)
  • SonarHTML 3.2.0.2082 (web)
  • SonarFlex 2.5.1.1831 (flex)
  • SonarXML 2.0.1.2020 (xml)
  • SonarTS 2.1.0.4359 (typescript)
  • SonarVB 8.0.0.9566 (vbnet)
  • SonarSwift 4.2.1.62 (swift)
  • SonarCFamily 6.5.0.12506 (cpp)
  • SonarPython 2.1.0.5269 (python)
  • GitHub Authentication for SonarQube 1.5.0.870 (authgithub)
  • JaCoCo 1.0.2.475 (jacoco)
  • SonarGo 1.6.0.719 (go)
  • SonarKotlin 1.5.0.315 (kotlin)
  • SonarTSQL 1.4.0.3334 (tsql)
  • SonarJS 6.1.0.11503 (javascript)
  • SonarRuby 1.5.0.315 (ruby)
  • Vulnerability Rules for C# 7.9.0.5105 (securitycsharpfrontend)
  • Vulnerability Rules for Java 7.9.0.5105 (securityjavafrontend)
  • License for SonarLint 7.9.1 (license)
  • Git 1.9.1.1834 (scmgit)
  • SAML 2.0 Authentication for SonarQube 1.1.0.181 (authsaml)
  • SonarPHP 3.2.0.4868 (php)
  • SonarABAP 3.8.0.2034 (abap)
  • Vulnerability Rules for PHP 7.9.0.5105 (securityphpfrontend)
    Global server settings:
  • sonar.alm.github.app.id=2
  • sonar.alm.github.app.name=SonarQubeDecoration
  • sonar.alm.github.app.privateKeyContent.secured=******
  • sonar.auth.github.allowUsersToSignUp=true
  • sonar.auth.github.apiUrl=https://github.URL/api/v3/
  • sonar.auth.github.clientId.secured=******
  • sonar.auth.github.clientSecret.secured=******
  • sonar.auth.github.enabled=true
  • sonar.auth.github.webUrl=https://github.URL/
  • sonar.branch.longLivedBranches.regex=(branch|release|production|develop).*
  • sonar.core.id=74E5EA92-AWIA_9WvifoNcmBB_a-f
  • sonar.core.serverBaseURL=https://sonarqube.URL
  • sonar.core.startTime=2019-12-03T10:01:09+0100
  • sonar.cs.analyzeGeneratedCode=true
  • sonar.exclusions=/node_modules/,/packages/,**/*.datasource
  • sonar.forceAuthentication=true
  • sonar.java.file.suffixes=.java,.jav,.groovy
  • sonar.pullrequest.github.endpoint=https://github.URL/api/v3
  • sonar.pullrequest.provider=GitHub
    Project server settings:
  • sonar.pullrequest.github.repository=Spikes/Pond
    Project scanner properties:
  • sonar.binaries=C:\Git\Pond\target\classes
  • sonar.core.codeCoveragePlugin=jacoco
  • sonar.groovy.binaries=C:\Git\Pond\target\classes
  • sonar.host.url=https://sonarqube.URL
  • sonar.java.binaries=C:\Git\Pond\target\classes
  • sonar.java.libraries=C:…m2\repository\junit\junit\4.12\junit-4.12.jar,C:…m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar
  • sonar.java.source=1.8
  • sonar.java.target=1.8
  • sonar.java.test.binaries=C:\Git\Pond\target\test-classes
  • sonar.java.test.libraries=C:\Git\Pond\target\classes,C:…m2\repository\junit\junit\4.12\junit-4.12.jar,C:…m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar
  • sonar.junit.reportPaths=C:\Git\Pond\target\surefire-reports
  • sonar.junit.reportsPath=C:\Git\Pond\target\surefire-reports
  • sonar.language=java
  • sonar.libraries=C:…m2\repository\junit\junit\4.12\junit-4.12.jar,C:…m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar
  • sonar.links.ci=
  • sonar.links.homepage=
  • sonar.links.issue=
  • sonar.links.scm=
  • sonar.links.scm_dev=
  • sonar.login=******
  • sonar.moduleKey=Spikes.Pond:Spikes:Pond
  • sonar.projectBaseDir=C:\Git\Pond
  • sonar.projectBuildDir=C:\Git\Pond\target
  • sonar.projectKey=Spikes.Pond
  • sonar.projectName=Pond
  • sonar.projectVersion=${ARTIFACT_VERSION_TAG}
  • sonar.pullrequest.base=develop
  • sonar.pullrequest.branch=feature-testSonarQubeUpdate
  • sonar.pullrequest.github.repository=Spikes/Pond
  • sonar.pullrequest.key=66
  • sonar.scanner.app=ScannerMaven
  • sonar.scanner.appVersion=3.6.0.1398/3.5.0
  • sonar.sourceEncoding=windows-1252
  • sonar.sources=C:\Git\Pond\pom.xml,C:\Git\Pond\src\main\java
  • sonar.tests=C:\Git\Pond\src\test\java
  • sonar.working.directory=C:\Git\Pond\target\sonar

2019.12.02 09:54:18 TRACE ce[AW7FzQuZlMiTJavX9xJO][es] ES refresh request on indices ‘issues’ | time=11ms
2019.12.02 09:54:18 INFO ce[AW7FzQuZlMiTJavX9xJO][o.s.c.t.s.ComputationStepExecutor] Index analysis | status=SUCCESS | time=30ms
2019.12.02 09:54:18 INFO ce[AW7FzQuZlMiTJavX9xJO][o.s.c.t.s.ComputationStepExecutor] Send issue notifications | status=SUCCESS | time=1ms
2019.12.02 09:54:18 INFO ce[AW7FzQuZlMiTJavX9xJO][o.s.c.t.s.ComputationStepExecutor] Publish task results | status=SUCCESS | time=0ms
2019.12.02 09:54:18 INFO ce[AW7FzQuZlMiTJavX9xJO][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2019.12.02 09:54:18 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=0ms | sql=SELECT p.id, p.organization_uuid as organizationUuid, p.uuid as uuid, p.uuid_path as uuidPath, p.project_uuid as projectUuid, p.module_uuid as moduleUuid, p.module_uuid_path as moduleUuidPath, p.main_branch_project_uuid as mainBranchProjectUuid, p.kee as kee, p.name as name, p.long_name as longName, p.description as description, p.tags as tagsString, p.qualifier as qualifier, p.scope as scope, p.language as language, p.root_uuid as rootUuid, p.path as path, p.enabled as enabled, p.copy_component_uuid as copyComponentUuid, p.private as isPrivate, p.created_at as createdAt FROM projects p where p.uuid=? | params=AW4SueN3wXWBD7abLcKY
2019.12.02 09:54:18 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=0ms | sql=select uuid, name, url, organization_uuid as organizationUuid, project_uuid as projectUuid, secret, created_at as createdAt, updated_at as updatedAt from webhooks where project_uuid = ? order by name asc | params=AW4SueN3wXWBD7abLcKY
2019.12.02 09:54:18 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=1ms | sql=select uuid, name, url, organization_uuid as organizationUuid, project_uuid as projectUuid, secret, created_at as createdAt, updated_at as updatedAt from webhooks where organization_uuid = ? order by name asc | params=AWIA_8PqifoNcmBB_a-d
2019.12.02 09:54:18 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=1ms | sql=select p.prop_key as “key”, p.is_empty as empty, p.text_value as textValue, p.clob_value as clobValue, p.resource_id as resourceId, p.user_id as userId from properties p where p.prop_key=? and p.resource_id is null and p.user_id is null | params=sonar.core.serverBaseURL
2019.12.02 09:54:28 DEBUG ce[AW7FzQuZlMiTJavX9xJO][o.s.s.w.WebHooksImpl] Failed to send webhook ‘JenkinsMaster’ | url=https://jenkins.URL/jenkins/sonarqube-webhook/ | message=Read timed out
2019.12.02 09:54:28 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=68ms | sql=insert into webhook_deliveries ( uuid, webhook_uuid, component_uuid, ce_task_uuid, analysis_uuid, name, url, success, http_status, duration_ms, payload, error_stacktrace, created_at ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) | params=AW7F0XR2nITkFP1INkh3, AW6suh9t8MMFicJEvRxu, AW4SueN3wXWBD7abLcKY, AW7FzQuZlMiTJavX9xJO, AW7F0UVQnITkFP1INkhr, JenkinsMaster, https://jenkins.URL/jenkins/sonarqube-webhook/, false, 4, 10024, {“serverUrl”:“https://sonarqube.URL”,“taskId”:“AW7FzQuZlMiTJavX9xJO”,“status”:“SUCCESS”,“analysedAt”:“2019-12-02T09:49:34+0100”,“revision”:“dec8ef1401bde9b67574fa15baffe26817420f8e”,“changedAt”:“2019-12-02T09:49:34+0100”,“project”:{“key”:“Spikes.Pond”,“name”:“Pond”,“url”:"https://sonarqube.URL/dashboard?id=Spikes.Pond"},“branch”:{“name”:“66”,“type”:“PULL_REQUEST”,“isMain”:false,“url”:“https://sonarqube.URL/dashboard?id=Spikes.Pond&pullRequest=66”},“qualityGate”:{“name”:"Sonar w…, javax.net.ssl.SSLException: Read timed out\n at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:127)\n at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)\n at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)\n at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)\n at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:137)\n at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl…, 1575276858702
2019.12.02 09:54:28 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=7ms | sql=delete from webhook_deliveries where component_uuid = ? and created_at < ? | params=AW4SueN3wXWBD7abLcKY, 1572684868806
2019.12.02 09:54:28 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=0ms | sql=select uuid, alm_id as rawAlmId, repo_id as repoId, project_uuid as projectUuid, github_slug as githubSlug, url from project_alm_bindings where project_uuid = ? | params=AW4SueN3wXWBD7abLcKY
2019.12.02 09:54:28 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=1ms | sql=select pb.uuid as uuid, pb.project_uuid as projectUuid, pb.kee as kee, pb.key_type as keyType, pb.branch_type as branchType, pb.merge_branch_uuid as mergeBranchUuid, pb.pull_request_binary as pullRequestBinary, pb.manual_baseline_analysis_uuid as manualBaseline from project_branches pb where pb.project_uuid = ? and pb.kee = ? and pb.key_type = ? | params=AW4SueN3wXWBD7abLcKY, 66, PULL_REQUEST
2019.12.02 09:54:38 ERROR ce[AW7FzQuZlMiTJavX9xJO][c.s.C.A.C.A.A.C] Failed to request /repos/Spikes/Pond/installation
java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:232)
at okio.AsyncTimeout.exit(AsyncTimeout.java:286)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230)
at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213)
at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.java:400)
at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.java:236)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:177)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
at okhttp3.RealCall.execute(RealCall.java:81)
at com.sonarsource.C.A.C.A.A.D.B(Unknown Source)
at com.sonarsource.C.A.C.A.A.C.A(Unknown Source)
at com.sonarsource.C.A.C.A.A.C.A(Unknown Source)
at com.sonarsource.C.C.D.B.B(Unknown Source)
at com.sonarsource.C.C.D.B.A(Unknown Source)
at com.sonarsource.C.C.D.J.A(Unknown Source)
at com.sonarsource.C.C.Z.A(Unknown Source)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at com.sonarsource.C.C.Z.B(Unknown Source)
at com.sonarsource.C.C.Z.A(Unknown Source)
at org.sonar.ce.async.SynchronousAsyncExecution.addToQueue(SynchronousAsyncExecution.java:27)
at com.sonarsource.C.C.Z.A(Unknown Source)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at com.sonarsource.C.C.Z.finished(Unknown Source)
at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:113)
at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:107)
at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:91)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:63)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:209)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:191)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:158)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:133)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:85)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.SocketException: Socket closed
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:183)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at okio.Okio$2.read(Okio.java:140)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
… 56 common frames omitted
2019.12.02 09:54:38 TRACE ce[AW7FzQuZlMiTJavX9xJO][sql] time=1ms | sql=insert into ce_task_message ( uuid, task_uuid, message, created_at ) values ( ?, ?, ?, ? ) | params=AW7F0Zv5nITkFP1INkh4, AW7FzQuZlMiTJavX9xJO, Pull request decoration did not happen. Please install SonarQube Github application on the repository’s organization or user., 1575276878841

OK, I found the API on the Github Enterprise API documentation

Hi,
I still waiting your answer, in between we try different solution but all test we did fails.
The Sonarqube server is a Linux instance and the job is running with a local account.
We have to extend this local account and use a company AD directory account that have access to Github and give also access to the repository?
The reported error is a timeout problem during the API call to check if the application is installed on the repository. I think the timeout is 10s, is this time enough? If not, how can I extend it?
Bye Stefano

Hi Stefano,
10s should be more than enough. Looks like there is a connectivity problem between the SQ server and Github Enterprise server. Not sure how we can help with that. I’d start by trying to replicate the WS request from the SQ account to see if there is any network issue.

Good news.
We found and solve the issue, now the decoration works and the check’s are correctly reported in Github.
The problem was an internal setup of the proxy, in sonar.properties.

In the past, we have tried all possible proxy setting on the server but the result was always timeout,
Finally we discover the issue searching on google (https://techexpert.tips/sonarqube/sonarqube-proxy-configuration/) and then we have configured the sonar.properties file as follow:

sonar.properties

# No proxy hosts
# Added for Webhook and decoration issue
http.nonProxyHosts=localhost|127.0.0.1|*.CompanyDomain 

I don’t found a description of the setting of the internal proxy in the sonarqube documentation, maybe update the documentation and reference it in case of connection problems.

You can close the issue
Bye Stefano

1 Like

Thanks for the update.

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