【问题标题】:Sonarqube does not load its page without any error message when connected to PostgresQL连接到 PostgresQL 时,Sonarqube 不会加载其页面而没有任何错误消息
【发布时间】:2023-03-26 23:26:01
【问题描述】:

块引用

我安装了 sonarqube 和 postgresql。当我在 sonar.properties 文件中评论 postgresql url、用户名和密码时,sonarqube 会毫无问题地加载其页面。但是一旦在 sonar.properties 页面中取消注释 postgresql 用户名、密码和 url,sonarqube 就不会加载其页面。以下是配置和 sonarqube 错误日志。请帮忙。

sonar.jdbc.username
sonar.jdbc.password
sonar.jdbc.url=jdbc:postgresql://localhost:9000/sonarqube


2017.05.22 01:22:57 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
2017.05.22 01:22:57 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on /127.0.0.1:9001
2017.05.22 01:22:57 INFO   es[o.elasticsearch.node]  [sonar-1495430576840] version[2.3.3], pid[18065], build[218bdf1/2016-05-17T15:40:04Z]
2017.05.22 01:22:57 INFO   es[o.elasticsearch.node]  [sonar-1495430576840] initializing ...
2017.05.22 01:22:57 INFO   es[o.e.plugins]  [sonar-1495430576840] modules [], plugins [], sites []
2017.05.22 01:22:57 INFO   es[o.elasticsearch.env]  [sonar-1495430576840] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [9.8gb], net total_space [19.9gb], spins? [unknown], types [rootfs]
2017.05.22 01:22:57 INFO   es[o.elasticsearch.env]  [sonar-1495430576840] heap size [1007.3mb], compressed ordinary object pointers [true]
2017.05.22 01:22:57 WARN   es[o.elasticsearch.env]  [sonar-1495430576840] max file descriptors [4096] for elasticsearch process likely too low, consider increasing to at least [65536]
2017.05.22 01:22:59 INFO   es[o.elasticsearch.node]  [sonar-1495430576840] initialized
2017.05.22 01:22:59 INFO   es[o.elasticsearch.node]  [sonar-1495430576840] starting ...
2017.05.22 01:22:59 INFO   es[o.e.transport]  [sonar-1495430576840] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2017.05.22 01:22:59 INFO   es[o.e.discovery]  [sonar-1495430576840] sonarqube/LJ_FLAsuTKqVBqSqY43J9g
2017.05.22 01:23:02 INFO   es[o.e.cluster.service]  [sonar-1495430576840] new_master {sonar-1495430576840}{LJ_FLAsuTKqVBqSqY43J9g}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonar-1495430576840}, reason: zen-disco-join(elected_as_master, [0] joins received)
2017.05.22 01:23:02 INFO   es[o.elasticsearch.node]  [sonar-1495430576840] started
2017.05.22 01:23:02 INFO   es[o.e.gateway]  [sonar-1495430576840] recovered [6] indices into cluster_state
2017.05.22 01:23:03 INFO   es[o.e.c.r.allocation]  [sonar-1495430576840] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[tests][4], [tests][0]] ...]).
2017.05.22 01:23:03 INFO  app[o.s.p.m.Monitor] Process[es] is up
2017.05.22 01:23:03 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /opt/java/jdk1.8.0_45/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube-6.0/temp -javaagent:/opt/java/jdk1.8.0_45/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube-6.0/lib/jdbc/postgresql/postgresql-9.3-1102-jdbc41.jar org.sonar.server.app.WebServer /opt/sonarqube-6.0/temp/sq-process3487714092659899450properties
2017.05.22 01:23:04 INFO  web[o.s.p.ProcessEntryPoint] Starting web
2017.05.22 01:23:04 INFO  web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube-6.0/web
2017.05.22 01:23:04 INFO  web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2017.05.22 01:23:04 INFO  web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2017.05.22 01:23:04 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 6.0 / 93442889cd219e78b028c7dcf51a30de74c987fe
2017.05.22 01:23:04 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost:9000/sonarqube

【问题讨论】:

  • 没有为 sonar.jdbc.username 和 sonar.jdbc.password 指定值。如果您故意跳过此处复制(只是为了向我们隐藏凭据),那么没关系
  • 这是故意的。我可以在用户名和密码上放一些东西,但我认为没有必要。无论如何,感谢您的回复。

标签: sonarqube


【解决方案1】:

您的 JDBC URL 似乎不正确:您的 postgresql 实例是否侦听端口 9000,默认端口是 5432? SonarQube 使用 9000 端口来暴露其 http 端口。

【讨论】:

  • 你救了我的命。非常感谢。感谢您的帮助。
猜你喜欢
  • 2020-11-19
  • 2016-04-04
  • 1970-01-01
  • 2013-09-20
  • 1970-01-01
  • 2021-12-24
  • 1970-01-01
  • 2018-01-25
  • 2023-04-04
相关资源
最近更新 更多