Unhandled exception: unable to connect to the SQ server, as VPN was not connected at startup

Environment:

  • Java version=11.0.9.1
  • Java vendor=JetBrains s.r.o.
  • OS name=Linux
  • OS architecture=amd64
  • IDE=IntelliJ IDEA 2020.3.1
  • SonarLint version=4.13.0.24781

Unable to connect to the SQ server, as VPN was not connected at startup.

java.lang.IllegalStateException: Fail to request http://sonarqube.gcp.build.matillion.com:9000/sonar/api/developers/search_events?projects=&from=
	at org.sonarsource.sonarlint.core.util.ws.HttpConnector.doCall(HttpConnector.java:196)
	at org.sonarsource.sonarlint.core.util.ws.HttpConnector.get(HttpConnector.java:122)
	at org.sonarsource.sonarlint.core.util.ws.HttpConnector.call(HttpConnector.java:109)
	at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:120)
	at org.sonarsource.sonarlint.core.notifications.NotificationChecker.isSupported(NotificationChecker.java:76)
	at org.sonarsource.sonarlint.core.notifications.ServerNotifications.isSupported(ServerNotifications.java:81)
	at org.sonarlint.intellij.core.ProjectServerNotifications.register(ProjectServerNotifications.java:105)
	at org.sonarlint.intellij.core.ProjectServerNotifications.init(ProjectServerNotifications.java:74)
	at org.sonarlint.intellij.BootstrapStartupActivity.runActivity(BootstrapStartupActivity.java:38)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runActivity(StartupManagerImpl.java:301)
	at com.intellij.ide.startup.impl.StartupManagerImpl.lambda$runPostStartupActivities$3(StartupManagerImpl.java:237)
	at com.intellij.openapi.project.DumbServiceImpl.doRun(DumbServiceImpl.java:399)
	at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:391)
	at com.intellij.openapi.project.TrackedEdtActivityService$TrackedEdtActivity.run(TrackedEdtActivityService.java:100)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)

To be clear, you configured SonarLint to use connected mode, but you didn’t have your VPN started so it’s unable to connect? To me this seems like a straightforward error; you probably need to shut down the IDE, start your VPN, and try again. Am I missing something?

Hi Jeff. The only problem with it is that IntelliJ asks me to submit an error report every time I’m doing work offline; nothing that stops me from working, but it is slightly bad UI and a minor irritation. Thought I would press the report button for once, since I get the prompt so often.