Search code examples
elasticsearchlogstashelasticsearch-5elasticsearch-plugin

Unable to configure plugins: (ArgumentError) Cannot determine timezone from nil\n(secs


[2023-08-21T20:43:58,795][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ArgumentError) Cannot determine timezone from nil\n(secs:1692621838.782,utc~:\"2023-08-21 12:43:58.7820000648498535\",ltz~:nil)\n(etz:nil,tnz:\"MYT\",tziv:\"2.0.6\",tzidv:\"1.2023.3\",rv:\"2.6.8\",rp:\"java\",win:true,rorv:nil,astz:nil,eov:\"1.2.7\",eotnz:\"???\",eotnfz:\"???\",eotlzn:\"???\",\ndebian:nil,centos:nil,osx:nil)\nTry setting ENV['TZ'] = 'Continent/City' in your script (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init

input {
jdbc {
clean_run =\> true
jdbc_driver_library =\> "C:\\Users\\shien\\Downloads\\elasticsearch\\logstash-conf\\mysql-connector-java-8.0.30"
jdbc_driver_class =\> "com.mysql.jdbc.Driver"
jdbc_connection_string =\> "jdbc:mysql://localhost:3306/elastic"
jdbc_user =\> "root"
jdbc_password =\> "NgShiEng12345"
jdbc_default_timezone =\> "Asia/Kuala_Lumpur"
\#schedule =\> "\* \* \* \* \*"
\#statement =\> "SELECT \* FROM elastic.employee"
use_column_value =\> true
\#tracking_column =\> "category"
tracking_column =\> "last_update"
}
}
filter {
mutate {
remove_field =\> \["@version"\]
}
date {
match => [ "sometimefield", "yyyy/MM/dd HH:mm:ss" ] # set correct time format
timezone => "Asia/Kuala_Lumpur"
target=> "@timestamp" # this is default fieldname
}
}
output{
elasticsearch { 
hosts =\> \["https://localhost:9200/"\]
index =\> "film_idx"
user =\> "elastic"
password =\> "VzGBen=KxU7uCojo8HZR"
ssl =\> true
ssl_certificate_verification =\> false
}

}

It always show error on the timestamp tried multiple way but still the same, I from Malaysia - Asia Can anyone help me to solve this timestamp issues?


Solution

  • It might be that Elastic doesn't have the full backward compatibility time zones. Try to use Asia/Singapore as suggested in the Wikipedia page.