Error running task 'Synchronizing projects...' with eclipse sonarlint plugin

Please provide

  • Operating system:Linux
  • SonarLint plugin version: SonarLint for Eclipse 8.1.0.80220
  • Programming language you’re coding in: Java
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version):
      SQ 9.9.2.77730

And a thorough description of the problem / question:

[SYNC] Synchronizing issues for project 'com.company.product.subproduct:mje' on branch 'master'
SonarLint processing file /module/src/main/java/com/company/product/helpers/Helpers.java...
Found 3 issue(s)
SonarLint processing file /module/src/main/java/com/company/product/helpers/Helpers.java...
Found 3 issue(s)
Error running task 'Synchronizing projects...'
org.sonarsource.sonarlint.core.serverapi.exception.ServerErrorException: Error 504 on https://ourdomain/sonar/api/issues/pull?projectKey=com.company.product.subproduct%3Amje&branchName=master&languages=abap,apex,css,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,ts,jsp,xml
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:154)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.get(ServerApiHelper.java:74)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.lambda$pullIssues$6(IssueApi.java:175)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(ServerApiHelper.java:248)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.pullIssues(IssueApi.java:174)
	at org.sonarsource.sonarlint.core.serverconnection.IssueDownloader.downloadFromPull(IssueDownloader.java:92)
	at org.sonarsource.sonarlint.core.serverconnection.ServerIssueUpdater.sync(ServerIssueUpdater.java:64)
	at org.sonarsource.sonarlint.core.serverconnection.ServerConnection.syncServerIssuesForProject(ServerConnection.java:233)
	at org.sonarsource.sonarlint.core.sync.SynchronizationServiceImpl.lambda$autoSyncBoundConfigurationScope$5(SynchronizationServiceImpl.java:160)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.sync.SynchronizationServiceImpl.autoSyncBoundConfigurationScope(SynchronizationServiceImpl.java:159)
	at org.sonarsource.sonarlint.core.sync.SynchronizationServiceImpl.lambda$autoSync$4(SynchronizationServiceImpl.java:145)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.sync.SynchronizationServiceImpl.autoSync(SynchronizationServiceImpl.java:139)
	at org.sonarsource.sonarlint.core.sync.SynchronizationServiceImpl.lambda$autoSync$3(SynchronizationServiceImpl.java:125)
	at org.sonarsource.sonarlint.core.progress.TaskManager.lambda$startTask$0(TaskManager.java:46)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at org.sonarlint.eclipse.ui.internal.job.BackendProgressJobScheduler$BackendProgressJob.run(BackendProgressJobScheduler.java:114)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

This is intermittent.
Any ideas? Do we need to configure something on our SQ server?

FYI: we tried this in IntelliJ as well and we see the same issues. So it seems to be related to SQ.

br,

//mikael

Hi @eraonel

The HTTP 504 error means: Gateway Timeout

I don’t think SonarQube is throwing this error (you can check in the access.log of SonarQube). Do you have a proxy between SonarLint and your SonarQube server? Maybe this proxy is too slow to process the request?

api/issues/pull could be a heavy request, if your project contains a lot of issues. Also, the response is a binary format (protobuf), so maybe your proxy is trying to do some malware scanning that is timing out?

@Julien_HENRY we got this message with and without proxy.

Hi @eraonel

There should be something sitting between your SonarLint and SonarQube that is returning this 504 error code. Again, as far as I know, SonarQube is not returning this code.

You can use tools like wireshark to investigate, but I would suggest asking your infra/network team first.

1 Like