Failed to load rules -InvalidProtocolBufferException: Connection reset

sonarlint

(Joe Kassels) #1

STS : 3.9.5
Sonarlint : 3.6.0.201806071228
SonarQube : Version 6.7 (build 33306)

When trying to execute the “Update all project bindings” at some point the “Failed to load rules” is coming up. The connection to the SonarQube server seems ok on the surface.

The below stacktrace is showing in the logs.

Any suggestions appreciated.

!ENTRY org.sonarlint.eclipse.core 4 0 2018-09-11 14:45:11.750
!MESSAGE Unable to update data from server 'XXXXXXXXXXXXXX'
!STACK 0
java.lang.IllegalStateException: Failed to load rules
	at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.loadFromStream(RulesDownloader.java:105)
	at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.fetchRulesAndActiveRules(RulesDownloader.java:76)
	at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.fetchRulesTo(RulesDownloader.java:59)
	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:109)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$null$1(ConnectedSonarLintEngineImpl.java:174)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.runInConnectedContainer(ConnectedSonarLintEngineImpl.java:306)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$2(ConnectedSonarLintEngineImpl.java:174)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withRwLock(ConnectedSonarLintEngineImpl.java:320)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.update(ConnectedSonarLintEngineImpl.java:169)
	at org.sonarlint.eclipse.core.internal.server.Server.updateStorage(Server.java:291)
	at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:51)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Connection reset
	at org.sonarqube.ws.Rules$Rule.<init>(Rules.java:6070)
	at org.sonarqube.ws.Rules$Rule.<init>(Rules.java:5705)
	at org.sonarqube.ws.Rules$Rule$1.parsePartialFrom(Rules.java:13650)
	at org.sonarqube.ws.Rules$Rule$1.parsePartialFrom(Rules.java:13644)
	at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2399)
	at org.sonarqube.ws.Rules$SearchResponse.<init>(Rules.java:1799)
	at org.sonarqube.ws.Rules$SearchResponse.<init>(Rules.java:1737)
	at org.sonarqube.ws.Rules$SearchResponse$1.parsePartialFrom(Rules.java:3099)
	at 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.sonarqube.ws.Rules$SearchResponse.parseFrom(Rules.java:2111)
	at org.sonarsource.sonarlint.core.container.connected.update.RulesDownloader.loadFromStream(RulesDownloader.java:103)
	... 12 more

(Julien Henry) #2

Hi,

Connection Reset usually indicate a network issue. Do you have any proxy between you and the SonarQube server?


(Joe Kassels) #3

Thanks for you response. Yes there is a proxy

We further narrowed down the issue, it only happens for devs running STS on a mac. We have devs with IntelliJ on mac, and STS on windows who have no problems at all. This makes me think it is not a networking issue.


(Julien Henry) #4

Are both STS on mac and IntelliJ on mac people using the same JVM? Can you use a network monitoring tool (like wireshark) to see more precisely what is going on?