Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown version for SonarQube server (http://localhost:9000). Please check server is reachable

I Have installed Sonar in my system, and eclipse plugin of the same.

I am following below mentioned steps

  1. Running StartSonar.bat
  2. Going to my project directory where POM.XML is located of my project and run the command

    mvn sonar:sonar
    
  3. Eclipse SonarQuber : Analysis project .

I keep on getting error:

Unknown version for SonarQube server . Please check server is reachable.

And also , sonar analysis is not working from eclipse, I mean if I correct the error indicated by sonar and do sonar analysis again, it shows error at the same.

However if I do it from command prompt it is working fine. Please help me on this issue.

like image 543
user3816327 Avatar asked Oct 21 '22 05:10

user3816327


2 Answers

Though it is not a direct ans but still here is what I tried and worked for me.

  1. Check if SONAR server is reachable. Read the question at https://stackoverflow.com/questions/20211215 to configure/correct the server connectivity issue. Point to note is providing username and password and testing the connection.
  2. Navigate to your project root pom.xml in command prompt.
  3. firemvn sonar:sonar
  4. Results gets published in http://localhost:9000
like image 121
fiberair Avatar answered Oct 24 '22 14:10

fiberair


The miraculously simple answer for me was:

  1. Go to the sonar server preferences under Window->Preferences->SonarQube->Server
  2. Choose the server and click edit
  3. assuming you have entered the correct username and password (or nothing if the settings on your sonar server are allow anonymous analyzing)
  4. Press test connection

On the top of the window it should state "Successfully connected!" and when you try to analyze the project again the error is gone.

May be a bug in the eclipse plugin.

like image 20
CharonTheFarryman Avatar answered Oct 24 '22 14:10

CharonTheFarryman