Unable to run sonar-scanner for sonarqube over https

I have a sonarQube running over https. In order to reach it I have been provided two file( both .pem), one is having certificate and other is having private key.

-----BEGIN CERTIFICATE-----
MIIF0zCCA7ugAwIBAgIUX1ki3XRjzEnEDZxsnZ9ENjcDFDIwDQYJKoZIhvcNAQEN
BQAwfjELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTESMBAGA1UEBxMJ
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEArnFpeCXhMqUHZ6c7dDN8zfsEzQNHpsM37hu4soqRwhGFIpr+
U4ZGgXol0UtRtfXte9sEEJAUhfuWqpCIBx6Ps2NFc4DA47axzEvLEu8nWHxQzTJE
-----END RSA PRIVATE KEY-----

I have created a .p12 file using above .pem files using

openssl pkcs12 -in mycertkey.p12 -out mycerts.crt -nokeys -clcerts

Then I created a .cer file using the above .p12 file

openssl x509 -inform pem -in mycerts.crt -outform der -out mycerts.cer

Once I received this .cer file I added it to the keystore of sonar-cli docker image’s java

keytool -keystore /opt/java/openjdk/lib/security/cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias mycert2 -file mycerts.cer

It got added succesfully.

Then I ran sonar-scanner command over my ant project

sonar-scanner -DskipTests -Dsonar.projectKey=ant_test -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_KEY

Upon doing this I am getting below output.

INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Linux 4.18.0-305.el8.x86_64 amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.054s
INFO: Final Memory: 4M/13M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
        at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!DOCTYPE html>
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:44)
        at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
        at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
        ... 7 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Can someone help me with it? I am not sure what wrong I am doing here.