[ Ссылка ]
How to troubleshoot if SonarQube is not starting?
Your sonar.properties may not be setup correctly. It could be due to three different reasons:
1. verify below sonar.proeprties
sudo vi /opt/sonarqube/conf/sonar.properties
uncomment the below lines by removing # and add values highlighted yellow
sonar.jdbc.username=sonar
sonar.jdbc.password=password
Next, uncomment the below line, removing #
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
2. Switch to sql shell by entering
psql
Execute the below lines (one by one)
ALTER USER sonar WITH ENCRYPTED password 'password';
CREATE DATABASE sonarqube OWNER sonar;
GRANT ALL PRIVILEGES ON DATABASE sonarqube to sonar;
\q
type exit tom come out of postgresSQL.
3. Make sure you have setup sonarqube as a service properly.
Execute the below command:
sudo vi /etc/systemd/system/sonar.service
# copy the below green highlighted commands in the above file
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
User=root
Group=root
Restart=always
[Install]
WantedBy=multi-user.target
Ещё видео!