Java Logstash SQLite错误“;完整类缺少Valuefier处理; #数据库 elastic@elastic:~/ELK/database$sudo sqlite3 data.db SQLite版本3.8.2 2013-12-06 14:53:30 输入“.help”以获取说明 输入以“;”结尾的SQL语句 sqlite>创建表测试(id integer主键自动递增、ip integer、res integer); sqlite> sqlite>插入测试(ip、res)值(200500); sqlite>插入测试(ip、res)值(300400); #aaa.conf 输入{ sqlite{ path=>“/home/elastic/ELK/database/data.db” 类型=>测试 } } 输出{ stdout{ 编解码器=>rubydebug{} } } elastic@elastic:~/ELK/logstash-5.1.1$sudo-bin/logstash-f aaa.conf 将Logstash的日志发送到/home/elastic/ELK/Logstash-5.1.1/logs,该日志现在通过log4j2.properties配置 [2017-04-25T00:11:41397][INFO][logstash.inputs.sqlite]注册sqlite输入{:database=>“/home/elastic/ELK/database/data.db”} [2017-04-25T00:11:41588][INFO][logstash.pipeline]正在启动管道{“id”=>“main”,“pipeline.workers”=>1,“pipeline.batch.size”=>125,“pipeline.batch.delay”=>5,“pipeline.max\u inflight”=>125} [2017-04-25T00:11:41589][INFO][logstash.pipeline]主管道已启动 [2017-04-25T00:11:41632][ERROR][logstash.pipeline]插件出现无法恢复的错误。将重新启动此插件。 插件:“/home/elastic/ELK/database/data.db”,type=>“test”,id=>“5545bd3bab8541578394a2127848be34204c195-1”,enable_metric=>true,codec=>“plain_1349faf2-3b33-40d0-b328-f588fd97ae7e”,enable_metric=>true,charset=>“UTF-8”>,batch=>5> 错误:缺少完整类名=org.jruby.RubyObject、简单名称=RubyObject的Valuefier处理
Java Logstash SQLite错误“;完整类缺少Valuefier处理; #数据库 elastic@elastic:~/ELK/database$sudo sqlite3 data.db SQLite版本3.8.2 2013-12-06 14:53:30 输入“.help”以获取说明 输入以“;”结尾的SQL语句 sqlite>创建表测试(id integer主键自动递增、ip integer、res integer); sqlite> sqlite>插入测试(ip、res)值(200500); sqlite>插入测试(ip、res)值(300400); #aaa.conf 输入{ sqlite{ path=>“/home/elastic/ELK/database/data.db” 类型=>测试 } } 输出{ stdout{ 编解码器=>rubydebug{} } } elastic@elastic:~/ELK/logstash-5.1.1$sudo-bin/logstash-f aaa.conf 将Logstash的日志发送到/home/elastic/ELK/Logstash-5.1.1/logs,该日志现在通过log4j2.properties配置 [2017-04-25T00:11:41397][INFO][logstash.inputs.sqlite]注册sqlite输入{:database=>“/home/elastic/ELK/database/data.db”} [2017-04-25T00:11:41588][INFO][logstash.pipeline]正在启动管道{“id”=>“main”,“pipeline.workers”=>1,“pipeline.batch.size”=>125,“pipeline.batch.delay”=>5,“pipeline.max\u inflight”=>125} [2017-04-25T00:11:41589][INFO][logstash.pipeline]主管道已启动 [2017-04-25T00:11:41632][ERROR][logstash.pipeline]插件出现无法恢复的错误。将重新启动此插件。 插件:“/home/elastic/ELK/database/data.db”,type=>“test”,id=>“5545bd3bab8541578394a2127848be34204c195-1”,enable_metric=>true,codec=>“plain_1349faf2-3b33-40d0-b328-f588fd97ae7e”,enable_metric=>true,charset=>“UTF-8”>,batch=>5> 错误:缺少完整类名=org.jruby.RubyObject、简单名称=RubyObject的Valuefier处理,java,sqlite,ubuntu-14.04,logstash,Java,Sqlite,Ubuntu 14.04,Logstash,Jruby.RubyObject,简单名称=RubyObject。我不知道如何处理这些错误。我通过安装logstash input jdbc插件解决了这个问题 我认为jdbc插件是sqlite插件的需求 因此,插件安装: # database elastic@elastic:~/ELK/database$ sudo sqlite3 data.db SQLite version 3.8.2 2013-12-06 14:53:30 Enter ".help" for instructions Ent
Jruby.RubyObject,简单名称=RubyObject
。我不知道如何处理这些错误。我通过安装logstash input jdbc
插件解决了这个问题
我认为jdbc
插件是sqlite
插件的需求
因此,插件安装:
# database
elastic@elastic:~/ELK/database$ sudo sqlite3 data.db
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table test(id integer primary key autoincrement, ip integer, res integer);
sqlite>
sqlite> insert into test (ip,res) values(200,500);
sqlite> insert into test (ip,res) values(300,400);
# aaa.conf
input{
sqlite{
path => "/home/elastic/ELK/database/data.db"
type => test
}
}
output{
stdout{
codec => rubydebug{}
}
}
elastic@elastic:~/ELK/logstash-5.1.1$ sudo bin/logstash -f aaa.conf
Sending Logstash's logs to /home/elastic/ELK/logstash-5.1.1/logs which is now configured via log4j2.properties
[2017-04-25T00:11:41,397][INFO ][logstash.inputs.sqlite ] Registering sqlite input {:database=>"/home/elastic/ELK/database/data.db"}
[2017-04-25T00:11:41,588][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
[2017-04-25T00:11:41,589][INFO ][logstash.pipeline ] Pipeline main started
[2017-04-25T00:11:41,632][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::Sqlite path=>"/home/elastic/ELK/database/data.db", type=>"test", id=>"5545bd3bab8541578394a2127848be342094c195-1", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_1349faf2-3b33-40d0-b328-f588fd97ae7e", enable_metric=>true, charset=>"UTF-8">, batch=>5>
Error: Missing Valuefier handling for full class name=org.jruby.RubyObject, simple name=RubyObject
希望这有帮助 如果您使用sqlite插件3.0.4并遇到这个问题,我会说这可能是一个bug,我在logstash论坛上提出了这个问题 所以你可以使用jdbc插件来获取你的sqlite数据
顺便说一句,如果您选中
logstash-input-sqlite-3.0.4/lib/logstash/inputs/sqlite.rb
。但是我不明白为什么event=LogStash::event.new(“host”=>@host,“db”=>@db)”在我的情况下失败了。什么问题?你解决了吗?
bin/logstash-plugin install logstash-input-jdbc