疲劳是最舒适的枕头,努力工作吧。

使用logstash同步mysql数据到es,使用nohup启动报错: Bad file descriptor - Bad file descriptor

Logstash | 作者 pengfeinew | 发布于2017年10月30日 | 阅读数:6543

我使用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
已邀请:

simonlei

赞同来自:

直接bin/logstash 启动的时候,有个plugin要从stdin里面读数据
而一旦用了nohup,表明stdin就是空了,自然会报 bad file descriptor这个错。
解决的方法,一个是把logstash安装成服务,另外一个在启动时加个参数:
 
nohup bin/logstash -f config/D_HINFO_PDT.conf 0</dev/null &
 
这样试一下看看

pengfeinew

赞同来自:

好用了,非常感谢!

要回复问题请先登录注册