Errors on sonarsource/sonarcloud-scan Bitbucket pipe

  • ALM used: Bitbucket Cloud
  • CI system used: Bitbucket Cloud
  • Languages of the repository: Terraform

Today we experienced - pipe: sonarsource/sonarcloud-scan:1.4.0 lasting from 8 mins to 20 mins - well this was weird since it usually takes around 45 seconds in our case.
It ended up successfully, but when looking in bitbucket output we noticed 2 different exceptions (each in different pipeline):

org.sonarsource.nodejs.NodeCommandException: Failed to start server (300s timeout)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServer(EslintBridgeServerImpl.java:135)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServerLazily(EslintBridgeServerImpl.java:212)

and:

ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).
ERROR: Failure during analysis, Node.js command to start eslint-bridge was: node /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 38675 127.0.0.1 /opt/atlassian/pipelines/agent/build/.scannerwork true false /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/custom-rules7080020476436949594/package
java.lang.IllegalStateException: eslint-bridge is unresponsive
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.request(EslintBridgeServerImpl.java:276)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.analyzeYaml(EslintBridgeServerImpl.java:256)

Please check :slight_smile:
Cheers

Hi,

Welcome to the community!

This looks like a question of the resources on your build agent. Have you tried granting more memory to the process like the second error suggests?

Also, what version of Node.js is installed on your build agent(s)? You should make sure you’re on a recent version.

 
Ann