从外部/互联网访问Windows 2019 Server上的Sonarqube

时间:2020-08-31 10:45:43

标签: sonarqube windows-server-2019

我已经在托管的虚拟Windows 2019服务器上设置了SonarQube。它通过任务调度程序脚本运行,并且始终处于运行状态。 我们创建了dns记录sonarqube.domainname.com:8080,就像我们之前针对不同产品(例如Jenkins)所做的很多次一样。 托管公司已经开放了8080端口,但是我仍然无法连接到SonarQube。

托管公司写道:


防火墙允许并转发端口8080到服务器-但是,它似乎只侦听localhost / loopback上的端口8080-因此,它无法响应来自服务器的流量。

我认为应该将Java程序配置为在计算机IP或所有IP上侦听。


我是软件开发人员,而不是网络专家,老实说,我不理解他们写的内容。

在sonar.properties中

# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
# sonar.web.host=0.0.0.0
# sonar.web.host=127.0.0.1

# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
#sonar.web.context=
# TCP port for incoming HTTP connections. Default value is 9000.
#sonar.web.port=9000
sonar.web.port=8080

如果我尝试更改主机

sonar.web.host=

除了172.0.0.1 SonarQube之外,其他所有程序均不运行。

1 个答案:

答案 0 :(得分:0)

我做到了,现在可以了。很简单。

sonar.web.host=0.0.0.0 // listens on all IP´s for the machince
sonar.web.port=8080