【问题标题】:sonarqube 5.x differential views KO (JSON parsing exception)sonarqube 5.x 差异视图 KO(JSON 解析异常)
【发布时间】:2016-04-08 08:36:09
【问题描述】:

在 SONARQUBE 控制台中,当我尝试为我的项目使用差异视图时(组合框 ->“自上次分析以来”或“超过 30 天”),我要求仅查看差异(新添加)我收到弹出错误“执行 ES 搜索请求失败”。

问题是生成的 JSON 不符合 JSON 标准:"pre_zone":"GMT+01:00"

查看下面的 java 日志:

原因:org.elasticsearch.action.search.SearchPhaseExecutionException:执行阶段[查询]失败,所有分片失败; shardFailures {[Ke-Y5HFKSmS4todFkKRspg][issues][0]: SearchParseException[[issues][0]: query[ConstantScore(BooleanFilter(+cache(severity:CRITICAL) +CustomQueryWrappingFilter(parent_filter[authorization](filtered(ConstantScore(cache( BooleanFilter(+cache(users:admin) cache(groups:sonar-users) cache(groups:Anyone) cache(groups:sonar-administrators)))))->cache(_type:authorization))) +no_cache(issueCreatedAt: {1451826843000 TO *]) +cache(NotFilter(cache(BooleanFilter(_field_names:resolution)))) +cache(project:ea3bbe4c-0aa6-4668-84b0-f0929544d334)))],from[0],size[50] ,sort[,,,!,]: Parse Failure [Failed to parse source [{"from":0,"size":50,"query":{"filtered":{"query":{"match_all": {}},"filter":{"bool":{"must":[{"terms":{"severity":["CRITICAL"]}},{"has_parent":{"query":{"filtered ":{"query":{"match_all":{}},"filter":{"bool":{"must":{"or":{"filters":[{"term":{"users" :"admin"}},{"term":{"groups":"sonar-users"}},{"term":{"groups":"Anyone"}},{"term":{"groups" :"声纳管理员"}}]}},"_cache":true} }}},"parent_type":"authorization"}},{"range":{"issueCreatedAt":{"from":"2016-01-03T13:14:03.000Z","to":null,"include_lower ":false,"include_upper":true},"_cache":false}},{"......................, "min_doc_count":0,"pre_zone":"GMT+01:00","post_zone":"GMT+01:00","format":"yyyy -MM-dd'T'HH:mm:ssZ","extended_bounds":{"min":1451826843000,"max":1451924812731}}}}}]]];嵌套:NumberFormatException[对于输入字符串:“GMT+01”]; }

您知道如何解决这个问题吗? (我不能强制java时间。它是一个共享服务器)。

【问题讨论】:

    标签: java json sonarqube sonarqube5.1


    【解决方案1】:

    您的 Elasticsearch 索引似乎搞砸了。尝试删除您的 data/es 目录并重新启动服务器。

    【讨论】:

      【解决方案2】:

      我发现了问题。您需要为 JVM 指定时区。这是在 sonar.conf 文件中完成的。在该文件的 WEB SERVER 部分中,我添加了这一行:。

      sonar.web.javaAdditionalOpts=-Duser.timezone=America/Los_Angeles
      

      这为我解决了问题!

      【讨论】:

      • 欢迎来到 Stack Overflow!这实际上是评论,而不是答案。请只写答案以给出实际答案。当您有 50 个代表 you'll be able to comment 提出这样的问题时。同时,您可以将此问题加注为收藏夹,以便收到新答案的通知。
      猜你喜欢
      • 2012-10-19
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-14
      • 2018-08-11
      • 1970-01-01
      相关资源
      最近更新 更多