I have a problem when we try to connect to our sonarqube server, when I click in “Update bindings” this starts downloading info but when it’s in the phase “Fetching list of projects” raise the error “Failed to update binding for server configuration ‘Sonar_XXX’”.
Maybe is a timeout problem, because if I go to the URL “http://sonarqube_host/api/projects/index?format=json&subprojects=true” takes a lot of time in show the info.
But I don’t know where I can change the timeout in SonarLint :S
I use:
Intellij 2018.3.2
SonarLint v4.0.2.3009
Java 8
Sonarqube 5.6.7
Can you help me?
Thanks.
Regards,
The full stacktrace of error is:
2019-01-09 16:12:59,324 [1524119] INFO - ntellij.tasks.ServerUpdateTask - Error updating from server 'Sonar_XXX'
java.lang.NullPointerException
at org.sonarsource.sonarlint.core.plugin.PluginLoader.basePluginKey(PluginLoader.java:171)
at org.sonarsource.sonarlint.core.plugin.PluginLoader.defineClassloaders(PluginLoader.java:82)
at org.sonarsource.sonarlint.core.plugin.PluginLoader.load(PluginLoader.java:69)
at org.sonarsource.sonarlint.core.plugin.PluginRepository.start(PluginRepository.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.sonarlint.shaded.org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.sonarsource.sonarlint.shaded.org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.sonarsource.sonarlint.core.container.ComponentContainer$1.start(ComponentContainer.java:279)
at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:124)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:118)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$2(ConnectedSonarLintEngineImpl.java:176)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withRwLock(ConnectedSonarLintEngineImpl.java:325)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.update(ConnectedSonarLintEngineImpl.java:169)
at org.sonarlint.intellij.tasks.ServerUpdateTask.run(ServerUpdateTask.java:97)
at org.sonarlint.intellij.tasks.ServerUpdateTask$2.run(ServerUpdateTask.java:84)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
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)
The stacktrace doesn’t relate at all with downloading project list, but about loading plugins. It seems one of the plugin declares a base plugin that is missing.
Could you please provide us the result of opening /deploy/plugins/index.txt in a browser.
I think the problem come from outdated plugins. If you run again the update all project bindings command with verbose logs of the SonarLint console enabled, you should see things like:
Code analyzer ‘{}’ version ‘{}’ is not supported (minimal version is ‘{}’). Skip downloading it.
As the java plugin you have on your server is too old, it will not be loaded. Then your custom plugin javacustom (that I guess depends on sonarjava) will produce the stacktrace.
I will create a ticket to improve the behavior (not fail), but still you will have to update your plugins (and at the same time consider updating your server).
Code analyzer 'plsql' version '3.0.1.1427' is not supported (minimal version is '3.1'). Skip downloading it.
Code analyzer 'java' version '4.14.0.11784' is not supported (minimal version is '5.1'). Skip downloading it.
Code analyzer 'cpp' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'rpg' version '2.1.0.736' is not supported (minimal version is '2.2'). Skip downloading it.
Code analyzer 'javascript' version '3.2.0.5506' is not supported (minimal version is '4.0'). Skip downloading it.
Code analyzer 'cobol' version '4.0.1.2609' is not supported (minimal version is '4.2'). Skip downloading it.
Code analyzer 'php' version '2.11.0.2485' is not supported (minimal version is '2.12'). Skip downloading it.
Also:
Load plugins
Code analyzer 'SonarBW6' is not compatible with SonarLint. Skip loading it.
Code analyzer 'isbanweb' is not compatible with SonarLint. Skip loading it.
Plugin [l10nesexcentia] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
Code analyzer 'L10n :: Spanish Pack (excentia)' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Scalastyle' is not compatible with SonarLint. Skip loading it.
Code analyzer 'CSS / SCSS / Less' is not compatible with SonarLint. Skip loading it.
Code analyzer 'PMD' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Android' is not compatible with SonarLint. Skip loading it.
Code analyzer 'SVN' is not compatible with SonarLint. Skip loading it.
Code analyzer 'isbanyaml' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Java Properties' is not compatible with SonarLint. Skip loading it.
Code analyzer 'SonarC#' is not compatible with SonarLint. Skip loading it.
Code analyzer 'LDAP' is not compatible with SonarLint. Skip loading it.
Code analyzer 'SonarXML' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Rules Compliance Index (RCI)' is not compatible with SonarLint. Skip loading it.
Code analyzer 'SonarVB' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Checkstyle' is not compatible with SonarLint. Skip loading it.
Code analyzer 'C++ (Community)' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Issues Density' is not compatible with SonarLint. Skip loading it.
Code analyzer 'FxCop' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Custom Cobol Plugin' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Findbugs' is not compatible with SonarLint. Skip loading it.
Code analyzer 'ISBAN Security' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Build Breaker' is not compatible with SonarLint. Skip loading it.
Code analyzer 'Governance' is not compatible with SonarLint. Skip loading it.
Code analyzer 'isbanjson' is not compatible with SonarLint. Skip loading it.
Load plugins (done) | time=61ms
Finally, I have downloaded SonarQube Scanner CLI and I have been able to execute the scan from command line.