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.
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.
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.
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.