Tuesday, April 4, 2023

SonarQube Server Cannot be reached Error Resolution | SonarQube Troubleshooting

How to Resolve SonarQube Server cannot be reached Error?

Pre-requisites:

Sonarqube was configured manually by downloading zip file. This instructions will not address for SonarQube that was configured by Docker compose.

Let's see how we can resolve the error:

Solution # 1
Your sonar.properties may not be setup correctly. It could be due to three different reasons: 1. verify below sonar.properties 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
Solution # 2

Make sure you have setup Postgres SQL correctly.
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.
Solution #3
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




No comments:

Post a Comment

DevOps Interview Preparation Useful real time tips | Crack DevOps Interviews | How to clear DevOps Interviews

Are you failing in DevOps Interviews? Are you not be able to next round in the Interview process?  Let's find out how to fix this:   Fir...