RE: couldn't open udp:162 -- errno 98 ("Address already in use")

Jurkiewicz Jean-Marc <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <DB6PR0302MB26003715AF134812D4CC441EB3E70@DB6PR0302MB2600.eurprd03.prod.outlook.com>
Hi,

From what I see : It seems that the SNMP trap daemon is working and listening on port  162, what is OK.

How is this daemon configured :
snmptrapd.conf ? => per default the Traps are not handled

How is your cisco router configured: / does it send Traps ?
            snmp-server host Your-VM-IP Your-trap-Community

       snmp-server enable traps The-Traps-You-Want-To-See

Are the traps reaching the VM:
            Sniffing with Wireshark

Hope this helps

Best regards
JMJ





De : riva riv [mailto:[email protected]]
Envoyé : mercredi, 17. mai 2017 10:33
À : [email protected]
Objet : couldn't open udp:162 -- errno 98 ("Address already in use")

Hi Experts,

I am trying to receive a trap generated by a cisco router on my VM- Ubuntu 14.04. I can do a snmwalk so I guess snmp is working fine but I am not able to receive the traps generated by router on my VM.

a@ubuntu:~$ sudo /etc/init.d/snmpd restart
 * Restarting network management services:
a@ubuntu:~$ sudo /etc/init.d/snmpd status
 * snmpd is running
 * snmptrapd is running

Here is what I have inside files-

/etc/default/snmpd-
export MIBS=
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
TRAPDRUN=yes
# snmptrapd options (use syslog).
TRAPDOPTS='-n -On -t -Lsd -p /var/run/snmptrapd.pid'

/etc/snmp/-

snmpd.conf-
rocommunity public

snmptrapd.conf-
disableAuthorization yes

snmp.conf-
mibs:

The command I am running for viewing the traps on VM-

a@ubuntu:/etc/snmp$ sudo snmptrapd -f -Lo -c snmptrapd.conf
couldn't open udp:162 -- errno 98 ("Address already in use")

I am confused since the port is being used by snmptrap itself-

a@ubuntu:~$ cat /etc/services|grep 162
snmp-trap 162/tcp snmptrap # Traps for SNMP
snmp-trap 162/udp snmptrap
a@ubuntu:~$ sudo netstat -lnp| grep 162
udp        0      0 0.0.0.0:162<http://0.0.0.0:162/>             0.0.0.0:*                           6216/snmptrapd
a@ubuntu:~$ ps -ef | grep snmptrapd
root       6216   2076  0 10:43 ?        00:00:00 /usr/sbin/snmptrapd -Lsd -p /var/run/snmptrapd.pid
a    6493   2667  0 11:47 pts/8    00:00:00 grep --color=auto snmptrapd

Is there any way of solving this issue? I have googled a lot and stuck on this for days, any help will be very much appreciated.
Thanks a lot in advance!!

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.