Update binding - Failed to load rules in IntelliJ SonarLint

IntelliJ IDEA: 2018.3.4 (Ultimate Edition)
SonarLint: 4.0.2.3009
SonarQube: 6.7.3 (build 38370)

Going to IDEA’s Settings -> Other Settings -> SonarLint General Settings -> Update binding proceeds to download the rules, but eventually ends up with “Failed to load rules” error.

I have turned on verbose logs in SonarLint’s console, but there doesn’t seem to be any error present:

Create : C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins
Plugin cache: C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins
Create : C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins\_tmp
GET 200 http://sonar.******.com/api/system/status | time=258ms
GET 200 http://sonar.******.com/api/plugins/installed | time=241ms
GET 200 http://sonar.******.com/api/settings/values.protobuf | time=256ms
Code analyzer 'checkstyle' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'findbugs' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'scmgit' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'gitlab' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'csharp' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'typescript' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'xml' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'jdepend' is not compatible with SonarLint. Skip downloading it.
GET 200 http://sonar.******.com/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=INFO&p=1&ps=500 | time=521ms
GET 200 http://sonar.******.com/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MINOR&p=1&ps=500 | time=556ms
GET 200 http://sonar.******.com/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MINOR&p=2&ps=500 | time=373ms
GET 200 http://sonar.******.com/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MAJOR&p=1&ps=500 | time=552ms
Create : C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins
Plugin cache: C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins
Create : C:\Dev\Programs\IDEA\settings\config\sonarlint\plugins\_tmp
Load plugins
Load plugins (done) | time=2ms
Plugins:
* SonarPython 1.10.0.2131 (python)
* SonarJava 5.8.0.15699 (java)
* SonarJS 5.0.0.6962 (javascript)
Using storage for server '******' (last update 24.1.19 13:29)
1 Like

I am also seeing issues with the Intellij Plugin. I am on OSX, running Intellij Ultimate 2018.3.5 (also tried on 2018.3.4), Server Version 6.7.5 (build 38563).

I also tried replacing the jars downloaded as part of the plugin with newer versions (including building the sonarlint-intellij jar) with no luck.

The rules seem to download, then the below exception shows up in the “IDE Fatal Errors” dialog (the little exclamation mark in the lower right of the IDE).

java.lang.NoClassDefFoundError: org/sonar/api/batch/AbstractCpdMapping
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	at com.villagechief.sonar.salesforce.SalesForcePlugin.getExtensions(SalesForcePlugin.java:110)
	at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51)
	at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:62)
	at org.sonarsource.sonarlint.core.container.global.GlobalExtensionContainer.doBeforeStart(GlobalExtensionContainer.java:35)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainer.doAfterStart(StorageContainer.java:126)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
	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)
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.AbstractCpdMapping
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 39 more
2 Likes

I am facing the same issue with:
IntelliJ:2018.3.3
SonarLint: 4.0.2.3009
SonarServer: 6.7.6
java.lang.NoClassDefFoundError: org/sonar/api/batch/AbstractCpdMapping
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
at com.villagechief.sonar.salesforce.SalesForcePlugin.getExtensions(SalesForcePlugin.java:110)
at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51)
at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:62)
at org.sonarsource.sonarlint.core.container.global.GlobalExtensionContainer.doBeforeStart(GlobalExtensionContainer.java:35)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonarsource.sonarlint.core.container.storage.StorageContainer.doAfterStart(StorageContainer.java:126)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:118)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.(ConnectedSonarLintEngineImpl.java:77)
at org.sonarlint.intellij.core.SonarLintEngineFactory.createEngine(SonarLintEngineFactory.java:65)
at org.sonarlint.intellij.core.SonarLintEngineManager.getConnectedEngine(SonarLintEngineManager.java:110)
at org.sonarlint.intellij.config.global.SonarQubeServerMgmtPanel.switchTo(SonarQubeServerMgmtPanel.java:283)
at org.sonarlint.intellij.config.global.SonarQubeServerMgmtPanel.onServerSelect(SonarQubeServerMgmtPanel.java:272)
at org.sonarlint.intellij.config.global.SonarQubeServerMgmtPanel.lambda$create$0(SonarQubeServerMgmtPanel.java:121)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1796)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1810)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at javax.swing.JList.setSelectedIndex(JList.java:2210)
at javax.swing.JList.setSelectedValue(JList.java:2360)
at org.sonarlint.intellij.config.global.SonarQubeServerMgmtPanel.load(SonarQubeServerMgmtPanel.java:262)
at org.sonarlint.intellij.config.global.SonarLintGlobalConfigurable.reset(SonarLintGlobalConfigurable.java:122)
at com.intellij.openapi.options.ex.ConfigurableWrapper.reset(ConfigurableWrapper.java:178)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.reset(ConfigurableCardPanel.java:124)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.lambda$createConfigurableComponent$0(ConfigurableCardPanel.java:82)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:973)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.createConfigurableComponent(ConfigurableCardPanel.java:69)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.create(ConfigurableCardPanel.java:55)
at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:57)
at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:54)
at com.intellij.ui.CardLayoutPanel.createValue(CardLayoutPanel.java:88)
at com.intellij.ui.CardLayoutPanel.select(CardLayoutPanel.java:116)
at com.intellij.ui.CardLayoutPanel.lambda$null$0(CardLayoutPanel.java:132)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1681)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1630)
at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:70)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:70)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:84)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:54)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:41)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:258)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:275)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:618)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$2(IdeKeyEventDispatcher.java:667)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:666)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:519)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:474)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:643)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.AbstractCpdMapping
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
… 103 more

Is there any solution to this error or a workaround?

Hi,
The problem is that the SonarQube server to which you are trying to connect has a plugin, SalesForcePlugin, that declares itself as being compatible with SonarLint even thought it is not.
I suggest you contact the authors of the plugin to fix the problem or uninstall the plugin.

Unfortunately, Jacek’s issue has nothing to do with the original one - we don’t use SalesForce plugin.

Hi Petr,

I don’t see any errors in the logs that you posted.
Do you have error logs and a stack trace?

The log I posted is the only output from the plugin that I get - it’s from the “Log” tab in SonarLint bottom bar in IDEA after turning on Verbose Output. Does SonarLint create an error log file somewhere on the disk that I am not aware of? All that google comes up with is the verbose output in the log tab.

I managed to find something in the idea’s log itself, actually:

2019-05-16 15:40:09,102 [29181833]   INFO - ntellij.tasks.ServerUpdateTask - Error updating from server 'Sonar'
java.lang.IllegalStateException: Failed to load rules
        at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.loadFromStream(RulesDownloader.java:117)
        at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.fetchRulesAndActiveRules(RulesDownloader.java:86)
        at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.fetchRulesTo(RulesDownloader.java:68)
        at org.sonarsource.sonarlint.core.container.connected.update.perform.GlobalStorageUpdateExecutor.update(GlobalStorageUpdateExecutor.java:91)
        at org.sonarsource.sonarlint.core.container.connected.ConnectedContainer.update(ConnectedContainer.java:115)
        at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$null$1(ConnectedSonarLintEngineImpl.java:174)
        at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.runInConnectedContainer(ConnectedSonarLintEngineImpl.java:311)
        at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$2(ConnectedSonarLintEngineImpl.java:174)
        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:731)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
        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:311)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Connection reset
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$Rule.<init>(Rules.java:6070)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$Rule.<init>(Rules.java:5705)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$Rule$1.parsePartialFrom(Rules.java:13650)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$Rule$1.parsePartialFrom(Rules.java:13644)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2424)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$SearchResponse.<init>(Rules.java:1799)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$SearchResponse.<init>(Rules.java:1737)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$SearchResponse$1.parsePartialFrom(Rules.java:3099)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$SearchResponse$1.parsePartialFrom(Rules.java:3093)
        at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:221)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:239)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:244)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
        at org.sonarsource.sonarlint.shaded.org.sonarqube.ws.Rules$SearchResponse.parseFrom(Rules.java:2111)
        at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.loadFromStream(RulesDownloader.java:115)
        ... 24 more

Thanks. Looks like a network issue. Are there any errors on the server side?

I tailed every log in the $SONARQUBE_HOME/logs folder while trying to update the definitions to be sure, but only access log had new lines pop up, and these all look successful:

0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:09 -0400] "GET /api/system/status HTTP/1.1" 200 67 "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:09 -0400] "GET /api/plugins/installed HTTP/1.1" 200 - "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:09 -0400] "GET /api/settings/values.protobuf HTTP/1.1" 200 5979 "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:10 -0400] "GET /api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=INFO&p=1&ps=500 HTTP/1.1" 200 - "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:11 -0400] "GET /api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MINOR&p=1&ps=500 HTTP/1.1" 200 - "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:12 -0400] "GET /api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MINOR&p=2&ps=500 HTTP/1.1" 200 - "-" "SonarLint IntelliJ 4.0.2.3009" "*******"
0:0:0:0:0:0:0:1 - - [16/May/2019:10:03:13 -0400] "GET /api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MAJOR&p=1&ps=500 HTTP/1.1" 200 - "-" "SonarLint IntelliJ 4.0.2.3009" "*******"

Looks like it failed to fetch either page 2 of the rules with severity “major” or page 1 of rules with severity “critical”.
Do you get the error every time you try to update? Does it block for a long time before the error, possibly indicating a timeout?

Also, could you please try to open with your browser, see if you get any problems?

* [sonarqube]/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=MAJOR&p=2&ps=500
* [sonarqube]/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&organization=default-organization&severities=CRITICAL&p=1&ps=500

Both page 2 of MAJOR and page 1 of CRITICAL work. However, I have tried to open page 1 of MAJOR and while it does return HTTP status 200 (which is why it looks fine in both access log and in SonarLint’s log in IDEA), the actual download of the protobuf file through Chrome always fails with network issue.

I will try to gradually lower the page size to pinpoint which exact rule causes this.

Looks like this is actually caused by firewall intrusion detection system being triggered by the code examples. Sorry for bothering you with this :slight_smile: