Problems connecting to a SonarQube server from SonarLint in Eclipse neon

2,736 views
Skip to first unread message

jkpa...@gmail.com

unread,
Feb 1, 2017, 5:30:57 AM2/1/17
to SonarLint
Hi,

I am having problems when defining a connection to a SonarQube Server from Eclipse Neon. The version of SonarQube is 6.2 and SonarLint is 2.5.1

I am receiving this message:


And console is showing this;
java.lang.IllegalStateException: Error 404 on http://10.0.2.15:9000/api/system/status
at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.handleError(SonarLintWsClient.java:121)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.tryFromDeprecatedApi(ServerVersionAndStatusChecker.java:121)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:99)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:60)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:50)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:48)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:43)
at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:318)
at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Does anybody know how to fix it?

Thanks!

janos....@sonarsource.com

unread,
Feb 1, 2017, 10:56:45 AM2/1/17
to SonarLint, jkpa...@gmail.com
Hi,

Are you able to see http://10.0.2.15:9000/api/system/status if you visit in a browser?

Do you know if there is a proxy between your machine and SonarQube?

Janos

jkpa...@gmail.com

unread,
Feb 2, 2017, 3:24:04 AM2/2/17
to SonarLint, jkpa...@gmail.com
Hi.

I am not able to see it in a browser. Sonarqube is installed in a VirtualBox machine inside my laptop with a private network between VM and host (Eclipse is running in the host). I can visit the whole site for SonarQube within the VM. Direct communication with no proxy is being used.

Thanks!
Juan Carlos

Janos Gyerik

unread,
Feb 2, 2017, 4:16:01 AM2/2/17
to jkpa...@gmail.com, SonarLint
Hi,

If you can access SonarQube within the VM but not from your host, then your issue is with the network setup of your VM, and outside our scope. That is, you need to configure your VirtualBox VM to make its network accessible from your host. See for example this site which explains how: http://aruljohn.com/info/virtualbox-access-guest-from-host-nat/

Cheers,
Janos

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/QLJv1gj43_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/d55a90da-a435-4a38-a69b-881eda17b678%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Janos GYERIK | SonarSource

jkpa...@gmail.com

unread,
Feb 2, 2017, 5:55:49 AM2/2/17
to SonarLint, jkpa...@gmail.com
Hi Janos,

Thanks for your suggestion, but I actually can access VM from my host as interfaces are set for private network between both. The problem is just as described.
- I can access Sonarqube web on VM 10.0.2.15 from the host
- I can access through http(9000) to the web inteerface for SonarQube
- I cannot access Sonarqube from Eclipse running in host.

Do java console messages make any sense on identifying the problem? Hasn't occur before to anyone this problem?

Cheers!


El jueves, 2 de febrero de 2017, 10:16:01 (UTC+1), Janos Gyerik escribió:
Hi,

If you can access SonarQube within the VM but not from your host, then your issue is with the network setup of your VM, and outside our scope. That is, you need to configure your VirtualBox VM to make its network accessible from your host. See for example this site which explains how: http://aruljohn.com/info/virtualbox-access-guest-from-host-nat/

Cheers,
Janos
On Thu, Feb 2, 2017 at 9:24 AM, <jkpa...@gmail.com> wrote:
Hi.

I am not able to see it in a browser. Sonarqube is installed in a VirtualBox machine inside my laptop with a private network between VM and host (Eclipse is running in the host). I can visit the whole site for SonarQube within the VM. Direct communication with no proxy is being used.

Thanks!
Juan Carlos


El miércoles, 1 de febrero de 2017, 16:56:45 (UTC+1), janos....@sonarsource.com escribió:
Hi,

Are you able to see http://10.0.2.15:9000/api/system/status if you visit in a browser?

Do you know if there is a proxy between your machine and SonarQube?

Janos

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/QLJv1gj43_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+...@googlegroups.com.

janos....@sonarsource.com

unread,
Feb 2, 2017, 7:00:54 AM2/2/17
to SonarLint, jkpa...@gmail.com
When you access SonarQube web from your host, what is the exact URL you're using?

jkpa...@gmail.com

unread,
Feb 2, 2017, 8:43:17 AM2/2/17
to SonarLint, jkpa...@gmail.com
URL used which works from browser -> http://10.0.2.15:9000/sonar/about

... and after this, I can log in and go through SonarQube 

Non working URLs (even from browser) ->  http://10.0.2.15:9000/api/system/status
                                                               http://10.0.2.15:9000/account/security  - (this one is supposed to obtain an authentication token)

jkpa...@gmail.com

unread,
Feb 2, 2017, 8:46:38 AM2/2/17
to SonarLint, jkpa...@gmail.com
I just discovered that I can access this URL. Maybe the correct one in this SonarQube release for Eclipse?? 
http://10.0.2.15:9000/sonar/web_api/system/status

Janos Gyerik

unread,
Feb 2, 2017, 8:53:09 AM2/2/17
to Juan Carlos, SonarLint
Hi,

Ok, so the base URL of your SonarQube server is not the default http://10.0.2.15:9000 but http://10.0.2.15:9000/sonar. Try with that from Eclipse.

Janos


--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/QLJv1gj43_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/ff6c7a24-087d-412b-96ab-b7939fb5c994%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

jkpa...@gmail.com

unread,
Feb 3, 2017, 1:50:07 AM2/3/17
to SonarLint, jkpa...@gmail.com
Bingo!!
That was the issue. Now it is working.

THANKS!!!


El jueves, 2 de febrero de 2017, 14:53:09 (UTC+1), Janos Gyerik escribió:
Hi,

Ok, so the base URL of your SonarQube server is not the default http://10.0.2.15:9000 but http://10.0.2.15:9000/sonar. Try with that from Eclipse.

Janos

On Thu, Feb 2, 2017 at 2:46 PM, <jkpa...@gmail.com> wrote:
I just discovered that I can access this URL. Maybe the correct one in this SonarQube release for Eclipse?? 
http://10.0.2.15:9000/sonar/web_api/system/status

El jueves, 2 de febrero de 2017, 14:43:17 (UTC+1), jkpa...@gmail.com escribió:
URL used which works from browser -> http://10.0.2.15:9000/sonar/about

... and after this, I can log in and go through SonarQube 

Non working URLs (even from browser) ->  http://10.0.2.15:9000/api/system/status
                                                               http://10.0.2.15:9000/account/security  - (this one is supposed to obtain an authentication token)


El jueves, 2 de febrero de 2017, 13:00:54 (UTC+1), janos....@sonarsource.com escribió:
When you access SonarQube web from your host, what is the exact URL you're using?

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/QLJv1gj43_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages