Must-share information :
- which versions are you using : SonarQube 10.5.1, sonar-scanner 4.2.1
- what are you trying to achieve : download and run scanner behind proxy
- what have you tried so far to achieve this :
sonar-scanner -Dsonar.branch.name=xxx -Dsonar.host.url=https://xxx
[INFO] Bootstrapper: Retrieving info from "package.json" file
[DEBUG] Bootstrapper: Setting the log level to DEBUG due to verbose mode
...
[INFO] Bootstrapper: Platform: linux x64
[DEBUG] Bootstrapper: **Detecting proxy: https://xxx:yyyy/**
[INFO] Bootstrapper: **Server URL: https://xxx**
[INFO] Bootstrapper: Version: 4.2.1
[DEBUG] Bootstrapper: Check if Server supports JRE provisioning
[DEBUG] Bootstrapper: Detecting SonarQube server version
[DEBUG] Bootstrapper: Fetching API V2 /analysis/version
[DEBUG] Bootstrapper: Unable to fetch API V2 /analysis/version: Error: write EPROTO C067916206710000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
. Falling back on /api/server/version
[DEBUG] Bootstrapper: Not using axios instance for https://xxx/api/server/version
[ERROR] Bootstrapper: Failed to fetch server version: Error: write EPROTO C067916206710000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
[ERROR] Bootstrapper: Verify that https://xxx is a valid SonarQube server
[ERROR] Bootstrapper: An error occurred: Error: write EPROTO C067916206710000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
It looks like proxy detection is guessing proxy protocol based on the SonarQube endpoint protocol.
(proxy.ts - line 32)
This assumption does not match my situation, since I have :
- SonarQube endpoint exposed through HTTPS
- Forward proxy exposed through HTTP on a custom port.
Is there any way to run sonar-scanner-npm behind http proxy (not https) while having SonarQube platform exposed through https ?
Thanks for your help