sonarqube 5.x差异视图KO(JSON解析异常) [英] sonarqube 5.x differential views KO (JSON parsing exception)

查看:193
本文介绍了sonarqube 5.x差异视图KO(JSON解析异常)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SONARQUBE控制台中,当我尝试对项目使用差异视图时(组合框->自先前分析以来"或超过30天"),并且我要求仅查看差异(新添加)时,出现弹出错误无法执行ES搜索请求".

In SONARQUBE console when I try to use differential views for my project (combo box -> "since previous analysis" or "over 30 days") and I ask to see only the difference (new adds) I get a popup error "Fail to execute ES search request".

问题是生成的JSON与JSON不兼容:"pre_zone":"GMT + 01:00"

The problem is the JSON generated who is no JSON compliant : "pre_zone":"GMT+01:00"

请参阅下面的Java日志:

See the java logs below :

由以下原因引起:org.elasticsearch.action.search.SearchPhaseExecutionException:无法执行阶段[query],所有分片均失败; shardFailures {[Ke-Y5HFKSmS4todFkKRspg] [问题] [0]:SearchParseException [[问题] [0]:查询[ConstantScore(BooleanFilter(+ cache(severity:CRITICAL)+ CustomQueryWrappingFilter(parent_filter [authorization](filtered(ConstantScore(cache BooleanFilter(+ cache(users:admin)缓存(groups:sonar-users)cache(groups:Anyone)cache(groups:sonar-administrators))))-> cache(_type:authorization)))+ no_cache(issueCreatedAt: {1451826843000 TO *])+ cache(NotFilter(cache(Boolean(BooleanFilter(_field_names:resolution)))))+ cache(project:ea3bbe4c-0aa6-4668-84b0-f0929544d334)))),从[0]开始,大小为[50] ,sort [,,,!,]:解析失败[未能解析源[{{from:0," size:50," query:{" filtered:{" query:{" match_all: {}},过滤器":{布尔":{必须":[{术语":{严重性":[关键"]}}},{"has_parent":{查询":{已过滤:{" query:{" match_all:{}}," filter:{" bool:{" must:{" or:{" filters:[{" term:{" users":"admin"}},{"term":{"groups":"sonar-users"}},{"term":{"groups":"Anyone"}},{"term":{"groups" :"sonar-administrators"}}]}},"_ 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"]; }

Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; 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":"sonar-administrators"}}]}},"_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}}}}}]]]; nested: NumberFormatException[For input string: "GMT+01"]; }

您是否知道如何解决此问题? (我不能强制使用Java时间.它是共享服务器).

Do you have any idea how to work around this issues? (I cannot force the java time. It is a shared server).

推荐答案

我发现了问题.您需要指定JVM的时区.这是在sonar.conf文件中完成的.在该文件的"Web服务器"部分中,我添加了以下行:.

I found the problem. You need to specify the timezone for the JVM. This is done in the in the sonar.conf file. In that file, within the WEB SERVER section, I added this line:.

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

这为我解决了问题!

这篇关于sonarqube 5.x差异视图KO(JSON解析异常)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆