【问题标题】:Error while running docker sonarscanner begin command运行 docker sonarscanner begin 命令时出错
【发布时间】:2021-07-02 18:29:10
【问题描述】:

我为 sonarqube 提取了最新的 docker 镜像,并且镜像运行良好。 sonarqube 服务器正在监听 localhost:9000。当我运行dotnet sonarscanner begin 分析asp.net Core 3.1 项目时,一段时间后,我得到超时错误。以下是命令中的日志

Using the .NET Core version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
18:47:29.653  Updating build integration targets...
18:49:09.803  Failed to request and parse 'http://localhost:9000/api/server/version': The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.811  The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.814  Pre-processing failed. Exit code: 1

API 请求可以通过 Postman 正常工作。什么可能导致失败?

【问题讨论】:

  • 你是否也会从容器中运行这个 dotnet sonarscanner?
  • @raspy:不,我从 Windows 控制台运行它

标签: windows docker sonarqube asp.net-core-3.1 sonarscanner


【解决方案1】:

在我尝试将端口 9000 更改为 8000 并重试后,它成功了!

ports:
  - "8000:9000"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-02
    • 1970-01-01
    • 1970-01-01
    • 2021-05-14
    • 2020-12-23
    • 1970-01-01
    • 2018-12-11
    • 2014-08-01
    相关资源
    最近更新 更多