My team has been using SonarCloud for about 3 months now, and recently we’ve had several sporadic failures that all look like the logs below. Unsure what is going on or what can be done but it seems like SonarCloud is randomly unavailable and it makes it difficult for our Bitbucket Pipelines CI/CD to accurately give us results. Any help would be much appreciated!
+ docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/opt/atlassian/pipelines/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
--env=BITBUCKET_PR_DESTINATION_BRANCH="$BITBUCKET_PR_DESTINATION_BRANCH" \
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
--env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
--env=BITBUCKET_PR_DESTINATION_COMMIT="$BITBUCKET_PR_DESTINATION_COMMIT" \
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
--env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
--env=CI="$CI" \
--env=BITBUCKET_PR_ID="$BITBUCKET_PR_ID" \
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
--env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
--env=SONAR_TOKEN="${SONAR_TOKEN}" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
sonarsource/sonarcloud-scan:2.0.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.8 Amazon.com Inc. (64-bit)
INFO: Linux 5.15.0-1058-aws amd64
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 8.0.0.54573
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=264ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: Loading required plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=171ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=682ms
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: Detected project key 'renewance_renewance-connect' from 'Bitbucket Cloud Pipelines'
INFO: Detected organization key 'renewance' from 'Bitbucket Cloud Pipelines'
INFO: Load project settings for component key: 'renewance_renewance-connect'
INFO: Load project settings for component key: 'renewance_renewance-connect' (done) | time=146ms
INFO: Process project properties
INFO: Project key: renewance_renewance-connect
INFO: Base dir: /opt/atlassian/pipelines/agent/build
INFO: Working dir: /opt/atlassian/pipelines/agent/build/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=176ms
INFO: Check ALM binding of project 'renewance_renewance-connect'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'renewance_renewance-connect' (done) | time=155ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=189ms
INFO: Load branch configuration
INFO: Detected analysis for pull request '228' targeting 'main'
INFO: Auto-configuring pull request 228
INFO: Load branch configuration (done) | time=524ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=406ms
INFO: Load active rules
INFO: Load active rules (done) | time=7524ms
INFO: Organization key: renewance
INFO: Pull request 228 for merge into main from chore/RC-323_replace_throws
INFO: Preprocessing files...
INFO: 6 languages detected in 586 preprocessed files
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 108021 files ignored because of scm ignore settings
INFO: Loading plugins for detected languages
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=660ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=776ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=177ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: **/build-wrapper-dump.json
INFO: 586 files indexed
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for plsql: PostgreSQL
INFO: Quality profile for ts: Sonar way
INFO: Quality profile for yaml: Sonar way
INFO: ------------- Run sensors on module renewance_renewance-connect
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=137ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (3 MB) | time=1529ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=4ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=100ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=100ms
INFO: Sensor IaC AzureResourceManager Sensor [iac]
INFO: Sensor IaC AzureResourceManager Sensor is restricted to changed files only
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC AzureResourceManager Sensor [iac] (done) | time=78ms
INFO: Sensor Java Config Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor Java Config Sensor [iac] (done) | time=9ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
INFO: Using embedded Node.js runtime
INFO: Using Node.js executable: '/root/.sonar/js/node-runtime/node'.
INFO: Memory configuration: OS (31292 MB), Node.js (4144 MB).
INFO: Found 4 tsconfig.json file(s): [/opt/atlassian/pipelines/agent/build/packages/rc-cdk/tsconfig.json, /opt/atlassian/pipelines/agent/build/packages/rc-db/tsconfig.json, /opt/atlassian/pipelines/agent/build/apps/rc-next/tsconfig.json, /opt/atlassian/pipelines/agent/build/apps/rc-lambda/tsconfig.json]
INFO: Creating TypeScript program
INFO: 477 source files to be analyzed
INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/rc-cdk/tsconfig.json
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
INFO: 0/477 files analyzed, current file: apps/rc-next/src/app/renewance/accounts/details/page.tsx
ERROR: Failure during analysis
java.lang.IllegalStateException: The bridge server is unresponsive
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:401)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.createProgram(BridgeServerImpl.java:484)
at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:74)
at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:119)
at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:399)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:131)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:60)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:54)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.net.http.HttpTimeoutException: request timed out
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:571)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:396)
... 37 common frames omitted
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0