Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

Current set up is SonarQube 9.9.7 developer edition deployed on the vm from zip . Running Azure Devops task SonarQubeAnalyze@7
We just start seeing the errors during the analysis step and not for every project .
This seems to be only happening for dotnet projects, which are prepared using SonarQubePrepare@7 and scannermode: dotnet.
Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
There are more java exceptions after this error, but they are the same. Any help in troubleshooting this issue would be appreciated

Hi,

Could we have the full analysis log, please?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

@ganncamp Attached is the log, without the /d:sonar.verbose=true . However I recently had to enable that for a different issue and it did not seem to produce any more results. I will enable it again and collect the info
Update, apparently the same thing was happening with angular scan, which is using cli mode. In any case I did update the parameter and ran it again and this time it worked and did not error out.
Just to be clear , should I expect to see [debug ] messages in addition to Info: or is it going to create a separate log file on the agent ?
It also does not seem to be related to one particular agent running the scans.
41.txt (52.9 KB)

Hi,

Thanks for the log!

Sometimes the logs aren’t helpful, but usually there’s something of value there. For instance:

Caused by: java.lang.IllegalStateException: Fail to request url: http://sqube.internal-hcp-np.online/batch/project.protobuf?key=hcus.app.v1.invoicearchive.NetCore
...
Caused by: java.net.SocketTimeoutException: timeout
...
Caused by: java.net.SocketTimeoutException: Read timed out

So the problem here is that the build agent is having trouble communicating with the server. Now, since multiple calls succeeded before this one:

2024-12-12T14:59:32.2222984Z INFO: Load global settings
2024-12-12T14:59:32.3055599Z INFO: Load global settings (done) | time=84ms
2024-12-12T14:59:32.3160667Z INFO: User cache: C:\Users\AzDevOps\.sonar\cache
2024-12-12T14:59:32.3197418Z INFO: Load/download plugins
2024-12-12T14:59:32.3205857Z INFO: Load plugins index
2024-12-12T14:59:32.3678328Z INFO: Load plugins index (done) | time=45ms
2024-12-12T14:59:32.7611011Z INFO: Load/download plugins (done) | time=243ms
2024-12-12T14:59:33.2118405Z INFO: Loaded core extensions: developer-scanner
2024-12-12T14:59:33.6109895Z INFO: Process project properties
2024-12-12T14:59:33.6114821Z INFO: Process project properties (done) | time=22ms
2024-12-12T14:59:33.6147744Z INFO: Execute project builders
2024-12-12T14:59:33.6148809Z INFO: Execute project builders (done) | time=80ms
2024-12-12T14:59:33.6149325Z INFO: Project key: hcus.app.v1.invoicearchive.NetCore
2024-12-12T14:59:33.6149786Z INFO: Base dir: C:\a\19\s
2024-12-12T14:59:33.6150267Z INFO: Working dir: C:\a\19\.sonarqube\out\.sonar
2024-12-12T14:59:33.6154352Z INFO: Load project settings for component key: 'hcus.app.v1.invoicearchive.NetCore'
2024-12-12T14:59:33.7004803Z INFO: Load project settings for component key: 'hcus.app.v1.invoicearchive.NetCore' (done) | time=29ms
2024-12-12T14:59:33.7906327Z INFO: Load project branches
2024-12-12T14:59:33.8288808Z INFO: Load project branches (done) | time=19ms
2024-12-12T14:59:33.8514458Z INFO: Load branch configuration
2024-12-12T14:59:33.8517450Z INFO: Load branch configuration (done) | time=3ms
2024-12-12T14:59:33.9255910Z INFO: Auto-configuring with CI 'Azure DevOps'
2024-12-12T14:59:33.9619150Z INFO: Load quality profiles
2024-12-12T14:59:34.0015758Z INFO: Load quality profiles (done) | time=66ms
2024-12-12T14:59:34.0016394Z INFO: Load active rules
2024-12-12T14:59:42.8541560Z INFO: Load active rules (done) | time=8848ms
2024-12-12T14:59:42.8542541Z INFO: Load analysis cache
2024-12-12T14:59:42.8674756Z INFO: Load analysis cache (404) | time=11ms

You should talk to your network folks.

 
HTH,
Ann

Thank you @ganncamp ! Will do

1 Like