SonarQube server error Failed to connect to localhost/[0:0:0:0:0:0:0:1]:9000

I am running SonarQube on Docker in my windows 11
trying to integrate it with github action but it gives server error

INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties

INFO: Project root configuration file: /github/workspace/sonar-project.properties

INFO: SonarScanner 5.0.1.3006

INFO: Java 17.0.11 Alpine (64-bit)

INFO: Linux 6.5.0-1023-azure amd64

INFO: User cache: /opt/sonar-scanner/.sonar/cache

ERROR: SonarQube server [***] can not be reached

INFO: EXECUTION FAILURE

INFO: Total time: 0.384s

ERROR: Error during SonarScanner execution

INFO: Final Memory: 4M/20M

org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis

Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
Caused by: java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:9000
Caused by: java.net.ConnectException: Connection refused

sonar.projectKey=Slash-Test

sonar.projectName=Slash-Test

sonar.projectVersion=1.0

sonar.sources=src

sonar.tests=test

sonar.test.inclusions=src/**/*.spec.ts

sonar.language=ts

sonar.typescript.lcov.reportPaths=coverage/lcov.info

sonar.host.url=http://localhost:9000

sonar.login= ************************

Is your GitHub action running on the same machine where you’re hosting your SonarQube instance? That’s the only way the action would be able to communicate with http://localhost:9000 (localhost being your Windows 11 machine).

More likely, your GitHub action runner is somewhere else, and needs access to a SonarQube instance exposed to the internet, or at least your internal network (if the GitHub Actions runner is self-hosted).