【发布时间】:2021-02-19 08:07:05
【问题描述】:
我们正在尝试让 SonarQube 在 Docker 映像上分析我们的 Typescript (Node.JS) 项目,但我们遇到了错误。如果有帮助,我们正在尝试使用 Node.JS 中的 sonarqube-scanner 模块。
遇到的错误如下:
[17:57:23] Starting analysis...
[17:57:24] Getting info from "package.json" file
[17:57:24] Checking if executable exists: /root/.sonar/native-sonar-scanner/sonar-scanner-4.5.0.2216-linux/bin/sonar-scanner
[17:57:24] Could not find executable in "/root/.sonar/native-sonar-scanner".
[17:57:24] Proceed with download of the platform binaries for SonarScanner...
[17:57:24] Creating /root/.sonar/native-sonar-scanner
[17:57:24] Downloading from https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip
[17:57:24] (executable will be saved in cache folder: /root/.sonar/native-sonar-scanner)
[91m[18:03:53] [0m[91mERROR: impossible to download and extract binary: connect ETIMEDOUT 91.134.125.245:443
[0m[91m[18:03:53] [0m[91m SonarScanner binaries probably don't exist for your OS (linux).
[0m[91m[18:03:53] In such situation, the best solution is to install the standard SonarScanner (requires a JVM).
[0m[91m[18:03:53] Check it out at https://redirect.sonarsource.com/doc/install-configure-scanner.html
现在,如果您从错误中注意到,二进制服务器会遇到 ETIMEDOUT 错误,这是因为访问它的服务器来自无法访问外部站点的内部网络。
是否可以将 SonarQube 配置为从内部服务器提取?如果是这样,我们将如何进行配置?
非常感谢!
【问题讨论】:
-
我仍然可以访问链接:binaries.sonarsource.com/Distribution/sonar-scanner-cli/…(它的 IP 地址为 91.134.125.245)。看起来像您的声纳在代理或防火墙后面
-
是的,它位于代理/防火墙后面。有没有办法配置二进制源url?
标签: configuration sonarqube binaryfiles