当前位置: 首页 > 面试题库 >

无法在浏览器上打开远程安装的声纳

欧阳飞
2023-03-14
问题内容

我已经在远程Linux cent
OS服务器上安装了声纳。我已经在同一服务器上配置了数据库。启动服务器时,日志中没有看到任何错误,并且声纳似乎正在运行。消息:[sonar] $
./bin/linux-x86-64/sonar.sh状态声纳正在运行(13429)。

但是,当我尝试通过浏览器从Windows
PC访问声纳时,它给了我一个连接超时错误。我尝试使用以下网址通过chrome和firefox浏览器进行访问。http://:9000 /
sonar这是正确的方法吗?我还有什么想念的吗?我还没有设置其他任何东西,例如maven / jenkins / tomcat集成。任何帮助,将不胜感激。

Following are the values I had given:
sonar.web.host:                           127.0.0.1
sonar.web.port:                           9000
sonar.web.context:                        /sonar

日志:

    STATUS | wrapper  | 2013/10/01 11:08:57 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2013/10/01 11:08:58 | Launching a JVM...
INFO   | jvm 1    | 2013/10/01 11:08:58 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2013/10/01 11:08:58 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2013/10/01 11:08:58 |
INFO   | jvm 1    | 2013/10/01 11:08:58 | 2013-10-01 11:08:58.578:INFO:oejs.Server:jetty-7.6.11.v20130520
2013.10.01 11:09:01 INFO  o.s.s.p.ServerImpl  SonarQube Server / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:01 INFO  o.s.c.p.Database  Create JDBC datasource for jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatem
ents=true
2013.10.01 11:09:02 INFO  o.s.s.p.DefaultServerFileSystem  SonarQube home: /apps/sonar
2013.10.01 11:09:02 INFO  o.s.s.p.DefaultServerFileSystem  Deploy dir: /apps/sonar/war/sonar-server/deploy
2013.10.01 11:09:02 INFO  org.sonar.INFO  Install plugins...
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Findbugs / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin JaCoCo / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin English Pack / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Maven Batch Plugin / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Surefire / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Duplications / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Checkstyle / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin PMD / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Java / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Core / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Database Cleaner / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Squid for Java / 1.3 / 4d7d78e9340e39f53bbf202ed16d1253e6507c36
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Email notifications / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  o.s.s.p.PluginDeployer  Deploy plugin Design / 3.7.1 / 7f8f4d0f0b0044f178d587b8680032734d4fb578
2013.10.01 11:09:03 INFO  org.sonar.INFO  Install plugins done: 241 ms
2013.10.01 11:09:03 INFO  o.s.s.p.ApplicationDeployer  Deploy Ruby on Rails applications
2013.10.01 11:09:03 INFO  org.sonar.INFO  Start components...
2013.10.01 11:09:03 INFO  o.s.j.s.AbstractDatabaseConnector  Initializing Hibernate
2013.10.01 11:09:05 INFO  o.s.s.p.UpdateCenterClient  Update center: http://update.sonarsource.org/update-center.properties (no proxy)
2013.10.01 11:09:05 INFO  o.s.s.n.NotificationService  Notification service started (delay 60 sec.)
2013.10.01 11:09:05 INFO  org.sonar.INFO  Deploy GWT plugins...
2013.10.01 11:09:05 INFO  org.sonar.INFO  Deploy org.sonar.plugins.design.ui.libraries.LibrariesPage to /apps/sonar/war/sonar-server/deploy/gwt
2013.10.01 11:09:05 INFO  org.sonar.INFO  Deploy org.sonar.plugins.design.ui.page.DesignPage to /apps/sonar/war/sonar-server/deploy/gwt
2013.10.01 11:09:05 INFO  org.sonar.INFO  Deploy GWT plugins done: 32 ms
2013.10.01 11:09:05 INFO  org.sonar.INFO  Load metrics...
2013.10.01 11:09:06 INFO  o.s.s.s.RegisterMetrics  cleaning alert thresholds...
2013.10.01 11:09:06 INFO  org.sonar.INFO  Load metrics done: 498 ms
2013.10.01 11:09:06 INFO  org.sonar.INFO  Register rules [findbugs/java]...
2013.10.01 11:09:07 INFO  org.sonar.INFO  Register rules [findbugs/java] done: 611 ms
2013.10.01 11:09:07 INFO  org.sonar.INFO  Register rules [checkstyle/java]...
2013.10.01 11:09:07 INFO  org.sonar.INFO  Register rules [checkstyle/java] done: 543 ms
2013.10.01 11:09:07 INFO  org.sonar.INFO  Register rules [pmd/java]...
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [pmd/java] done: 841 ms
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [pmd-unit-tests/java]...
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [pmd-unit-tests/java] done: 38 ms
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [squid/java]...
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [squid/java] done: 220 ms
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [common-java/java]...
2013.10.01 11:09:08 INFO  org.sonar.INFO  Register rules [common-java/java] done: 6 ms
2013.10.01 11:09:08 INFO  o.s.s.s.RegisterRules  Removing deprecated rules
2013.10.01 11:09:09 INFO  o.s.s.s.RegisterNewProfiles  Register Quality Profiles...
2013.10.01 11:09:11 INFO  o.s.s.s.RegisterNewProfiles  Register Quality Profiles done: 2401 ms
2013.10.01 11:09:11 INFO  o.s.s.s.RegisterQualityModels  Register Quality Models...
2013.10.01 11:09:11 INFO  o.s.s.s.RegisterQualityModels  Register Quality Models done: 0 ms
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterNewMeasureFilters  Register measure filters...
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterNewMeasureFilters  Register measure filters done: 6 ms
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterNewDashboards  Register dashboards...
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterNewDashboards  Register dashboards done: 18 ms
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterPermissionTemplates  Register permission templates...
2013.10.01 11:09:12 INFO  o.s.s.s.RegisterPermissionTemplates  Register permission templates done: 2 ms
2013.10.01 11:09:12 INFO  o.s.s.s.RenameDeprecatedPropertyKeys  Rename deprecated property keys
2013.10.01 11:09:12 INFO  org.sonar.INFO  Start components done: 8602 ms
2013.10.01 11:09:12 INFO  jruby.rack  jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [linux-amd64-java]
2013.10.01 11:09:12 INFO  jruby.rack  using a shared (threadsafe!) runtime
INFO   | jvm 1    | 2013/10/01 11:09:18 | JRuby limited openssl loaded. http://jruby.org/openssl
INFO   | jvm 1    | 2013/10/01 11:09:18 | gem install jruby-openssl for full support.
INFO   | jvm 1    | 2013/10/01 11:09:26 | 2013-10-01 11:09:26.032:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/sonar,file:/apps/sonar/war/sonar-server/},file:/apps/sonar/war/sonar-server
INFO   | jvm 1    | 2013/10/01 11:09:26 | 2013-10-01 11:09:26.107:INFO:oejs.AbstractConnector:Started SelectChannelConnector@127.0.0.1:9000

Sonar目录中的文件夹的权限:

drwxrwxrwx 13 usr grp     4096 Sep 30 15:53 bin
drwxrwxrwx  2 usr grp     4096 Oct  1 12:36 conf
-rwxrwxrwx  1 usr grp     7651 Sep 30 15:53 COPYING
drwxrwxrwx  2 usr grp     4096 Sep 30 15:53 data
drwxrwxrwx  7 usr grp     4096 Sep 30 16:02 extensions
drwxrwxrwx  3 usr grp     4096 Sep 30 15:53 lib
drwxrwxrwx  2 usr grp     4096 Oct  1 10:23 logs
-rwxrwxrwx  1 usr grp 74135040 Sep 30 15:17 sonar.tar
drwxrwxrwx  3 usr grp     4096 Oct  1 12:58 temp
drwxrwxrwx  4 usr grp     4096 Sep 30 15:53 war

谢谢,N


问题答案:

在服务器的sonar.properties文件中,您需要设置主机信息才能远程访问服务器。

具体来说,您需要设置以下值:

sonar.web.host: 192.168.1.1 #use your server IP here
sonar.web.port: 80 #set this if you want a different port than 9000

此外,在Web
UI的“设置”区域中的“常规”部分下,设置“服务器基本URL”值,以便生成电子邮件等的链接指向正确的位置。也可以在您的sonar.properties文件中将其设置为sonar.core.serverBaseURL

不要忘记重启Sonar服务以使更改生效。



 类似资料:
  • 每当我尝试时,它都会说Chrome意外关闭并要求重新打开。在python末尾,它给出了错误: 我的代码是: 更新:在详细模式下运行会产生以下结果:

  • 我试图在我的MacBook上打开google页面时出错 期待在火狐上打开谷歌主页

  • 全局基类 登录名 } 问题是,当运行此功能时,我得到了下面的错误,我不明白为什么会发生这种情况,因为它在错误的位置上没有给我任何帮助。 未定义步骤:给定I打开Chrome 未定义步骤:浏览网站时 未定义的步骤:然后我使用“user1”和“password1”登录网站

  • 我在使用用户guest和密码guest(默认凭据)访问http://localhost:15672时收到此错误 所以我卸载了Rabbit MQ服务器和Erlang。 然后从官方网站下载它们并重新安装,首先是“Erlang for Windows installer 64位”,然后是“RabbitMQ-Server-3.6.12.exe”。 但是,我仍然得到err_connection_delect

  • 我正在尝试dockerise一个反应应用程序。我正在使用以下Dockerfile来实现这一点。 还有,在我的包裹里。json开始脚本被定义为