After update to latest SQCommunity server analysis never finishes

I am using docker-compose with community image (volumes created). I have tried LTS, latest (24), 10.7 and 9.8. I am using sonarscanner 5.0 and 6.2. I am able to login and connect sonarlint correctly. When I launch sonarscanner it just hangs when it gets to the nodejs step.

I have configured and tried node version 16, 18 and 20, they all get stuck.

The scan only works with server version 9.8.

I tried with -X and it gets stuck the same just with more information, no error messages that I can see

I incremented the maxspace too (after searching considerably online)

I am running in an up to date ubuntu linux

any tips?

thanks in advance

1 Like

I left it running and it returned a java error:

INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 37:47.456s
INFO: Final Memory: 30M/160M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space

java -version
openjdk version “17.0.13” 2024-10-15

HTH

I left it running again with -X

13:40:31.136 DEBUG: Linter config: {"language":"ts","fileType":"TEST"} with S2187,S2486,S2699,S2970,S3415,S5863,S5958,S5973,S6079,S6080,S6092,S6426
14:13:12.279 INFO: Hit the cache for 0 out of 0
14:13:12.279 INFO: Miss the cache for 0 out of 0
14:13:12.287 ERROR: isAlive was interrupted
java.lang.InterruptedException: null
	at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.isAlive(BridgeServerImpl.java:453)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.heartbeat(BridgeServerImpl.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

14:13:15.438 DEBUG: Shutting down the worker
14:13:15.439 INFO: Rule | Time (ms) | Relative
14:13:15.439 INFO: :----|----------:|--------:
14:13:15.451 DEBUG: The worker thread exited with code 0
14:13:15.451 DEBUG: The bridge server shut down
14:13:15.451 INFO: Rule | Time (ms) | Relative
14:13:15.451 INFO: :----|----------:|--------:

does that mean something to anyone?

I tried adding more? heap to the java call:

exec "$java_cmd" -Xms1g -Xmx5g \

same result :smiling_face_with_tear:

Hey there.

If you’re going to pass more memory into the scanner, you’ll need to do so using the SONAR_SCANNER_JAVA_OPTS environment variable

Ok, I agree, better, but effectively it is the same effect, no?

I tried a few more times with the environment variable; the result is the same as with the hardcoded change I made.

any other ideas?

I found the issue. In one of the subdirectories of the project there is a recuresive link

somedirectory/parent -> ..

that probably throws some process into an infinite loop. once I removed that link the scanner finished correctly with all versions

HTH

1 Like