首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SonarQube /api/resources -500个内部服务器错误

SonarQube /api/resources -500个内部服务器错误
EN

Stack Overflow用户
提问于 2016-04-15 16:18:26
回答 1查看 656关注 0票数 0

我在詹金斯河上使用松懈的声纳推进器,但当我执行任务时,我得到了这个输出:

代码语言:javascript
复制
 [ssp] Calling SonarQube on: http://xxx.xxx.x.xx:9000/api/resources?metrics=alert_status,quality_gate_details&includealerts=true
 [ssp] Got a non 200 response from SonarQube. Server responded with '500 : Internal Server Error'
 [ssp] Could not get Sonar results, exception: 'null'
 Build step 'Sonar Slack pusher' marked build as failure

如果我将details&includealerts=true url直接打开到浏览器中,就会收到right content

代码语言:javascript
复制
<resource>
<id>1</id>
<key>xxxxxx</key>
<name>xxxxx</name>
<lname>xxxxx</lname>
<scope>PRJ</scope>
<qualifier>TRK</qualifier>
<version>1.0</version>
<date>2016-04-15T17:54:33+0200</date>
<creationDate>2016-04-13T18:15:34+0200</creationDate>
<msr>
<key>alert_status</key>
<data>ERROR</data>
<alert>ERROR</alert>
<alert_text>
New Blocker issues > 0 since previous version (2016 Apr 13), New Critical issues > 20 since previous version (2016 Apr 13)
</alert_text>
</msr>
<msr>
<key>quality_gate_details</key>
<data>
{"level":"ERROR","conditions":[{"metric":"new_blocker_violations","op":"GT","period":1,"error":"0","actual":"3","level":"ERROR"},{"metric":"new_critical_violations","op":"GT","period":1,"warning":"","error":"20","actual":"71","level":"ERROR"},{"metric":"new_sqale_debt_ratio","op":"GT","period":1,"error":"5","actual":"0.0","level":"OK"}]}
</data>
</msr>
</resource>

Sonar.log

代码语言:javascript
复制
2016.04.15 19:07:39 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: http://xxx.xx.x.xxx:9000/api/resources?metrics=alert_status,quality_gate_details&includealerts=true
undefined method `generate' for #<JSON::Ext::Generator::State:0x6157370a>
    /Users/Jenkins/.calabash/calabash-gems/gems/json-1.8.3/lib/json/common.rb:223:in `generate'
    /Users/Jenkins/.calabash/calabash-gems/gems/json-1.8.3/lib/json/common.rb:470:in `JSON'
    /private/etc/sonarqube-5.4/web/WEB-INF/app/controllers/api/api_controller.rb:48:in `jsonp'
    /private/etc/sonarqube-5.4/web/WEB-INF/app/controllers/api/api_controller.rb:132:in `error_to_json'
    /private/etc/sonarqube-5.4/web/WEB-INF/app/controllers/api/api_controller.rb:123:in `render_response'
    org/jruby/RubyProc.java:290:in `call'
    org/jruby/RubyProc.java:224:in `call'

有谁知道有什么问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-04-15 17:14:23

解决了

代码语言:javascript
复制
unset GEM_PATH
unset GEM_HOME
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36652198

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档