Hi Andrew,
Is the ojdbc7.jar file in the $RDECK_BASE/server/lib directory? (not on the $RDECK_BASE/libext directory).
Also, make sure that your db connection is well configured, take a look at this (check carefully the rundeck-config.properties config).
Regards.
Hi Andrew,
Ensure the rundeck user can reach the ojdbc7.jar file (or change the permissions).
Another thing, could you try the URL in this way?
jdbc:oracle:thin:@fqdn:port:orcl
instead of:
jdbc:oracle:thin:@fqdn:port/SCHEMA
Like the docs example.
Three years ago I made a docker example, you can check the config there.
Regards.
Hi Andrew,
What Oracle DB version are you using? Did you test with the ojdbc8.jar file?
I saw the same error when the driver file wasn’t present.
Caused by: java.lang.ClassNotFoundException: Unable to load class: oracle.jdbc.OracleDriver .
Please make sure that the rundeck user can reach the driver.
To test I used the following Oracle 11g XE docker compose deployment file:
version: '3' services: oracle: image: oracleinanutshell/oracle-xe-11g:latest ports: - 1521:1521 volumes: - dbdata:/ORCL volumes: dbdata:And then I created the Rundeck user as follows:
1) su - oracle
2) sqlplus / as sysdba
3) create USER rundeck IDENTIFIED BY rundeck
4) GRANT CONNECT, RESOURCE, DBA TO rundeck
So, I started Rundeck with the following rundeck-config.properties content:
dataSource.dbCreate = none dataSource.driverClassName = oracle.jdbc.OracleDriver dataSource.url = jdbc:oracle:thin:@localhost:1521:xe dataSource.username = rundeck dataSource.password = rundeck dataSource.dialect = org.rundeck.hibernate.RundeckOracleDialect dataSource.properties.validationQuery = SELECT 1 FROM DUAL grails.plugin.databasemigration.updateOnStart=trueAs you see, the dataSource.dbCreate is configured with the none value (your config contains this line with update, change it).
Also, check your grails.plugin.databasemigration.updateOnStart=true, this value must be present in your rundeck-config.properties file.
Regards.
Hi Andrew,
Also tested on Oracle 21XE with the following config:
I created a basic Database as follows:
1) alter session set "_ORACLE_SCRIPT"=true;
2) sudo su -
3) su - oracle
4) sqlplus / as sysdba
5) create USER rundeck IDENTIFIED BY rundeck
6) GRANT CONNECT, RESOURCE, DBA TO rundeck
Regards!
Weird, try with an empty DB then :/
Did you check the ojdbc8.jar permissions?
BTW, the DB creation order in my example is wrong, this is the real order, my bad:
1) sudo su -
2) su - oracle
3) sqlplus / as sysdba
4) alter session set "_ORACLE_SCRIPT"=true;
5) create USER rundeck IDENTIFIED BY rundeck;
6) GRANT CONNECT, RESOURCE, DBA TO rundeck;
Regards.
Hi Andrew,
Just tested Rundeck 4.11 (OpenJDK 11.0.21) + ojdbc8.jar driver + Oracle 12.1.0.2.
How the DB was created on Oracle 12.1.0.2:
My Rundeck rundeck-config.properties db section (Rundeck 4.11):
dataSource.dbCreate = none dataSource.driverClassName = oracle.jdbc.OracleDriver dataSource.url = jdbc:oracle:thin:@my_oracle_host:1521:ORCLCDB dataSource.username = rundeck dataSource.password = rundeck dataSource.dialect = org.rundeck.hibernate.RundeckOracleDialect dataSource.properties.validationQuery = SELECT 1 FROM DUAL grails.plugin.databasemigration.updateOnStart=trueAlso works using your dataSource.url way: dataSource.url = jdbc:oracle:thin:@my_oracle_host:1521/ORCLCDB
So, some tips here:
Regards.
Hi Andrew,
You saved the ojdbc8.jar file in the /opt/rundeck/libext/ directory. This is only for plugins, not for db drivers.
Just delete the ojdbc8.jar file in the /opt/rundeck/libext/ directory.
The right place is /opt/rundeck/server/lib/.
Regards.
According to this:
com.dtolabs.rundeck.core.plugins.PluginException: Error loading class: com.rundeck.plugin.HttpNotificationPlugin
It seems that you need the HTTP notification plugin. Download this jar file and save it in the libext directory (/opt/rundeck/libext in your case), then restart the rundeck service.
Regards.