GitHub Action analysis fails

#step:4:9)INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties

#step:4:10)INFO: Project root configuration file: /github/workspace/sonar-project.properties

#step:4:11)INFO: SonarScanner 4.8.0.2856

#step:4:12)INFO: Java 11.0.19 Alpine (64-bit)

#step:4:13)INFO: Linux 5.15.0-1038-azure amd64

#step:4:14)INFO: User cache: /opt/sonar-scanner/.sonar/cache

#step:4:15)ERROR: SonarQube server [***] can not be reached

#step:4:16)INFO: ------------------------------------------------------------------------

#step:4:17)INFO: EXECUTION FAILURE

#step:4:18)INFO: ------------------------------------------------------------------------

#step:4:19)INFO: Total time: 0.379s

#step:4:20)INFO: Final Memory: 3M/14M

#step:4:21)INFO: ------------------------------------------------------------------------

#step:4:22)ERROR: Error during SonarScanner execution

#step:4:23)org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis

#step:4:24) at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)

#step:4:25) at java.base/java.security.AccessController.doPrivileged(Native Method)

#step:4:26) at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)

#step:4:27) at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)

#step:4:28) at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)

#step:4:29) at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)

#step:4:30) at org.sonarsource.scanner.cli.Main.execute(Main.java:74)

#step:4:31) at org.sonarsource.scanner.cli.Main.main(Main.java:62)

#step:4:32)Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server

#step:4:33) at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)

#step:4:34) at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)

#step:4:35) at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)

#step:4:36) at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)

#step:4:37) ... 7 more

#step:4:38)Caused by: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9000

#step:4:39) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:265)

#step:4:40) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:183)

#step:4:41) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)

#step:4:42) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)

#step:4:43) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)

#step:4:44) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)

#step:4:45) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)

#step:4:46) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

#step:4:47) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

#step:4:48) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)

#step:4:49) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

#step:4:50) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

#step:4:51) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)

#step:4:52) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

#step:4:53) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)

#step:4:54) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

#step:4:55) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

#step:4:56) at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)

#step:4:57) at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)

#step:4:58) at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)

#step:4:59) at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)

#step:4:60) at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)

#step:4:61) ... 10 more

#step:4:62)Caused by: java.net.ConnectException: Connection refused (Connection refused)

#step:4:63) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)

#step:4:64) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)

#step:4:65) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)

#step:4:66) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)

#step:4:67) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

#step:4:68) at java.base/java.net.Socket.connect(Socket.java:609)

#step:4:69) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:130)

#step:4:70) at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:263)

#step:4:71) ... 31 more

#step:4:72)ERROR:

#step:4:73)ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
```strong text

Hey there.

You didn’t include much information in your post: like what version of SonarQube you’re using, what environment you’re running the scanner in…

With so little information, I can only at this point suggest that you make sure you’re pointing to the right SonarQube server (sonar.host.url) and that wherever you’re running the analysis can actually connect to that URL (no firewalls, etc.)

hey there,

@Colin, how is going?
I use the latest version of sonarque(10.0.0.X). My server is installed on ubuntu version 24.04.2 and I run the scan on windows 11.

And can GitHub Actions (or the runner runing your action) communicate with you Ubuntu server? How have you made sure?

And can GitHub Actions (or the runner that runs your action) communicate with your Ubuntu server?

that’s the big problem. they don’t communicate with my server.

How do you know for sure?

I get a red cross when testing and nothing on the server as a result.

Error:

Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server

Caused by: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9000

Caused by: java.net.ConnectException: Connection refused (Connection refused)

Github

windows 11