声纳远程访问

时间:2014-02-21 17:39:46

标签: sonarqube

我在Windows 64位系统上安装了Sonarqube 4.1.1。我在安装它的同一台机器上连接到Web客户端没有问题。但是我没有远程访问 - 即使在同一个网络中(所以我不需要ip转发等)。

由于我认为端口可能是问题,我将其他tomcat安装切换到此端口并且远程工作。只有当我尝试远程访问声纳时它才起作用。

#--------------------------------------------------------------------------------------------------
# WEB SERVER

# 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

# 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. Disabled when value is -1.
sonar.web.port=8082

# TCP port for incoming HTTPS connections. Disabled when value is -1 (default).
#sonar.web.https.port=-1

# HTTPS - the alias used to for the server certificate in the keystore.
# If not specified the first key read in the keystore is used.
#sonar.web.https.keyAlias=

# HTTPS - the password used to access the server certificate from the
# specified keystore file. The default value is "changeit".
#sonar.web.https.keyPass=changeit

# HTTPS - the pathname of the keystore file where is stored the server certificate.
# By default, the pathname is the file ".keystore" in the user home.
# If keystoreType doesn't need a file use empty value.
#sonar.web.https.keystoreFile=

# HTTPS - the password used to access the specified keystore file. The default
# value is the value of sonar.web.https.keyPass.
#sonar.web.https.keystorePass=

# HTTPS - the type of keystore file to be used for the server certificate.
# The default value is JKS (Java KeyStore).
#sonar.web.https.keystoreType=JKS

# HTTPS - the name of the keystore provider to be used for the server certificate.
# If not specified, the list of registered providers is traversed in preference order
# and the first provider that supports the keystore type is used (see sonar.web.https.keystoreType).
#sonar.web.https.keystoreProvider=

# The maximum number of connections that the server will accept and process at any given time.
# When this number has been reached, the server will not accept any more connections until
# the number of connections falls below this value. The operating system may still accept connections
# based on the sonar.web.connections.acceptCount property. The default value is 50 for each
# enabled connector.
#sonar.web.http.maxThreads=50
#sonar.web.https.maxThreads=50

# The minimum number of threads always kept running. The default value is 5 for each
# enabled connector.
#sonar.web.http.minThreads=5
#sonar.web.https.minThreads=5

# The maximum queue length for incoming connection requests when all possible request processing
# threads are in use. Any requests received when the queue is full will be refused.
# The default value is 25 for each enabled connector.
#sonar.web.http.acceptCount=25
#sonar.web.https.acceptCount=25

# Access logs are generated in the file logs/access.log. This file is rolled over when it's 5Mb.
# An archive of 3 files is kept in the same directory.
# Access logs are enabled by default.
#sonar.web.accessLogs.enable=true

这是我的sonar.properties文件(相关部分)。

2 个答案:

答案 0 :(得分:4)

您应该将sonar.web.host从0.0.0.0更改为sonar.properties文件中的服务器IP。然后重启sonarqube。

答案 1 :(得分:0)

我可能会迟到这篇文章。我正在使用 Sonarqube 社区版 8.8 并且我遇到了同样的问题,能够在本地主机上访问而不使用 IP。在 sonar.properties 中,我将 sonar.web.host 从 0.0.0.0 更改为 sonar.web.host = "*" 并重新启动了 sonarqube。这对我有用。