Github Action error "Failed bootstrap index response"

I am trying to incorporate sonarscan into my github action pipeline but I kept running into this error
15:59:47.531 ERROR: Failed bootstrap index response: <!DOCTYPE html>
I have seen other questions and yes, I have checked my host URL.

here is the log:

INFO: Scanner configuration file: /opt/sonar-scanner/conf/
INFO: Project root configuration file: NONE
15:59:45.959 INFO: SonarScanner
15:59:45.961 INFO: Java 11.0.19 Alpine (64-bit)
15:59:45.961 INFO: Linux 5.15.0-1037-azure amd64
15:59:46.166 DEBUG: keyStore is : 
15:59:46.166 DEBUG: keyStore type is : pkcs12
15:59:46.166 DEBUG: keyStore provider is : 
15:59:46.166 DEBUG: init keystore
15:59:46.167 DEBUG: init keymanager of type SunX509
15:59:46.358 DEBUG: Create: /opt/sonar-scanner/.sonar/cache
15:59:46.359 INFO: User cache: /opt/sonar-scanner/.sonar/cache
15:59:46.360 DEBUG: Create: /opt/sonar-scanner/.sonar/cache/_tmp
15:59:46.369 DEBUG: Extract sonar-scanner-api-batch in temp...
15:59:46.376 DEBUG: Get bootstrap index...
15:59:46.377 DEBUG: Download: ***/batch/index
15:59:47.529 DEBUG: Get bootstrap completed
15:59:47.531 ERROR: Failed bootstrap index response: <!DOCTYPE html>
<!--[if IE 7]><html lang="en" class="lt-ie10 lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html lang="en" class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]><html lang="en" class="lt-ie10"><![endif]-->
<!--[if gt IE 9]><html lang="en"><![endif]-->
<!--[if !IE]><!--><html lang="en"><!--<![endif]-->

and here is the github action

    runs-on: ubuntu-latest
    - uses: actions/checkout@v3
        # Disabling shallow clone is recommended for improving relevancy of reporting
        fetch-depth: 0
    - name: SonarQube Scan
      uses: sonarsource/sonarqube-scan-action@master
        projectBaseDir: basedir/
        args: >
${{ secrets.SONAR_HOST_URL }}
          -Dsonar.login=${{ secrets.SONAR_TOKEN }} 
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

Is there any other solutions to resolve this issue other than changing the URL


Welcome to the community!

The error is telling you that when analysis reached out to the server for the bootstrap bundle, instead of the expected JSON document, it got HTML. That indicates that the wrong URL was called. If there were a problem with permissions, it would show up later in the process.

So, sorry but there is no other answer than correcting the URL (or talking to your network folks to get them to stop blocking the calls).