Can't connect to autonomoous oracledb cloud

Hi
I can't connect to an oracle db in oracle cloud, it gives me an error Got minus one from a read call. I've been trying many things in the discussions but nothing seems to work for me:

this is my input:

input{
    jdbc{
        jdbc_driver_library => "/usr/share/logstash/ojdbc11.jar"
        jdbc_driver_class => "oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@amsterdam.oraclecloud.com:1522"
        jdbc_user => "SYS"
        jdbc_password => "mypassword"
        statement => "SELECT * FROM regions"
        schedule => "*/5 * * * *"
    }
}

This is what I get in the error message:

[ERROR][logstash.inputs.jdbc     ][main] Unable to connect to database. Tried 1 times {:message=>"Java::JavaSql::SQLRecoverableException: IO Error: Got minus one from a read call", :exception=>Sequel::DatabaseConnectionError, :cause=>#<Java::JavaSql::SQLRecoverableException: IO Error: Got minus one from a read call>, :backtrace=>["oracle.jdbc.driver.T4CConnection.logon(oracle/jdbc/driver/T4CConnection.java:903)", "oracle.jdbc.driver.PhysicalConnection.connect(oracle/jdbc/driver/PhysicalConnection.java:820)", "oracle.jdbc.driver.T4CDriverExtension.getConnection(oracle/jdbc/driver/T4CDriverExtension.java:80)", "oracle.jdbc.driver.OracleDriver.connect(oracle/jdbc/driver/OracleDriver.java:820)", "oracle.jdbc.driver.OracleDriver.connect(oracle/jdbc/driver/OracleDriver.java:624)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:77)", "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:568)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:472)", "org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:330)", "RUBY.connect(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/adapters/jdbc.rb:237)", "RUBY.new_connection(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/database/connecting.rb:248)", "RUBY.make_new(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/connection_pool.rb:151)", "RUBY.assign_connection(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/connection_pool/threaded.rb:209)", "RUBY.acquire(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/connection_pool/threaded.rb:139)", "RUBY.hold(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/connection_pool/threaded.rb:91)", "RUBY.synchronize(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/database/connecting.rb:293)", "RUBY.test_connection(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/database/connecting.rb:302)", "RUBY.initialize(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/database/misc.rb:188)", "org.jruby.RubyClass.new(org/jruby/RubyClass.java:890)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(org/jruby/RubyClass$INVOKER$i$newInstance.gen)", "RUBY.connect(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/database/connecting.rb:57)", "RUBY.connect(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/sequel-5.62.0/lib/sequel/core.rb:124)", "RUBY.jdbc_connect(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-integration-jdbc-5.4.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:118)", "org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1507)", "org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(org/jruby/RubyKernel$INVOKER$s$0$0$loop.gen)", "RUBY.jdbc_connect(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-integration-jdbc-5.4.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:115)", "RUBY.open_jdbc_connection(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-integration-jdbc-5.4.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:158)", "RUBY.register(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-integration-jdbc-5.4.1/lib/logstash/inputs/jdbc.rb:309)", "RUBY.register(/usr/share/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-mixin-ecs_compatibility_support-1.3.0-java/lib/logstash/plugin_mixins/ecs_compatibility_support/target_check.rb:48)", "RUBY.register_plugins(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:234)", "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1865)", "org.jruby.RubyArray$INVOKER$i$0$0$each.call(org/jruby/RubyArray$INVOKER$i$0$0$each.gen)", "RUBY.register_plugins(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:233)", "RUBY.start_inputs(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:392)", "RUBY.start_workers(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:317)", "RUBY.run(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:191)", "RUBY.start(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:143)", "org.jruby.RubyProc.call(org/jruby/RubyProc.java:309)", "java.lang.Thread.run(java/lang/Thread.java:833)"]}

I saw you need to pass the connection string after the 1522?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.