2

I'm trying to connect my Eclipse IDE to my company's sonar server instance, but I can't figure out why it doesn't work.

When I access the server (https://mycompany.com/sonar, for example purposes) through the browser, it works perfectly. In Eclipse, I added the url to the servers section of SonarQube and the same credentials I used in the browser. When I hit Test Connection, I get the error message:

Unable to connect: Query: https://mycompany.com/sonar//api/authentication/validate

I'm using the native option in Eclipse's network settings, since I'm not behind any proxy. The company SonarQube server version is 4.5.5.

Am I doing something wrong? Does anyone know how to fix this?

Edit: the certificate is also added to JRE

renke
  • 1,180
  • 2
  • 12
  • 27

2 Answers2

1

I suspect the /api/aut is due to some UI truncation, just expand the 'Add SonarQube Server' window to verify that.

You are trying to connect to an HTTPS URL, is the server certificate trusted by Java ? Use keytool to do that, as explained in this post.

Community
  • 1
  • 1
Nicolas B.
  • 7,245
  • 17
  • 29
  • Yeah, you're right, the text was being truncated. But still, I have the certificate installed and cannot connect. – renke Dec 17 '15 at 14:08
  • Add `sonar.web.javaOpts=-Djavax.net.debug=all` to your `sonar.properties`, restart your server, click on 'Test Connection' in Eclipse, inspect the SSL handshake in the server logs. – Nicolas B. Dec 17 '15 at 15:55
0

Check the sonar link you have configured in eclipse - https://mycompany.com/sonar**//**api/authentication/validate

You need to give the url https://mycompany.com/sonar and not https://mycompany.com/sonar/

KeyMaker00
  • 6,194
  • 2
  • 50
  • 49
Abhishek
  • 91
  • 1
  • 5