启用PostGres并设置sonar.properties后,SonarQube无法恢复 [英] SonarQube does not come back up after I enable PostGres and set sonar.properties
问题描述
设置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:
- 设置PostgreSQL 9.6.2
- 为Sonar EC2实例配置安全性以允许入站规则:
- PostGreSQl/TCP/5432/0.0.0.0/0,::/0
- PostGreSQl/TCP/5432/Anywhere/0.0.0.0/0,::/0
- PostGreSQl/TCP/5432/Custom/Sonar Security组->声纳实例组
- VI sonar.properties文件
-
sonar.jdbc.username=XXXXXX
-> RDS设置期间使用的用户名 -
sonar.jdbc.password=XXXXXX
-> RDS设置期间使用的密码 -
sonar.jdbc.url=jdbc:sonardbpostgre.XXXXXXXXX.us-east-1.rds.amazonaws.com:5432
-
cd ../bin/linux-x86-64/
-
./sonar.sh restart
- Setup PostgreSQL 9.6.2
- Configure security for Sonar EC2 instance to allow inbound rules:
- PostGreSQl/TCP/5432/0.0.0.0/0, ::/0
- PostGreSQl/TCP/5432/Anywhere/0.0.0.0/0, ::/0
- PostGreSQl/TCP/5432/Custom/Sonar Security group --> group for the sonar instance
- VI sonar.properties file
sonar.jdbc.username=XXXXXX
--> Username used during RDS setupsonar.jdbc.password=XXXXXX
--> Password used during RDS setupsonar.jdbc.url=jdbc:sonardbpostgre.XXXXXXXXX.us-east-1.rds.amazonaws.com:5432
cd ../bin/linux-x86-64/
./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屋!