How to find out where message is coming from and stop it

Answered Question
May 28th, 2009

Hey folks, on my recently configured c2950-i6q4l2-mz.121-22.ea4a.bin I keep getting the message below. Is there any IOS command to let me pinpoint from which process and reason this message is coming from?


*Feb 28 16:35:12.031: %IP_SNMP-3-SOCKET: can't open UDP socket

*Feb 28 16:35:12: Unable to open socket on port 161

*Feb 28 16:36:12.031: %IP_SNMP-3-SOCKET: can't open UDP socket

*Feb 28 16:36:12: Unable to open socket on port 161

Correct Answer by Jon Marshall about 7 years 9 months ago


Can you type "no snmp-server" from global config.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Jon Marshall Thu, 05/28/2009 - 12:11


Check your SNMP config on the switch or alternatively post the config.


Giuseppe Larosa Thu, 05/28/2009 - 12:13

Hello Marlon,

have you configured SNMP on this device ?

you can check with

sh snmp

sh run | inc snmp

UDP port 161 is SNMP, UDP port 162 is for SNMP traps

if SNMP is configured the message is telling that the switch is not able to allocate an UDP socket to answer to an SNMP get that comes from a network management system.

check free memory with

sh proc mem | inc Free

Hope to help


news2010a Thu, 05/28/2009 - 12:40

This is the strange part:

If i do 'sh run | inc snmp' the only command related to snmp is:

sw#show run | in snmp

snmp-server engineID local 900000070200001CC1C02C50

Then I do

config t 'no snmp-server engineID'

the 'cant open UDP socket' message persists.

Then I do again 'show run | in snmp' and such entry remains in the configuration.

Any ideas on how to get rid of this?

Correct Answer
Jon Marshall Thu, 05/28/2009 - 12:48


Can you type "no snmp-server" from global config.


news2010a Thu, 05/28/2009 - 12:52

The 'no snmp-server' did it.

Well, I can't quite understand why by typing the entire string the command was not removed though.

Thank you very much folks.


This Discussion