logstash 无法配置插件:(ArgumentError)无法从nil确定时区\n(秒

wrrgggsh  于 2023-09-28  发布在  Logstash
关注(0)|答案(1)|浏览(156)

[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'] = '洲/城市' 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
}

}

它总是显示错误的时间戳尝试了多种方式,但仍然相同,我从马来西亚-亚洲任何人都可以帮助我解决这个时间戳问题?

8fsztsew

8fsztsew1#

这可能是因为Elastic没有完全向后兼容的时区。请尝试按照Wikipedia page中的建议使用Asia/Singapore

相关问题