[Solved] Logstash Error: Bad file descriptor

no errors in the startup log using bin/logstash-f config/D_HINFO_PDT.conf.
When I use nohup bin/logstash-f config/D_HINFO_PDT.conf & startup.
Every second the following error is reported.
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 

 

Solution: When bin/logstash is started directly, there is a plugin to read data from stdin.
Once the nohup is used, it means that stdin is empty, so it will naturally report bad file descriptor error.
To solve this, one is to install logstash as a service, and the other is to add a parameter at startup.

nohup bin/logstash -f config/D_HINFO_PDT.conf 0</dev/null &

Read More: