Failed to start the bridge server (300S timeout) MAC OS15

Must-share information (formatted with Markdown):

Environment:

  • SonarQube: * Developer Edition v10.7
  • SonarLint: v4.12.0
  • Mac: OS 15.1
  • eset security endpoint: 8.1.6.0
  • Node: 18.17.0
  • Java: 23.0.1

*** what are you trying to achieve**
We are getting this error on any analysis made by sonarqube:

[Info - 08:59:34.723] Memory configuration: OS (16384 MB), Node.js (4144 MB).
[Info - 09:00:07.001] Rule | Time (ms) | Relative
[Info - 09:00:07.001] :----|----------:|--------:
[Info - 09:00:24.076] Rule | Time (ms) | Relative
[Info - 09:00:24.076] :----|----------:|--------:
[Error - 09:04:24.870] Failed to start the bridge server (300s timeout)
[Info - 09:04:24.870] Hit the cache for 0 out of 0
[Info - 09:04:24.871] Miss the cache for 0 out of 0
[Error - 09:04:24.871] Error executing sensor: 'JavaScript/TypeScript analysis'
[Error - 09:04:24.872] java.lang.IllegalStateException: Error while running Node.js. A supported version of Node.js is required for running the analysis of JS/TS files. Please make sure a supported version of Node.js is available in the PATH or an executable path is provided via 'sonar.nodejs.executable' property. Alternatively, you can exclude JS/TS files from your analysis using the 'sonar.exclusions' configuration property. See the docs for configuring the analysis environment: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/

It begun when we updated our mac OS to sequoia. What this bridge does and why it fails locally when all rules has been got from the sonarqube server with no errors? We have got this error making analysis using sonarlint extension from VSCode but also doing it using the Jenkins scanner plugin.

I’m having the same problem on my dev environment. Sonarqube is not working on the “Connected mode” so it can not retrieve rules or issues from the server because of this problem with the bridge server

we got the same error on our environment, “Failed to start the bridge server” on our jenkins runs in mac OS 15.1 (sequoia)

Hey everyone (@Alberto_de_la_Fuente, @Sebastian_Morcillo, @cgarro)

Just to confirm, this is all happening in the context of SonarLint for VSCode on MacOS 15.1?

Hi Colin, yes it is, but also if you make the code analysis using the Jenkins plugin in mac devices with MacOS 15.x

Hi,

what is the hardware you are running this on? Is it Apple Silicon (arm) or Intel?

Can you please share full logs from both Jenkins and VSCode?

Thanks

Hi,

It happens working on both hardware systems, Apple Silicon (arm) M1 and also intel.

These are the jenkins logs:

11:44:50  11:44:49.745 INFO: 1548 files indexed
11:44:50  11:44:49.746 INFO: Quality profile for css: Sonar way
11:44:50  11:44:49.746 INFO: Quality profile for js: Sonar way
11:44:50  11:44:49.746 INFO: Quality profile for json: Sonar way
11:44:50  11:44:49.746 INFO: Quality profile for ts: Sonar way
11:44:50  11:44:49.746 INFO: ------------- Run sensors on module lean_FrontCore_AYgJjyNo3yEHR8G1Ih1Q
11:44:50  11:44:49.790 INFO: Load metrics repository
11:44:50  11:44:49.790 DEBUG: --> GET http://---------/api/metrics/search?ps=500&p=1
11:44:50  11:44:50.095 DEBUG: <-- 200 http://---------/api/metrics/search?ps=500&p=1 (304ms, unknown-length body)
11:44:50  11:44:50.102 INFO: Load metrics repository (done) | time=312ms
11:44:50  11:44:50.527 DEBUG: Added 318 checks for language='ts', repository='typescript'
11:44:50  11:44:50.532 DEBUG: Added 15 checks for language='ts', repository='tssecurity'
11:44:50  11:44:50.533 DEBUG: Added 316 checks for language='js', repository='javascript'
11:44:50  11:44:50.534 DEBUG: Added 15 checks for language='js', repository='jssecurity'
11:44:50  11:44:50.540 DEBUG: No registered JsAnalysisConsumer.
11:44:50  11:44:50.560 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
11:44:50  11:44:50.562 DEBUG: 'XML Sensor' skipped because there is no related file in current project
11:44:50  11:44:50.563 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project
11:44:50  11:44:50.564 DEBUG: 'IaC Kubernetes Sensor' skipped because there is no related file in current project
11:44:50  11:44:50.564 DEBUG: 'JavaScript inside YAML analysis' skipped because there is no related file in current project
11:44:50  11:44:50.565 DEBUG: 'JavaScript inside HTML analysis' skipped because there is no related file in current project
11:44:50  11:44:50.565 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
11:44:50  11:44:50.565 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
11:44:50  11:44:50.565 DEBUG: 'Import of stylelint issues' skipped because one of the required properties is missing
11:44:50  11:44:50.567 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
11:44:50  11:44:50.567 DEBUG: Sensors : HTML -> JaCoCo XML Report Importer -> IaC CloudFormation Sensor -> IaC AzureResourceManager Sensor -> Java Config Sensor -> JavaScript/TypeScript analysis -> CSS Rules -> JavaScript/TypeScript Coverage -> CSS Metrics -> IaC Docker Sensor -> Serverless configuration file sensor -> AWS SAM template file sensor -> AWS SAM Inline template file sensor -> TextAndSecretsSensor -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor -> PythonSecuritySensor -> JsSecuritySensor
11:44:50  11:44:50.568 INFO: Sensor HTML [web]
11:44:51  11:44:50.967 INFO: Sensor HTML [web] (done) | time=399ms
11:44:51  11:44:50.967 INFO: Sensor JaCoCo XML Report Importer [jacoco]
11:44:51  11:44:50.968 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
11:44:51  11:44:50.969 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
11:44:51  11:44:50.969 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
11:44:51  11:44:50.969 INFO: Sensor IaC CloudFormation Sensor [iac]
11:44:51  11:44:50.971 DEBUG: 'src/package.json' generated metadata with charset 'UTF-8'
11:44:51  11:44:50.971 DEBUG: File without identifier 'AWSTemplateFormatVersion': src/package.json
11:44:51  11:44:50.982 INFO: 0 source files to be analyzed
11:44:51  11:44:50.986 INFO: 0/0 source files have been analyzed
11:44:51  11:44:50.986 INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=17ms
11:44:51  11:44:50.986 INFO: Sensor IaC AzureResourceManager Sensor [iac]
11:44:51  11:44:50.987 DEBUG: File without identifier 'https://schema.management.azure.com/schemas/': src/package.json
11:44:51  11:44:51.054 INFO: 0 source files to be analyzed
11:44:51  11:44:51.054 INFO: 0/0 source files have been analyzed
11:44:51  11:44:51.054 INFO: Sensor IaC AzureResourceManager Sensor [iac] (done) | time=68ms
11:44:51  11:44:51.054 INFO: Sensor Java Config Sensor [iac]
11:44:51  11:44:51.067 INFO: 0 source files to be analyzed
11:44:51  11:44:51.067 INFO: 0/0 source files have been analyzed
11:44:51  11:44:51.067 INFO: Sensor Java Config Sensor [iac] (done) | time=13ms
11:44:51  11:44:51.067 INFO: Sensor JavaScript/TypeScript analysis [javascript]
11:44:51  11:44:51.070 DEBUG: Deploying the bridge server into /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle
11:44:56  11:44:55.546 INFO: Detected os: Mac OS X arch: x86_64 alpine: false. Platform: UNSUPPORTED
11:44:56  11:44:55.546 DEBUG: Your platform is not supported for embedded Node.js. Falling back to host Node.js.
11:44:56  11:44:55.547 DEBUG: Deploying custom rules bundle jar:file:/Users/jenkins/.sonar/cache/0a3dcef3c49b0bbceb27193c0b18dea9/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules7839637140932327517
11:44:56  11:44:55.551 DEBUG: Starting server
11:44:56  11:44:55.555 DEBUG: Creating Node.js process to start the bridge server on port 52054 
11:44:56  11:44:55.556 DEBUG: Looking for Node.js in the PATH using run-node (macOS)
11:44:56  11:44:55.557 INFO: Using Node.js executable: '/Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/node_modules/run-node/run-node'.
11:44:56  11:44:55.557 DEBUG: Checking Node.js version
11:44:56  11:44:55.557 DEBUG: Launching command /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/node_modules/run-node/run-node -v
11:44:56  11:44:55.844 DEBUG: Using Node.js v18.20.4.
11:44:56  11:44:55.844 DEBUG: Launching command /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/node_modules/run-node/run-node /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/bin/server 52054 127.0.0.1 /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork true false false /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules7839637140932327517/package
11:44:58  11:44:58.002 INFO: Memory configuration: OS (16384 MB), Node.js (4144 MB).
11:44:58  11:44:58.003 DEBUG: Starting the bridge server
11:44:58  11:44:58.013 DEBUG: The bridge server is listening on port 52054
11:44:58  11:44:58.053 DEBUG: The worker thread is running
11:45:15  11:45:13.095 DEBUG: Shutting down the worker
11:46:14  11:46:06.227 INFO: Rule | Time (ms) | Relative
11:46:14  11:46:06.227 INFO: :----|----------:|--------:
11:46:14  11:46:06.227 DEBUG: The worker thread exited with code 0
11:46:14  11:46:06.229 DEBUG: The bridge server shut down
11:46:14  11:46:06.231 INFO: Rule | Time (ms) | Relative
11:46:14  11:46:06.231 INFO: :----|----------:|--------:
11:50:09  11:49:55.876 ERROR: Failed to start the bridge server (300s timeout)
11:50:09  org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to start the bridge server (300s timeout)
11:50:09  	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServer(BridgeServerImpl.java:209)
11:50:09  	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:312)
11:50:09  	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:76)
11:50:09  	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
11:50:09  	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
11:50:09  	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
11:50:09  	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
11:50:09  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:50:09  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
11:50:09  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:50:09  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
11:50:09  	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
11:50:09  	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
11:50:09  	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
11:50:09  	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
11:50:09  	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
11:50:09  	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
11:50:09  	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
11:50:09  
11:50:09  11:49:55.877 INFO: Hit the cache for 0 out of 0
11:50:09  11:49:55.878 INFO: Miss the cache for 0 out of 0
11:50:09  11:49:59.341 INFO: ------------------------------------------------------------------------
11:50:09  11:49:59.341 INFO: EXECUTION FAILURE
11:50:09  11:49:59.341 INFO: ------------------------------------------------------------------------
11:50:09  11:49:59.342 INFO: Total time: 5:32.434s
11:50:09  11:49:59.366 INFO: Final Memory: 16M/74M
11:50:09  11:49:59.366 INFO: ------------------------------------------------------------------------
11:50:09  11:49:59.366 ERROR: Error during SonarScanner execution
11:50:09  java.lang.IllegalStateException: Error while running Node.js. A supported version of Node.js is required for running the analysis of JS/TS files. Please make sure a supported version of Node.js is available in the PATH or an executable path is provided via 'sonar.nodejs.executable' property. Alternatively, you can exclude JS/TS files from your analysis using the 'sonar.exclusions' configuration property. See the docs for configuring the analysis environment: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/javascript-typescript-css/
11:50:09  	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:89)
11:50:09  	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
11:50:09  	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
11:50:09  	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
11:50:09  	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
11:50:09  	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
11:50:09  	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
11:50:09  	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
11:50:09  	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
11:50:09  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:50:09  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
11:50:09  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:50:09  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
11:50:09  	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
11:50:09  	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
11:50:09  	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
11:50:09  	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
11:50:09  	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
11:50:09  	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
11:50:09  	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
11:50:09  Caused by: org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to start the bridge server (300s timeout)
11:50:09  	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServer(BridgeServerImpl.java:209)
11:50:09  	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:312)
11:50:09  	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:76)
11:50:09  	... 33 more
11:50:09  11:49:59.370 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$373/0x00000001282ad160@15fa55a6 during JVM shutdown
11:50:09  [Pipeline] }
11:50:11  WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
11:50:11  [Pipeline] // withSonarQubeEnv
11:50:11  [Pipeline] }
11:50:11  Lock released on resource [Resource: lock-sq-jenkins-slave3]
11:50:11  [Pipeline] // lock
11:50:11  [Pipeline] }
11:50:11  [Pipeline] // script
11:50:11  [Pipeline] }
11:50:12  [Pipeline] // withCredentials
11:50:12  [Pipeline] }
11:50:12  [Pipeline] // withEnv
11:50:12  [Pipeline] }
11:50:12  [Pipeline] // stage
11:50:12  [Pipeline] stage
11:50:12  [Pipeline] { (Quality Gate)
11:50:12  Stage "Quality Gate" skipped due to earlier failure(s)

These are the Sonarlint logs:

[Info - 14:52:28.588] Triggering analysis with configuration: [
  baseDir: /Users/sebas/Documents/repos/mleanfrontend
  extraProperties: {sonar.updatecenter.cache.ttl=3600000, sonaranalyzer-cs.nuget.packageVersion=9.32.0.97167, sonaranalyzer.security.cs.pluginVersion=10.7.0.32997, sonar.auth.bitbucket.allowUsersToSignUp=true, sonar.cs.ignoreHeaderComments=true, sonar.c.file.suffixes=.c,.h, sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts, sonar.auth.github.enabled=false, sonar.python.coverage.reportPaths=coverage-reports/*coverage-*.xml, sonar.text.activate=true, sonaranalyzer-vbnet.nuget.packageVersion=9.32.0.97167, provisioning.gitlab.enabled=false, sonar.go.file.suffixes=.go, sonar.cs.analyzeRazorCode=true, sonar.auth.saml.applicationId=sonarqube, email.fromName=SonarQube, sonar.python.xunit.skipDetails=false, sonar.ipynb.file.suffixes=ipynb, sonar.dbcleaner.weeksBeforeKeepingOnlyAnalysesWithVersion=104, sonar.plsql.jdbc.driver.class=oracle.jdbc.OracleDriver, sonar.qualitygate.ignoreSmallChanges=true, sonar.auth.saml.signature.enabled=false, sonar.go.exclusions=**/vendor/**, sonar.php.exclusions=**/vendor/**, sonar.terraform.file.suffixes=.tf, sonar.forceAuthentication=true, sonar.notifications.delay=60, sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp,.ixx,.mxx,.cppm,.ccm,.cxxm,.c++m, sonar.swift.file.suffixes=.swift, sonar.documentation.baseUrl=https://docs.sonarsource.com/sonarqube/, sonar.vbnet.roslyn.ignoreIssues=false, sonar.plsql.ignoreHeaderComments=false, sonar.flex.file.suffixes=as, sonaranalyzer.security.cs.nuget.packageVersion=10.7.0.32997, sonar.filesize.limit=20, sonar.auth.gitlab.groupsSync=false, sonar.auth.github.apiUrl=https://api.github.com/, sonar.ruby.file.suffixes=.rb, sonaranalyzer-cs.ruleNamespace=SonarAnalyzer.CSharp, sonar.auth.github.allowUsersToSignUp=true, sonar.azureresourcemanager.file.identifier=https://schema.management.azure.com/schemas/, sonar.cs.analyzeGeneratedCode=false, sonar.python.xunit.reportPath=xunit-reports/xunit-result-*.xml, sonar.java.jvmframeworkconfig.file.patterns=**/src/main/resources/**/application*.properties,**/src/main/resources/**/application*.yaml,**/src/main/resources/**/application*.yml, sonar.builtInQualityProfiles.disableNotificationOnUpdate=false, sonar.javascript.globals=angular,goog,google,OpenLayers,d3,dojo,dojox,dijit,Backbone,moment,casper,_,sap, sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay=24, sonar.yaml.file.suffixes=.yaml,.yml, sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs=1, sonar.auth.bitbucket.enabled=false, sonar.terraform.activate=true, sonar.css.file.suffixes=.css,.less,.scss,.sass, sonar.cpd.abap.minimumTokens=100, sonar.docker.file.patterns=Dockerfile,*.dockerfile, sonar.auth.github.webUrl=https://github.com/, sonar.dbcleaner.branchesToKeepWhenInactive=master,develop, sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig, sonaranalyzer-vbnet.nuget.packageId=SonarAnalyzer.VisualBasic, sonar.php.frameworkDetection=true, sonar.auth.gitlab.enabled=true, sonar.cpd.cross_project=false, email.from=noreply@nowhere, sonaranalyzer-vbnet.pluginVersion=9.32.0.97167, sonar.vbnet.ignoreHeaderComments=true, sonar.cfamily.compile-commands=, sonaranalyzer.security.cs.analyzerId=SonarAnalyzer.Security, sonaranalyzer.security.cs.nuget.packageId=SonarAnalyzer.Security, sonar.auth.github.groupsSync=false, sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek=4, sonaranalyzer-vbnet.analyzerId=SonarAnalyzer.VisualBasic, email.prefix=[SONARQUBE], sonar.scala.file.suffixes=.scala, sonar.auth.gitlab.allowedGroups=, sonar.cs.roslyn.ignoreIssues=false, sonar.cloudformation.activate=true, sonaranalyzer-cs.pluginKey=csharp, sonar.kubernetes.activate=true, sonar.java.ignoreUnnamedModuleForSplitPackage=False, sonar.json.file.suffixes=.json, sonaranalyzer.security.cs.pluginKey=securitycsharpfrontend, sonaranalyzer-vbnet.ruleNamespace=SonarAnalyzer.VisualBasic, sonar.cloudformation.file.identifier=AWSTemplateFormatVersion, sonar.auth.saml.providerName=SAML, provisioning.github.project.visibility.enabled=true, sonar.dbcleaner.daysBeforeDeletingAnticipatedTransitions=30, sonar.javascript.ignoreHeaderComments=true, sonar.dbcleaner.daysBeforeDeletingClosedIssues=30, sonar.java.enablePreview=False, sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth=52, sonar.lf.gravatarServerUrl=https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&d=identicon, sonar.core.serverBaseURL=http://-, sonar.objc.file.suffixes=.m, sonar.text.inclusions=**/*.sh,**/*.bash,**/*.zsh,**/*.ksh,**/*.ps1,**/*.properties,**/*.conf,**/*.pem,**/*.config,.env,.aws/config, sonar.ruby.coverage.reportPaths=coverage/.resultset.json, sonar.coverage.exclusions=./**/*.test*,./**/*.spec*,./**/__mocks__/**/*, sonar.qualityProfiles.allowDisableInheritedRules=false, sonaranalyzer-cs.staticResourceName=SonarAnalyzer-9.32.0.97167.zip, sonar.notifications.runningDelayBeforeReportingStatus=600, sonar.auth.gitlab.allowUsersToSignUp=false, sonar.projectCreation.mainBranchName=main, sonar.jsp.file.suffixes=.jsp,.jspf,.jspx, sonar.javascript.maxFileSize=3000, sonaranalyzer-cs.nuget.packageId=SonarAnalyzer.CSharp, sonar.javascript.environments=amd,applescript,atomtest,browser,commonjs,embertest,greasemonkey,jasmine,jest,jquery,meteor,mocha,mongo,nashorn,node,phantomjs,prototypejs,protractor,qunit,serviceworker,shared-node-browser,shelljs,webextensions,worker, sonar.authenticator.downcase=false, sonar.scm.disabled=false, sonar.ruby.exclusions=**/vendor/**, sonar.dart.file.suffixes=.dart, sonar.auth.saml.enabled=false, sonar.vbnet.file.suffixes=.vb, sonaranalyzer-cs.analyzerId=SonarAnalyzer.CSharp, sonar.core.id=243B8A4D-AYfl4Tflm_zQjOtAbsI8, sonar.exclusions=src/fontawesome/**,src/FrontCore/**/*,src/assets/js/date-range-picker.js,node_modules,./**/__mocks__/**/*, sonar.cfamily.generateComputedConfig=false, sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog, sonar.cfamily.ignoreHeaderComments=true, sonar.technicalDebt.ratingGrid=0.05,0.1,0.2,0.5, sonar.technicalDebt.developmentCost=30, sonar.lf.enableGravatar=false, sonar.validateWebhooks=true, sonar.docker.activate=true, sonar.python.file.suffixes=py, sonaranalyzer-cs.pluginVersion=9.32.0.97167, sonaranalyzer.security.cs.staticResourceName=SonarAnalyzer.Security-10.7.0.32997.zip, sonar.cs.file.suffixes=.cs,.razor, sonar.developerAggregatedInfo.disabled=false, sonar.plsql.file.suffixes=sql,pks,pkb, sonaranalyzer.security.cs.ruleNamespace=SonarAnalyzer.Security, sonar.plugins.downloadOnlyRequired=true, sonar.azureresourcemanager.file.suffixes=.bicep, sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue, sonar.cpd.abap.minimumLines=20, sonar.allowPermissionManagementForProjectAdmins=true, sonar.text.inclusions.activate=true, sonaranalyzer-vbnet.staticResourceName=SonarAnalyzer-9.32.0.97167.zip, sonar.vbnet.analyzeGeneratedCode=false, sonar.java.file.suffixes=.java,.jav, sonar.kotlin.file.suffixes=.kt,.kts, sonar.plugins.risk.consent=NOT_ACCEPTED, sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc, sonar.auth.gitlab.url=https://gitlab.m-lean.com/, sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config, sonar.dbcleaner.weeksBeforeDeletingAllSnapshots=260, sonaranalyzer-vbnet.pluginKey=vbnet, sonar.azureresourcemanager.activate=true, sonar.java.jvmframeworkconfig.activate=true, sonar.updatecenter.url=https://downloads.sonarsource.com/sonarqube/update/update-center.properties, sonar.tsql.file.suffixes=.tsql, sonar.core.startTime=2024-11-04T08:59:09+0000}
  activeRules: [22 kubernetes, 443 cpp, 24 css, 251 python, 207 c, 25 go, 11 pythonbugs, 59 tsql, 90 secrets, 316 javascript, 40 docker, 132 plsql, 491 java, 49 Web, 24 xml, 335 csharpsquid, 177 php, 49 terraform, 6 javabugs, 31 azureresourcemanager, 318 typescript, 26 cloudformation]
  inputFiles: [
    file:///Users/sebas/Documents/repos/mleanfrontend/FrontCore/typescript/package.json (UTF-8) [json]
  ]
]

[Info - 14:52:33.290] Rule | Time (ms) | Relative
[Info - 14:52:33.290] :----|----------:|--------:
[Error - 14:56:19.857] Failed to start the bridge server (300s timeout)
[Info - 14:56:19.859] Hit the cache for 0 out of 0
[Info - 14:56:19.859] Miss the cache for 0 out of 0
[Error - 14:56:19.860] Error executing sensor: 'JavaScript/TypeScript analysis'
[Error - 14:56:19.860] java.lang.IllegalStateException: Error while running Node.js. A supported version of Node.js is required for running the analysis of JS/TS files. Please make sure a supported version of Node.js is available in the PATH or an executable path is provided via 'sonar.nodejs.executable' property. Alternatively, you can exclude JS/TS files from your analysis using the 'sonar.exclusions' configuration property. See the docs for configuring the analysis environment: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/javascript-typescript-css/
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:89)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doRunAnalysis(AnalyzeCommand.java:65)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.lambda$execute$0(AnalyzeCommand.java:54)
	at org.sonarsource.sonarlint.core.progress.RpcProgressMonitor.lambda$startTask$0(RpcProgressMonitor.java:44)
	at org.sonarsource.sonarlint.core.progress.TaskManager.startTask(TaskManager.java:61)
	at org.sonarsource.sonarlint.core.progress.RpcProgressMonitor.startTask(RpcProgressMonitor.java:44)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:53)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:34)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.sonar.plugins.javascript.nodejs.NodeCommandException: Failed to start the bridge server (300s timeout)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServer(BridgeServerImpl.java:209)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:312)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:76)
	... 17 more

[Info - 14:56:19.861] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[Info - 14:56:19.913] 0 source files to be analyzed
[Info - 14:56:19.913] 0/0 source files have been analyzed
[Info - 14:56:19.915] Available processors: 10
[Info - 14:56:19.915] Using 10 threads for analysis.
[Info - 14:56:20.130] The property "sonar.tests" is not set. To improve the analysis accuracy, we categorize a file as a test file if any of the following is true:
  * The filename starts with "test"
  * The filename contains "test." or "tests."
  * Any directory in the file path is named: "doc", "docs", "test" or "tests"
  * Any directory in the file path has a name ending in "test" or "tests"

[Info - 14:56:20.137] Analyzing all except non binary files
[Info - 14:56:20.140] 1 source file to be analyzed
[Info - 14:56:20.159] 1/1 source file has been analyzed
[Info - 14:56:20.164] Analysis detected 0 issues and 0 Security Hotspots in 308179ms
[Info - 14:56:20.191] Index files
[Info - 14:56:20.192] 6 files indexed

Hello Alberto,

Thank you for providing the logs.

For the SonarQube server use case, the relevant lines are the following:

11:44:58  11:44:58.053 DEBUG: The worker thread is running
11:45:15  11:45:13.095 DEBUG: Shutting down the worker

During the analysis, we spawn a Node.js process which will perform the analysis on the files that are provided to it by the Scanner Java process.
As the Java process might crash, we have a heartbeat/keepAlive mechanism between the 2, the Node.js process expects a ping every 15s. As you can see here, the Node.js process is shutting down exactly 15s after being started, meaning it didn’t receive any heartbeat in the allocated time, which is unusual. The Scanner didn’t start sending files to analyze either, as it didn’t get any reply on its /status requests.

Could you share the scanner options that you provide when starting the analysis?

Best,
Ilia

For the SonarLint context, it could be that your your IDE network parameters are configured in a way that they block HTTP requests as seen in this post. Could you have a look?

Hello Ilia,

Yes, these are the scanner options provided when starting the analysis:

11:44:26  Injecting SonarQube environment variables using the configuration: sonarqube-developerEdition
11:44:26  [Pipeline] {
11:44:26  [Pipeline] sh
11:44:27  + /Users/jenkins/.jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_scanner/bin/sonar-scanner -X -Dsonar.login=admin -Dsonar.password=**** -Dsonar.sources=src/ -Dsonar.tests=src/ '-Dsonar.exclusions=src/**/*.test*,src/**/*.spec*,src/**/*.stories*,src/fontawesome/**,src/views/DS/**' '-Dsonar.test.inclusions=src/**/*.test*,src/**/*.spec*,src/**/*.stories*,src/__tests__/**,src/**/__mocks__/**' -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info '-Dsonar.coverage.exclusions=src/**/*.test*,src/**/*.spec*,src/**/*.stories*,src/fontawesome/**,src/__tests__/**,__tests__/**/*,__mocks__/**/*,.husky/**,auth/**,components/**,composition/**,constants/**,coverage/**,errors/**,i18n/**,images/**,mixins/**,node_modules/**,plugins/**,reports/**,scripts/**,styles/**,tools/**,typescript/**,utils/**,jest*,stryker*,src/assets/**,src/auth/**,src/components/**,src/composition/**,src/constants/**,src/directives/**,src/entities/**,src/errors/**,src/i18n/**,src/mixins/**,src/plugins/**,src/polyfills/**,src/store/**,src/utils/**,src/babel.config.js,src/index.js,src/jest*,src/vue.config.ts'
11:44:27  11:44:26.933 INFO: Scanner configuration file: /Users/jenkins/.jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_scanner/conf/sonar-scanner.properties
11:44:27  11:44:26.936 INFO: Project root configuration file: /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/sonar-project.properties
11:44:27  11:44:26.960 INFO: SonarScanner 4.8.0.2856
11:44:27  11:44:26.960 INFO: Java 17.0.9 Oracle Corporation (64-bit)
11:44:27  11:44:26.960 INFO: Mac OS X 15.0.1 x86_64
11:44:27  11:44:27.100 DEBUG: keyStore is : 
11:44:27  11:44:27.100 DEBUG: keyStore type is : pkcs12
11:44:27  11:44:27.100 DEBUG: keyStore provider is : 
11:44:27  11:44:27.100 DEBUG: init keystore
11:44:27  11:44:27.101 DEBUG: init keymanager of type SunX509
11:44:27  11:44:27.207 DEBUG: Create: /Users/jenkins/.sonar/cache
11:44:27  11:44:27.208 INFO: User cache: /Users/jenkins/.sonar/cache
11:44:27  11:44:27.208 DEBUG: Create: /Users/jenkins/.sonar/cache/_tmp
11:44:27  11:44:27.211 DEBUG: Extract sonar-scanner-api-batch in temp...
11:44:27  11:44:27.216 DEBUG: Get bootstrap index...
11:44:27  11:44:27.216 DEBUG: Download: http://+++/batch/index
11:44:27  11:44:27.392 DEBUG: Get bootstrap completed
11:44:27  11:44:27.395 DEBUG: Create isolated classloader...
11:44:27  11:44:27.405 DEBUG: Start temp cleaning...
11:44:27  11:44:27.438 DEBUG: Temp cleaning done
11:44:27  11:44:27.438 DEBUG: Execution getVersion
11:44:27  11:44:27.455 INFO: Analyzing on SonarQube server 10.7.0.96327
11:44:27  11:44:27.455 INFO: Default locale: "en_ES", source code encoding: "UTF-8" (analysis is platform dependent)
11:44:27  11:44:27.456 DEBUG: Work directory: /Users/jenkins/.jenkins/workspace/FrontCore-mb_sq_test_on_slave3/.scannerwork
11:44:27  11:44:27.456 DEBUG: Execution execute
11:44:27  11:44:27.679 DEBUG: JVM max available memory: 4 GB
11:44:27  11:44:27.771 DEBUG: Developer 10.7.0.96327
11:44:28  11:44:27.881 DEBUG: Sonar User Home: /Users/jenkins/.sonar
11:44:28  11:44:28.259 DEBUG: Successfully loaded KeyStore of the type [KeychainStore] having [0] entries
11:44:28  11:44:28.520 DEBUG: Loaded [157] system trusted certificates
11:44:29  11:44:28.656 INFO: Load global settings
11:44:29  11:44:28.667 DEBUG: --> GET http://+++/api/settings/values.protobuf
11:44:29  11:44:29.022 DEBUG: <-- 200 http://++++/api/settings/values.protobuf (354ms, unknown-length body)
11:44:29  11:44:29.053 INFO: Load global settings (done) | time=397ms

Best!
Alberto

Hey Alberto,
I don’t see anything fishy with your parameters. Could you check your network parameters?

You can try like this:

# listen to TCP connections
PORT=7634
nc -4 -l -v localhost $PORT

and in another shell run:

PORT=7634
curl http://localhost:$PORT

If it fails to print the request content on the server like this, you have an issue with your network settings:

GET / HTTP/1.1
Host: localhost: 7634
User-Agent: curl/8.7.1
Accept: */*

Hi Ilia,

Apparently it works fine:

Last login: Mon Nov 11 07:13:47 2024
➜  ~ PORT=7634
➜  ~ nc -4 -l -v localhost $PORT
GET / HTTP/1.1
Host: localhost:7634
User-Agent: curl/8.7.1
Accept: */*

Hi Alberto,

Could you try running the scanner from another environment to see if the problem persists?

Could you have a look at your network configuration to see if the MacOS upgrade didn’t set something to an unusual value?

Hi Ilia,

Here is the problem, we don’t know which network config parameters or what in general could be affecting to the scanner analysis when it tries to execute the Node.js process. Do you know what could be affecting to this stage of the scanner process?

Best

The issue might be that some applications, such as Java or Node, get blocked by network rules. You could check how eset is configured.

Here are 2 simple code snippets:

A Node.js server

That you can run with node server.js

const http = require('http');
const PORT = '9876';
const HOST = '127.0.0.1';

const requestHandler = (request, response) => {
  let data = '';
  request.on('data', chunk => (data += chunk));
  request.on('end', () => {
    console.log('received request');
    response.end('answer was received');
  });
  request.on('error', err => {
    console.error('error', err);
    response.statusCode = 400;
    response.end('error');
  });
};

const server = http.createServer(requestHandler);

server.listen(PORT, HOST, err => {
  if (err) {
    return console.log('something bad happened', err);
  }
  console.log(`server is listening on ${HOST}:${PORT}`);
});

A Java client

Once the Node.js server is running, you can run it with java MyClient.java

package scripts;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;

public class MyClient {

  public static String sendRequest(String host, int port) throws Exception {
    HttpRequest request =
      HttpRequest
        .newBuilder()
        .uri(url(host, port, "hello"))
        .GET()
        .build();
    HttpClient client =
      HttpClient
        .newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build();
    HttpResponse<String> response =
      client
        .send(request, BodyHandlers.ofString());
    String responseBody = response.body();
    return responseBody;
  }

  private static URI url(String host, int port, String endpoint) {
    try {
      return new URI("http", null, host, port, "/" + endpoint, null, null);
    } catch (URISyntaxException e) {
      throw new IllegalStateException("Invalid URI: " + e.getMessage(), e);
    }
  }

  public static void main(String[] args) throws Exception {
    String response = sendRequest("localhost", 9876);
    System.out.println(response); // MyApiResponse[message1={"hello":"world"}, message2={"foo":"bar"}]
  }
}

If they can communicate with each other, they should print the following:

$ node server.js
server is listening on 127.0.0.1:9876
received request
$ java MyClient.java
answer was received

Hi Ilia, thank you for your reply

I have tried what you said and it work, they can communicate. So it appears that there is something more because the problem with the bridge server remains