# Error while running wmi input plugin

**URL:** <https://discuss.elastic.co/t/error-while-running-wmi-input-plugin/95494>\
**Category:** Logstash\
**Created:** [August 2, 2017, 9:31am UTC](https://discuss.elastic.co/t/error-while-running-wmi-input-plugin/95494 "2017-08-02T09:31:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxf](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@maxf](https://discuss.elastic.co/u/maxf)\
**Post date:** [August 2, 2017, 9:31am UTC](https://discuss.elastic.co/t/error-while-running-wmi-input-plugin/95494/1 "2017-08-02T09:31:49Z")

</div>

Hello.  
Im trying to run wmi input plugin, but i got only errors "Bad file descriptor"

My config:

> input {
> 
> wmi {  
> query =\> "SELECT \* FROM Win32\_Process"  
> host =\> "hostname"  
> user =\> "DOMAIN\USER"  
> password =\> "mypassword"  
> interval =\> 1  
> }  
> }

My log:

> [2017-08-02T13:51:30,457][DEBUG][logstash.codecs.plain] config LogStash::Codecs::Plain/@ id = "plain\_10eb85f5-9492-47a6-9bf6-c50f16599d43"  
> [2017-08-02T13:51:30,458][DEBUG][logstash.codecs.plain] config LogStash::Codecs::Plain/@ enable\_metric = true  
> [2017-08-02T13:51:30,458][DEBUG][logstash.codecs.plain] config LogStash::Codecs::Plain/@ charset = "UTF-8"  
> [2017-08-02T13:51:30,458][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ query = "SELECT \* FROM Win32\_Process"  
> [2017-08-02T13:51:30,458][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ host = "hostname"  
> [2017-08-02T13:51:30,458][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ user = "DOMAIN\USER"  
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ password =   
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ interval = 1  
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ id = "a1be0c6204884666809dc11fde693c956c8ea208-1"  
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ enable\_metric = true  
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ codec = \<LogStash::Codecs::Plain id=\>"plain\_10eb85f5-9492-47a6-9bf6-c50f16599d43", enable\_metric=\>true, charset=\>"UTF-8"\>  
> [2017-08-02T13:51:30,459][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ add\_field = {}  
> [2017-08-02T13:51:30,463][DEBUG][logstash.inputs.wmi] config LogStash::Inputs::WMI/@ namespace = "root\cimv2"  
> [2017-08-02T13:51:30,467][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=\>"file", :type=\>"output", :class=\>LogStash::Outputs::File}  
> [2017-08-02T13:51:30,473][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=\>"json\_lines", :type=\>"codec", :class=\>LogStash::Codecs::JSONLines}  
> [2017-08-02T13:51:30,475][DEBUG][logstash.codecs.jsonlines] config LogStash::Codecs::JSONLines/@ id = "json\_lines\_2a3a2720-6d36-4688-850e-aeb026f171bf"  
> [2017-08-02T13:51:30,475][DEBUG][logstash.codecs.jsonlines] config LogStash::Codecs::JSONLines/@ enable\_metric = true  
> [2017-08-02T13:51:30,475][DEBUG][logstash.codecs.jsonlines] config LogStash::Codecs::JSONLines/@ charset = "UTF-8"  
> [2017-08-02T13:51:30,475][DEBUG][logstash.codecs.jsonlines] config LogStash::Codecs::JSONLines/@ delimiter = "\n"  
> [2017-08-02T13:51:30,476][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ path = "/tmp/alert2"  
> [2017-08-02T13:51:30,476][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ id = "a1be0c6204884666809dc11fde693c956c8ea208-2"  
> [2017-08-02T13:51:30,476][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ enable\_metric = true  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ codec = \<LogStash::Codecs::JSONLines id=\>"json\_lines\_2a3a2720-6d36-4688-850e-aeb026f171bf", enable\_metric=\>true, charset=\>"UTF-8", delimiter=\>"\n"\>  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ workers = 1  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ flush\_interval = 2  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ gzip = false  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ filename\_failure = "\_filepath\_failures"  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ create\_if\_deleted = true  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ dir\_mode = -1  
> [2017-08-02T13:51:30,477][DEBUG][logstash.outputs.file] config LogStash::Outputs::File/@ file\_mode = -1  
> [2017-08-02T13:51:30,501][DEBUG][logstash.agent] starting agent  
> [2017-08-02T13:51:30,505][DEBUG][logstash.agent] starting pipeline {:id=\>"main"}  
> [2017-08-02T13:51:30,517][INFO][logstash.pipeline] Starting pipeline {"id"=\>"main", "pipeline.workers"=\>4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeline.max\_inflight"=\>500}  
> [2017-08-02T13:51:30,520][INFO][logstash.inputs.wmi] Registering wmi input {:query=\>"SELECT \* FROM Win32\_Process"}  
> [2017-08-02T13:51:30,582][DEBUG][logstash.agent] Starting puma  
> [2017-08-02T13:51:30,583][DEBUG][logstash.agent] Trying to start WebServer {:port=\>9600}  
> [2017-08-02T13:51:30,586][DEBUG][logstash.api.service] [api-service] start  
> [2017-08-02T13:51:30,619][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
> [2017-08-02T13:51:30,718][DEBUG][logstash.agent] Error in reactor loop escaped: Bad file descriptor - Bad file descriptor (Errno::EBADF)  
> [2017-08-02T13:51:30,719][DEBUG][logstash.agent] 2017-08-02 13:51:30 +0500: Listen loop error: #\<Errno::EBADF: Bad file descriptor - Bad file descriptor\>  
> [2017-08-02T13:51:30,720][DEBUG][logstash.agent] org/jruby/RubyIO.java:3705:in `select' /usr/share/logstash/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/server.rb:322:in `handle\_servers'  
> /usr/share/logstash/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/server.rb:296:in `run' [2017-08-02T13:51:30,720][DEBUG][logstash.agent] ["org/jruby/RubyIO.java:3705:in `select'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/reactor.rb:29:in `run_internal'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/lib/puma/reactor.rb:138:in `run\_in\_thread'"]  
> [2017-08-02T13:51:30,722][DEBUG][logstash.agent] Error in reactor loop escaped: Bad file descriptor - Bad file descriptor (Errno::EBADF)

So what am i doing wrong?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 30, 2017, 9:32am UTC](https://discuss.elastic.co/t/error-while-running-wmi-input-plugin/95494/2 "2017-08-30T09:32:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
