Getting Oracle Error while running Logstash on RHEL7.5

Hi,

I recently started using ELK. My configuration files were working correctly for logstash on windows setup. Now I have moved to RHEL7.5 and running the same setup but getting oracle error mentioned below:

[ERROR][logstash.inputs.jdbc ] Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLException: ORA-00604: error occurred at recursive SQL level 1\nORA-01882: timezone region not found\n"}

Tried with different DB setups, still same error.

The simplest config file I tried is as below:

input {
jdbc {
jdbc_driver_library => "/data/OJDBC-FULL/ojdbc7.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@IP:PORT/SERVICE"
jdbc_user => "xxxx"
jdbc_password => "xxxx"
statement => "select * from table_name"
schedule => "0 * * * *"
}
}
output {
elasticsearch {
hosts => "localhost:9200"
index => "callpattern-%{+YYYY.MM.dd}"
document_id => "%{id}"
}
stdout {
codec => rubydebug
}
}

Have tried without index and host in output as well.
The OS user is not root user. Is it necessary that OS user must be root or super user?
Gone through lots of links but couldn't resolve the issue. Please help.

Solved.
TZ variable was not set at Linux level. After setting variable it's working fine.
To remove dependency on TZ, added "-Doracle.jdbc.timezoneAsRegion=false" in jvm.options file.

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