Sonarqube configured with Oracle not working

oracle
sonarqube

(shah vaishal) #1
  • Sonarqube Version -: 7.3
  • Cent OS -7.5
  • Oracle - 12.2.0.1

I am trying to connect Sonarqube with Oracle.
In Oracle i have created new user name as sonar and gave all the permissions. with below command.

CREATE USER sonar IDENTIFIED BY sonar;
GRANT ALL PRIVILEGES TO sonar;

When I start my sonarqube first time it was working as expected but once I have stopped and start again It is throwing error like below.

ERROR web[][o.s.s.p.Platform] Web server startup failed
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc.’).

When I totally remove and reinstall whole sonar setup with oracle users its working as expected but after stop it is not working.

Thanks in advance!!!


(Alexandre Frigout) #2

Hello,

Thanks for sharing the web.log file as well as your jdbc url property from the sonar.properties file.

Alex.


(shah vaishal) #3

Hi Alexandre,

Thanks for your reply. PFA Web.log and sonar.properties file.

web.txt (7.2 KB)

sonar.properties.txt (19.7 KB)

Thanks,
Vaishal


(shah vaishal) #4

Hi,

Any Update on this?

Thanks,
Vaishal


(Alexandre Frigout) #5

Hello,

From what I can read in the log there is an issue on the dataserver side.
Can you check that you can open a socket on the database server from the sonarqube server ?
You can do it by using telnet and ultimately, if you have an Oracle driver installed on your sonarqube server you should try to connect to your database with sqlplus and the login/password set in your sonar.properties file.

Alex.


(shah vaishal) #6

Hi Alexandre,

Thanks for your reply.

I have tried both the option and it is working. but when we are trying with sonar.properties file for few minuets we are able to connect to Oracle database and then throwing same error.

Regards,
Vaishal Shah


(Alexandre Frigout) #7

Hello,

It may be related to the random generator set in your java distribution to secure the connection with entropy.
Have a look at the following thread and try to replace the /dev/random with /dev/urandom.

Alex.


(shah vaishal) #8

Hi Alex,

Thanks for your answer.
After made changes in JVM parameter it is working.

Thanks again for your support :slight_smile:

Regards,
Vaishal