使用bin/logstash -f config/D_HINFO_PDT.conf 启动日志中没有错误;
我使用 nohup bin/logstash -f config/D_HINFO_PDT.conf & 启动时;
每一秒都报如下错误:
2017-10-30T10:52:13,412][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::Stdin id=>"d82cf8f6e66e1ce48c50c9d2d840029f3296238a-1", enable_metric=>true, codec=><LogStash::Codecs::Line id=>"line_6e3830b8-b4c6-4fb8-b15c-27356ae29021", enable_metric=>true, charset=>"UTF-8", delimiter=>"\n">>
Error: Bad file descriptor - Bad file descriptor
解决方法:直接bin/logstash 启动的时候,有个plugin要从stdin里面读数据
而一旦用了nohup,表明stdin就是空了,自然会报 bad file descriptor这个错。
解决的方法,一个是把logstash安装成服务,另外一个在启动时加个参数:
nohup bin/logstash -f config/D_HINFO_PDT.conf 0</dev/null &