Dears!
I'm new to EKL and I have a problem trying to connect to an Oracle database.
My code:
input {
jdbc{
jdbc_driver_library => "C:\EKL\logstash\vendor\jar\jdbc\ojdbc6.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
#ORACLE jdbc connection string to our database, ORACLE jdbc:oracle:thin:@hostname:PORT/SERVICE
jdbc_connection_string => "jdbc:oracle:thin:@\srv:1521:service"
jdbc_user => "user"
jdbc_password => "password"
jdbc_validate_connection => true
#Query
statement => "select * from users"
#optional extras I use
type => "Database"
# tags => ["awesome", "import"]
}
}
filter {
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "contacts"
document_type => "contact"
document_id => "%{uid}"
}
stdout {
codec => rubydebug
}
}
Error:
←[31mPipeline aborted due to error {
**:exception=>#<Sequel::DatabaseConnectionError: Java::JavaSql::SQLRecoverableException: Error de E/S: The Network Adapter could not establish the connection>,
:backtrace=>[
"oracle.jdbc.driver.T4CConnection.logon(oracle/jdbc/driver/T4CConnection.java:489)",
"oracle.jdbc.driver.PhysicalConnection.(oracle/jdbc/driver/PhysicalConnection.java:553)",
"oracle.jdbc.driver.T4CConnection.(oracle/jdbc/driver/T4CConnection.java:254)",
"oracle.jdbc.driver.T4CDriverExtension.getConnection(oracle/jdbc/driver/T4CDriverExtension.java:32)",
"oracle.jdbc.driver.OracleDriver.connect(oracle/jdbc/driver/OracleDriver.java:528)",
"java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606)",
"RUBY.connect(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/adapters/jdbc.rb:222)",
"RUBY.make_new(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool.rb:103)",
"RUBY.make_new(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:224)",
"RUBY.available(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:197)",
"RUBY._acquire(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:133)",
"RUBY.acquire(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:147)",
"RUBY.sync(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:265)",
"org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:149)",
"RUBY.sync(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:265)",
"RUBY.acquire(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:146)",
"RUBY.acquire(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/extensions/connection_validator.rb:90)",
"RUBY.hold(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/connection_pool/threaded.rb:104)",
"RUBY.synchronize(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/database/connecting.rb:256)",
"RUBY.test_connection(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/database/connecting.rb:266)",
"RUBY.prepare_jdbc_connection(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.0.2/lib/logstash/plugin_mixins/jdbc.rb:170)", "RUBY.register(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.0.2/lib/logstash/inputs/jdbc.rb:167)",
"RUBY.start_inputs(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:330)",
"org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)",
"RUBY.start_inputs(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:329)",
"RUBY.start_workers(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:180)",
"RUBY.run(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/pipeline.rb:136)",
"RUBY.start_pipeline(C:/EKL/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.2-java/lib/logstash/agent.rb:465)",
"java.lang.Thread.run(java/lang/Thread.java:745)"], :level=>:error}←[0m
stopping pipeline {:id=>"main"
}
The signal HUP is in use by the JVM and will not work correctly on this platform
I did --configtest and tells me OK.
The data that are putting this well.
You might be missing me something more to connect to the database?
Thanks in advance