# SNMP Trap listener died

**URL:** https://discuss.elastic.co/t/snmp-trap-listener-died/49376
**Category:** Logstash
**Created:** [May 6, 2016, 7:42am UTC](https://discuss.elastic.co/t/snmp-trap-listener-died/49376 "2016-05-06T07:42:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sawwinnnaung](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sawwinnnaung](https://discuss.elastic.co/u/sawwinnnaung)
#### Post date: [May 6, 2016, 7:42am UTC](https://discuss.elastic.co/t/snmp-trap-listener-died/49376/1 "2016-05-06T07:42:07Z")

</div>

I use snmp trap input plugin to import log from switch.This is my logstash config  
input {  
snmptrap {  
type =\> "snmptrap"  
port =\> 162  
host =\> "192.168.1.254"  
community =\> "cisco"  
yamlmibdir =\> "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/data/ruby/snmp/mibs/"  
}  
}  
filter { }  
output {  
stdout { codec =\> rubydebug }  
}

and this is error code  
SNMP Trap listener died {:exception=\>#\<SocketError: bind: name or service not known\>, :backtrace=\>["org/jruby/ext/socket/RubyUDPSocket.java:160:in `bind'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/lib/snmp/manager.rb:540:in`initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/lib/snmp/manager.rb:585:in `create_transport'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/lib/snmp/manager.rb:618:in`initialize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-snmptrap-2.0.4/lib/logstash/inputs/snmptrap.rb:74:in `build_trap_listener'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-snmptrap-2.0.4/lib/logstash/inputs/snmptrap.rb:78:in`snmptrap\_listener'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-snmptrap-2.0.4/lib/logstash/inputs/snmptrap.rb:53:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-5.0.0.alpha1-java/lib/logstash/pipeline.rb:388:in`inputworker'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-5.0.0.alpha1-java/lib/logstash/pipeline.rb:382:in `start\_input'"], :level=\>:warn}

---

<div class="post-metadata">

### Author: ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)
#### Post date: [May 6, 2016, 2:38pm UTC](https://discuss.elastic.co/t/snmp-trap-listener-died/49376/2 "2016-05-06T14:38:30Z")

</div>

@sawwinnnaung Hello,

I have a few questions:

- Everytime you start Logstash you are getting this error?
- Are you getting this at starting or after processing some events.
- Are you running the process with the right privileges to use the port 162?

---

<div class="post-metadata">

### Author: ![sawwinnnaung](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sawwinnnaung](https://discuss.elastic.co/u/sawwinnnaung)
#### Post date: [May 9, 2016, 3:02am UTC](https://discuss.elastic.co/t/snmp-trap-listener-died/49376/3 "2016-05-09T03:02:38Z")

</div>

Sorry for late reply @pierhugues

Yes everytime i got this error  
I got this when i starting it there is no events  
Yes I use right privileges

---

<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: [July 6, 2017, 4:58am UTC](https://discuss.elastic.co/t/snmp-trap-listener-died/49376/4 "2017-07-06T04:58:43Z")

</div>


