[SNMP4J] problem to receive traps
Stefan M
smu.23 at web.de
Mon Jun 12 13:54:12 CEST 2006
Hello List,
I try to receive traps from a couple of access points unsing snmp4j. I
just copied the code from the api docs which add a CommandResponder to
the snmp object using the following code:
...
this.snmp = new Snmp(new DefaultUdpTransportMapping());
CommandResponder trapPrinter =
new CommandResponder() {
public synchronized void processPdu(CommandResponderEvent e) {
LOGGER.debug("e = "+e);
PDU command = e.getPDU();
if (command != null) {
LOGGER.debug("TRAP>> "+command);
}
}
};
snmp.addCommandResponder(trapPrinter);
this.snmp.listen();
...
The access point I am using in my test environment is configured to send
TRAPs on "whatever" event to the IP of my test machine. When I use the
MibbleBrowser (www.mibble.org, great tool!) to ask for the TRAP PDUs, it
tells me that 18 PDU had been send so far...Problem: I do not get any
debug message on my console. Is there something I forgot to configure?
thanx,
Stefan
More information about the SNMP4J
mailing list