No connection could be made because the target machine refused it

I am using SonarQube Developer v9.3.0.51899. I want to perform a scan on a C++ GitHub project for the first time. I have been able to trigger a GitHub job in the appropriate repository using the yml file and setup provided in the SonarQube documentation. So far the job always fails with the same error message (see below). How can I resolve this?

Build and Analyze

Run ..sonar\scanner\dotnet-sonarscanner begin /k:“example” /d:sonar.login=“" /d:sonar.host.url="

1616:19:57.424 Failed to request and parse ‘***/api/server/version’: No connection could be made because the target machine actively refused it. (localhost:9000)

How is your GitHub Actions YAML file configured?

You should also be aware that unless your SonarQube instance is hosted on the same machine as your GitHub Actions Runner (and that’s only possible if your runner is self-hosted), you are going to have to ensure that communication is possible between GitHub and your SonarQube server.