Unable to connect sonarquber server (local setup) from eclipse

1,125 views
Skip to first unread message

sridh...@gmail.com

unread,
Apr 28, 2017, 2:46:35 AM4/28/17
to SonarLint
Hi,

Can somebody help me with respect to the following issue, when I am trying to connect sonar quber server ( local setup -windows 7 laptop) of sonarQuber server (6.3.1 version) from eclipse neon 2 (6.4).

Found 4 issue(s)
Unable to parse server infos from:
java.lang.IllegalStateException: Unable to parse server infos from:
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:110)
    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)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Expect message object but got: "<!DOCTYPE"
    at com.google.protobuf.util.JsonFormat$ParserImpl.mergeMessage(JsonFormat.java:1201)
    at com.google.protobuf.util.JsonFormat$ParserImpl.merge(JsonFormat.java:1178)
    at com.google.protobuf.util.JsonFormat$ParserImpl.merge(JsonFormat.java:1060)
    at com.google.protobuf.util.JsonFormat$Parser.merge(JsonFormat.java:273)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:107)
    ... 7 more

Eclipse Configuration:
Eclipse Java EE IDE for Web Developers.

Version: Neon.2 Release (4.6.2)
Build id: 20161208-0600

I am able to launch sonarqube server from browser :

http://localhost:9000/projects/favorite



Auto Generated Inline Image 1

Duarte Meneses

unread,
Apr 28, 2017, 2:56:09 AM4/28/17
to sridh...@gmail.com, SonarLint
Hi,

Could you check http://localhost::9000/api/system/status in your browser?
It should give a well formatted json string, such as '{"id":"abc","version":"6.3.1.21392","status":"UP"}'.



--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/da7133d8-0384-4fb8-a584-6c46b007390a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Duarte Meneses | SonarSource
Software Engineer

Are you using SonarLint in your IDE?

Sridhar

unread,
Apr 28, 2017, 3:02:27 AM4/28/17
to SonarLint, sridh...@gmail.com
Hi,

Thanks for your reply.

The response I received is:

{"id":"AVup26afiHqj1meph2s4","version":"6.3.1.21392","status":"UP"}

I am using sonarlint with version 3.0 : (org.sonarlint.eclipse.site-3.0.0.201704111237.zip) installed this in eclipse via install new software and Archive option.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

Duarte Meneses

unread,
Apr 28, 2017, 3:14:13 AM4/28/17
to Sridhar, SonarLint
That seems OK. Can you check that your server configuration is correct and try to update the binding again?
Also, please active debug in the logs so that it displays the webservices being called.


To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/ea27c635-35a8-4dfa-b2f7-f323196ffc8f%40googlegroups.com.

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

Sridhar

unread,
Apr 28, 2017, 3:22:32 AM4/28/17
to SonarLint, sridh...@gmail.com
Hi,

Thanks for your support and immediate reply.

Could you elablarate? I couldnt understand might be I am new for this setup.

That seems OK.
1) Can you check that your server configuration is correct and try to update the binding again?
Question: What is meant by binding?. I will check the same how to update the binding.
2) Also, please active debug in the logs so that it displays the webservices being called.
Question: do I need to enable the logs for this.. I think, I may need to enable the debug logs in eclipse.. is that correct?.

Duarte Meneses

unread,
Apr 28, 2017, 3:30:35 AM4/28/17
to Sridhar, SonarLint
In the "SonarQube Servers" view, right click over your configured server and you can:
  • "Edit..": please check the server URL is "http://localhost:9000".
  • "Update all server bindings". This will download again all data needed by SonarLint from the SonarQube server.

About the logs, in the SonarLint Console you can enable de verbose logs on the top right corner, in the highlighted button:





To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/b8db0ce0-1b51-407d-843b-83aff7e092b9%40googlegroups.com.

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

Sridhar

unread,
Apr 28, 2017, 3:33:39 AM4/28/17
to SonarLint, sridh...@gmail.com

Sridhar

unread,
Apr 28, 2017, 5:39:24 AM4/28/17
to SonarLint, sridh...@gmail.com
Thanks Meneses  now it is working fine once I follow your instructions.
Reply all
Reply to author
Forward
0 new messages