启用PostGres并设置sonar.properties后,SonarQube无法恢复 [英] SonarQube does not come back up after I enable PostGres and set sonar.properties

查看:242
本文介绍了启用PostGres并设置sonar.properties后,SonarQube无法恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置SonarQube版本6.4(内部版本25310),并在未打开上一个问题的9000问题后使其运行: 使用EC2在AWS上设置SonarQube

Setup SonarQube Version 6.4 (build 25310) and have it running after having issue not opening 9000 from previous question: Setting up SonarQube on AWS using EC2

现在我正在尝试通过AWS RDS设置PostGres:

Now I am trying to setup PostGres via AWS RDS:

  1. 设置PostgreSQL 9.6.2
  2. 为Sonar EC2实例配置安全性以允许入站规则:
  3. PostGreSQl/TCP/5432/0.0.0.0/0,::/0
  4. PostGreSQl/TCP/5432/Anywhere/0.0.0.0/0,::/0
  5. PostGreSQl/TCP/5432/Custom/Sonar Security组->声纳实例组
  6. VI sonar.properties文件
  7. sonar.jdbc.username=XXXXXX-> RDS设置期间使用的用户名
  8. sonar.jdbc.password=XXXXXX-> RDS设置期间使用的密码
  9. sonar.jdbc.url=jdbc:sonardbpostgre.XXXXXXXXX.us-east-1.rds.amazonaws.com:5432
  10. cd ../bin/linux-x86-64/
  11. ./sonar.sh restart
  1. Setup PostgreSQL 9.6.2
  2. Configure security for Sonar EC2 instance to allow inbound rules:
  3. PostGreSQl/TCP/5432/0.0.0.0/0, ::/0
  4. PostGreSQl/TCP/5432/Anywhere/0.0.0.0/0, ::/0
  5. PostGreSQl/TCP/5432/Custom/Sonar Security group --> group for the sonar instance
  6. VI sonar.properties file
  7. sonar.jdbc.username=XXXXXX --> Username used during RDS setup
  8. sonar.jdbc.password=XXXXXX --> Password used during RDS setup
  9. sonar.jdbc.url=jdbc:sonardbpostgre.XXXXXXXXX.us-east-1.rds.amazonaws.com:5432
  10. cd ../bin/linux-x86-64/
  11. ./sonar.sh restart

据我所知,我的配置不满意,因为它确实尝试启动,因为我看到pid出现了,但随后立即被杀死.

From what I can tell something in my config is not happy as it does try to start as I can see the pid come up but then it immediately gets killed.

有什么建议吗?

如果我取消注释sonar.properties中的更改,它将在重新启动后重新显示.

If I uncomment the changes in the changes in sonar.properties it comes back up after restart.

在尝试为数据库添加配置后,我会看到以下内容:

Here is what I see after I try adding the config for the DB:

root@ip-172- linux-x86-64]# ls
lib  SonarQube.pid  sonar.sh  wrapper
[root@ip-172- linux-x86-64]# ./sonar.sh restart
Stopping SonarQube...
Stopped SonarQube.
Starting SonarQube...
Started SonarQube.
[root@ip-172- linux-x86-64]# ls
lib  sonar.sh  wrapper
[root@ip-172- linux-x86-64]# ls
lib  sonar.sh  wrapper
[root@ip-172- linux-x86-64]# ./sonar.sh restart
Stopping SonarQube...
SonarQube was not running.
Starting SonarQube...
Started SonarQube.
[root@ip-172- linux-x86-64]# ls
lib  SonarQube.pid  sonar.sh  wrapper
[root@ip-172- linux-x86-64]# ls
lib  sonar.sh  wrapper

推荐答案

PostgreSQL的JDBC URL格式为jdbc:postgresql://<host>/<database>.在您的情况下,该属性应类似于sonar.jdbc.url=jdbc:postgresql://xxx.us-east-1.rds.amazonaws.com:5432/sonarqube.

Format of JDBC URL for PostgreSQL is jdbc:postgresql://<host>/<database>. In your case the property should look like sonar.jdbc.url=jdbc:postgresql://xxx.us-east-1.rds.amazonaws.com:5432/sonarqube.

这篇关于启用PostGres并设置sonar.properties后,SonarQube无法恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆