Open kkr78 opened 8 years ago
This would be a huge help for those of us that cannot have hard coded credentials in the connection strings and utilize certificates with the wallet authentication. Although we were able to customize the source code to do it, it would be very nice to have this in the mainstream product.
This issue was resolved ? I'm with same problem Input: jdbc { jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver" jdbc_driver_library => "/usr/lib/oracle/19.6/client64/lib/ojdbc8.jar" jdbc_connection_string => "jdbc:oracle:thin:@dbname?TNS_ADMIN=/home/ubuntu/oracle_driver/wallet/" jdbc_user => "user" jdbc_password => "password" statement => "SELECT count(0) FROM table " }
Get this error: [ERROR] 2020-06-30 09:20:01.304 [Ruby-0-Thread-15: :1] jdbc - Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLRecoverableException: IO Error: The Network Adapter could not establish the connection"}
@kkr78 any solution identified for this , we are also trying to use wallet.
i raised this issue originally on lostash forum https://discuss.elastic.co/t/logstash-reading-data-from-oracle-database-using-oracle-wallet/51181. I provided most of the details on thread.
Currently Logstash not working with Oracle wallet. The jdbc.rb and driver class need to be enhanced to support Oracle Wallet .I debugged code little bit. I printed the props and args to console. The code is passing the userid , password which is not required in case of wallet. I think "driver" class might be parsing the connection string and passing the host name and port number.
driver.new.connect(args[0], props)
FYR, see below the java code which tested against the Wallet. Please note, there are no properties passed while creating connection.
String url = "jdbc:oracle:thin:/@ALIAS_DB"; Class.forName("oracle.jdbc.OracleDriver"); Connection conn = DriverManager.getConnection(url);
Follow this thread for more explanation and steps to create wallet, configure tnsora.names etc http://stackoverflow.com/questions/7634196/what-is-correct-jdbc-url-syntax-if-oracle-wallets-are-used