Unable to connect to SonarServer with IntelliJ

Hi together,

currently I am not able to connect to the sonarqube server from my IntelliJ. When trying to add a new connection, I always get the ErrorMessage:

Failed to connect to server. Please check the configuration.

I tried with token and password as well as with or without proxy. But I am able to call the api at http://servername:9000/api/system/status and get a correct result.

Ddo I have to set additional Permissions on the Sonarqube Server?

Versions I use:

  • Sonarqube 7.1.0.11001 in a docker container
  • IntelliJ IntelliJ IDEA 2018.2.5 (Ultimate Edition) Build #IU-182.4892.20
  • SonarLint Plugin for IntelliJe in Version: 3.5.1.2759

Here is the Stacktrace from the IntelliJ Logs:

2018-10-18 09:24:11,426 [ 521948]   INFO - ellij.tasks.ConnectionTestTask - Connection test failed 
java.lang.IllegalStateException
	at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.handleError(SonarLintWsClient.java:130)
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:102)
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:61)
	at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:51)
	at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:61)
	at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:54)
	at org.sonarlint.intellij.tasks.ConnectionTestTask.run(ConnectionTestTask.java:53)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736)
	at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:574)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Any Idea?

Thanks

Is it a whole stacktrace?

Hi, I figured out, this was a problem with our internal Proxy. It is working fine now.
I think the post can be deleted.

1 Like

Thanks for the follow up!