Error Scanning Java 8 Gradle Project with SonarQube 9.3 in Gitlab

During a scan, I get the following error:

ERROR: Preparation failed: failed to pull image “gradle:jre11-slim” with specified policies [if-not-present]: Get net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

It eventually fails after 3 tries.

The settings in the .gitlab-ci.yml file are

stage: test
image: gradle:jre11-slim

However, the project being scanned is Java 8. Do I need to configure it differently in this case or configure the runners differently?




Regardless of what you build with, you’ll need to analyze with Java 11.

But your error seems unrelated:

You need to diagnose why the connection is timing out, & that’s going to be outside the analysis scope, I think.


Understood. My system is not allowed to have Internet connectivity even with a proxy. Is there are way to do it on prem?



Hi Scott,

I think this has become a GitLab question, rather than a SonarQube question. We certainly provide scanners you can simply install and run, such as the SonarScanner CLI without needing to pull Docker images. So then the question is whether you can use them with GitLab & unfortunately I just don’t have the background to answer that.


Got it. Thanks Ann.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.