声纳亚军 404 本地主机 [英] Sonar Runner 404 localhost

查看:11
本文介绍了声纳亚军 404 本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 Sonar 在 OS X 机器上本地工作以进行一些概念验证工作,我已经下载了以下内容:

I'm trying to get Sonar working locally on an OS X box to do some proof of concept work, I've downloaded the following:

声纳 Qube: 4.5.6

声纳亚军: 2.4

Sonar Qube 配置为:

Sonar Qube is configured as:

sonar.web.host=localhost
sonar.web.context=/sonar
sonar.web.port=9000

当我尝试将 Sonar Runner 与示例项目之一一起使用时,我收到以下错误:

When I try and use Sonar Runner with one of the example projects I get the following error:

ERROR: Error during Sonar runner execution
ERROR: Fail to request server version
ERROR: Caused by: Status returned by url : 'http://localhost:9000/sonar/api/server/version' is invalid : 404

如果我将控制台中的 URL 复制并粘贴到浏览器中,则会加载页面(显示 4.5.6).

If I copy and paste the URL from the console into the browser then the page loads (displaying 4.5.6).

什么可能导致脚本收到 404?

What could be causing the script to receive a 404?

盒子在代理后面,但应该没有任何东西试图进入外部世界

The box is behind a proxy but nothing should be trying to get to the outside world

更新:将配置从 localhost 更改为使用机器 IP 地址会产生超时而不是 404,但通过浏览器仍然可以正常工作.

UPDATE: Changing the configuration from localhost to using the machines IP address produces a timeout rather than a 404, everything still works fine through the browser.

推荐答案

原来我的问题是 JVM 没有使用我机器的代理设置,我不得不添加跟随 Sonar 运行脚本.

So it turned out my problem was that the JVM wasn't using the proxy settings of my machine, I had to add the following to the Sonar runner script.

SONAR_RUNNER_OPTS="-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=my.local.host"  

这篇关于声纳亚军 404 本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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