Sonarlint is not connected to sonarqube 10

SonarLint is not connected to the SonarQube 10 via eclipse version

image

Hi,

What version is your SonarQube instance? If you’re not sure, you can check the page footer.

 
Ann

image

1 Like

It is creating connecting problems for many developers after Upgradation -Thanks

Hello @Devops_world,

for further investigation would you be so kind to provide us with more information for us to look into the issue?

  • Eclipse Version
  • Java Version (used for running Eclipse)
  • SonarLint Version
  • Operating system (I see some kind of Windows but please provide the full version)
  • Programming language you’re coding in
  • If using any build system (e.g. Gradle / Maven), the one with its version

Are there any issues logged to the (SonarLint) console? Maybe they’re only shown when using verbose output.

Thank you very much and have a great weekend! Best,
Tobias

Q: Eclipse Version
A:Eclipse IDE for Enterprise Java Developers (includes Incubating components)

Q:Version: 2020-12 (4.18.0)
A:Build id: 20201210-1552

  • Q:Java Version (used for running Eclipse)
    A:1.8
    *Q: SonarLint Version
    A:v7 -SonarLinT
    Q:1st issue:
    A:image

Q:2nd issue:
A:SonarLint analysis of project openapi-fun-promotion-category (26 files processed)…
Error during execution of SonarLint analysis
org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: C:\Users\siva.shankar\eclipse-workspace.sonarlint\storage\6c6f6e736f6e617230312e636572696c6c696f6e2e636f6d\projects\6f70656e6170692d66756e2d70726f6d6f74696f6e\analyzer_config.pb
at org.sonarsource.sonarlint.core.serverconnection.storage.ProtobufUtil.readFile(ProtobufUtil.java:42)
at org.sonarsource.sonarlint.core.serverconnection.storage.ProjectStorage.readConfiguration(ProjectStorage.java:104)
at org.sonarsource.sonarlint.core.serverconnection.storage.ProjectStorage.lambda$getAnalyzerConfiguration$1(ProjectStorage.java:60)

Q:* Operating system (I see some kind of Windows but please provide the full version)
A:Microsoft Windows 10 Pro
*Q: Programming language you’re coding in
A:Java
*Q: If using any build system (e.g. Gradle / Maven), the one with its version
A:Maven

Hi,

Sonarlint for Eclipse requires Java 11 for some time already, see

SonarLint requires Eclipse to use Java 11+ as runtime (but you can analyze Java projects targeting older Java versions).

Also Eclipse 2020-12 is quite old.
We use Eclipse 2021-12 (running on Java 17, will update to Eclipse 2023-06 soon) with
SonarLint for Eclipse 7.12.0.72679 and it works fine against Sonarqube Enterprise 10.1 (build 73491)

Gilbert

Yes , We are using java 11 for SonarLint

ok, your answer was “Java Version (used for running Eclipse) 1.8”

Did you already try with the deletion of the sonarlint storage of your workspace ?
Exit Eclipse, then delete the hidden folder <workspace>/.sonarlint then start Eclipse and update again.

Sorry, for Eclipse sonar lint purpose we are using java 11

Yes i did around 7 to 8 times the below process

Issues: SonarLint is not connecting to the SonarQube in Eclipse via binding

Solution :

It seems that SonarLint local issue cache somehow got corrupted. You can fix the issue by manually deleting the cache. It is in <your workspace root>/.metadata/.plugins/org.eclipse.core.resources/.projects/<your eclipse project name>/org.sonarlint.eclipse.core/issues/
You can simply remove the entire folder, and the error should go away.
The consequence is that you’ll lose the “history” of your issues (when was the issue first discovered), so in the UI, all issues will have a fresh date

  1. Cleaning Eclipse workspace .eclipse .sonarlint

  2. Deleting earlier connections in the binding of SonarQube from eclipse

  3. Creating new connections in Eclipse for binding with sonarqube

reference : Sonar lint plugin issue - STS

Did you also delete <workspace>/.sonarlint as the Sonarlint console log has

org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: C:\Users\siva.shankar\eclipse-workspace.sonarlint\storage …

You may also try with a fresh workspace !?

Yes everytime i created a fresh workspace

hm, then I am at the end of my rope.
All such cases i had over the years had been fixed the way i described.

Thanks, Gilbert for your time and efforts

another issue is after the upgrade of Sonraqube

It is perfectly working with the master branches, but Pull requests are failing with the remaining branches

we are doing override merges on PR

Don’t mix topics, create a new post instead, see
https://community.sonarsource.com/faq#one-subject

Yes Sure, I will create a separate ticket for the above,

Sonar Team, can you please help Us with Binding Issues

Sonar Team, can you please help Us with Binding Issues

Q: Eclipse Version
A:Eclipse IDE for Enterprise Java Developers (includes Incubating components)

Q:Version: 2020-12 (4.18.0)
A:Build id: 20201210-1552

  • Q:Java Version (used for running Eclipse)
    A:1.8
    *Q: SonarLint Version
    A:v7 -SonarLinT
    Q:1st issue:
    A:image

Q:2nd issue:
A:SonarLint analysis of project openapi-fun-promotion-category (26 files processed)…
Error during execution of SonarLint analysis
org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: C:\Users\siva.shankar\eclipse-workspace.sonarlint\storage\6c6f6e736f6e617230312e636572696c6c696f6e2e636f6d\projects\6f70656e6170692d66756e2d70726f6d6f74696f6e\analyzer_config.pb
at org.sonarsource.sonarlint.core.serverconnection.storage.ProtobufUtil.readFile(ProtobufUtil.java:42)
at org.sonarsource.sonarlint.core.serverconnection.storage.ProjectStorage.readConfiguration(ProjectStorage.java:104)
at org.sonarsource.sonarlint.core.serverconnection.storage.ProjectStorage.lambda$getAnalyzerConfiguration$1(ProjectStorage.java:60)

Q:* Operating system (I see some kind of Windows but please provide the full version)
A:Microsoft Windows 10 Pro
*Q: Programming language you’re coding in
A:Java
*Q: If using any build system (e.g. Gradle / Maven), the one with its version
A:Maven

Hello @Devops_world,

can you please provide me with the full SonarLint for Eclipse version you are using? The information provided by you sadly does not ring a bell:

*Q: SonarLint Version
A:v7 -SonarLinT

You can find the full SonarLint version via About Eclipse → Installation Details → Installed Software: SonarLint for Eclipse.

We have a similar issue with protobuf files (see THIS ticket), but I’d like to understand if this issue has the same origin or differs.

Therefore I’d like you to provide me with the exact Java version your Eclipse instance is running. From this thread I get mixed answers therefore please enlighten me:
You can find the information regarding the JRE via About Eclipse → Installation Details → Configuration: The information is provided as -vm <Path to JRE>

Best,
Tobias

Sonarlint version : org.sonarlint.eclipse.site-7.1.0.39158