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

问题描述 投票:0回答:1

[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
}

}

它总是在时间戳上显示错误尝试了多种方法但仍然相同,我来自马来西亚 - 亚洲 谁能帮我解决这个时间戳问题?

elasticsearch logstash elasticsearch-5 elasticsearch-plugin
1个回答
0
投票

Elastic 可能不具有完全向后兼容的时区。尝试按照

维基百科页面
中的建议使用 Asia/Singapore

© www.soinside.com 2019 - 2024. All rights reserved.