我已经在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文件(相关部分)。
发布于 2016-04-05 19:36:28
您应该在sonar.properties文件中将sonar.web.host从0.0.0.0更改为您的服务器ip。然后重新启动sonarqube。
发布于 2021-04-07 21:07:46
我可能会在这篇文章中迟到。我正在使用Sonarqube社区版8.8,我面临着同样的问题,我能够在本地主机上访问,而不是使用IP。在sonar.properties中,我将sonar.web.host从0.0.0.0更改为sonar.web.host = "*“,并重新启动了sonarqube。这对我很有效。
https://stackoverflow.com/questions/21941392
复制相似问题