Frank Fock | 20 Oct 23:57 2014

Released: AgenPro 4.0, SNMP4J-SMI 1.5.2, SNMP4J-Agent 2.3


AgenPro 4.0 has been released with a lot new features and usability 
The 4.0 version is the basis for the SNMP client code generation 
templates (for SNMP4J-Model 1.0)
which will be added in version 4.1 which - as usual - will be a free 
upgrade to all 4.x users!

I hope you will enjoy the new version. All AgenPro 3.x users who 
purchased their license in 2014
will rceive the free upgrade license key within the next 48 hours on 
their registered
email address.

SNM4J-Agent 2.3 and SNMP4J-SMI-PRO 1.5.2 have been released too. Both
versions provide bug fixes in the first place. In SNMP4J-Agent the MOFactory
interface had to be extended to fix a bug with the AgenPro code generation.


AgenPro  4.0

* Improved: MIB Editor view with new error stripe and quick search panel.
* Added: Simulation Agent Data panel to directly enter simulation data
   which can be even synchronized with Properties to generate intialization
* Added: Nimbus look&feel support.
* Improved [AGEN-26]: Sign JLNP files for even more secure WebStart feature.
* Added [AGEN-22]: TLS support for the built-in simulation agent.
(Continue reading)

Mátyás Kuti | 15 Oct 10:20 2014

Re: SNMP4J Digest, Vol 93, Issue 1


Thanks for your answer Frank!
The goal of the whole thing was to create an SNMP agent that accepts
GETNEXT requests from multiple clients. We built a response cache on the
first request for each client and based on the request ID of an incoming
request the proper response was sent. The response itself was determined by
the request ID. We expected that each ID would be in the range of (First
ID, First ID+Number of fields to send) but since the IDs are not always
incremented by 1 this solution would mess things up a bit... It works
perfectly when tested by hand using the snmpwalk command on Linux but when
we wrote the automatic tests in Java using SNMP4J the tests failed. Do you
have any idea how to solve the problem of concurrent GETNEXT requests?


2014-10-14 12:00 GMT+02:00 <snmp4j-request <at>>:

> Send SNMP4J mailing list submissions to
>         snmp4j <at>
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
>         snmp4j-request <at>
> You can reach the person managing the list at
>         snmp4j-owner <at>
(Continue reading)

David Corbin | 14 Oct 12:50 2014

SNMP4J, UDP, network buffers and EPERM

TL; DR: Does SNMP4J provide "transmit pacing" for UDP?  Does it handle
Linux's "EPERM error when" buffers overflow? (By handle I mean beyond
throwing an exception and failing).

I'm going to start with some background,  We have a large complex (overly
so) system that monitors some "stuff" using SNMP4J.  It generally works.  I
have an integration test suite that drives our system. We use a dedicated
machine with dozens if IP addresses that is programmed to respond to SNMP
requests in a way that the integration test suite expects.  For the
purposes of this converstaion, There's one specific test class   with 11
tests, and when I run it against our production code all of it's tests
pass very consistently.   Our complex system depends on Mule and JMS.  Most
if not all SNMP requests being made are being sent through JMS to an
SnmpExecutor service.  That Mule service in turn calls a Java class
(SnmpQueryExecutor) to synchronously resolve the request for SNMP data (the
SNMP request is asynchronous, but the Java code has it's own wait for the
answer or timeout) before proceeding.  The JMS client blocks waiting for
the SNMP request to complete (or timeout) before continuing on.

In attempt to simplify our complex system, I made a refactoring (on some
execution paths) to call the Java class directly, bypassing the JMS and
Mule part.  The integration tests now fail intermittently.  There are about
4 tests that sometimes fail.  The nature of the failures is also not
consistent.  Initially, one of them would fail on most runs (4 out 5).
After reducing the code-paths that use the new code to exactly one, and
this has dropped to about 1 failure every 3 or 4 runs.  I've learned that I
can make the test pass reliably by adding a 1 second delay to the new
code-path.  This change was for investigative purposes only.   It suggests
that there is a race condition or some type of failure that is related to
doing too much SNMP too fast, and since Mule and JMS add a fair amount of
(Continue reading)

Mátyás Kuti | 13 Oct 13:23 2014

Question regarding request id when doing getnext


We are doing the following:

List<VariableBinding> snmpTable = new ArrayList<VariableBinding>();
        for (TreeEvent event : events) {
            if (event != null) {
                if (event.isError()) {
[" + oid + "] " + event.getErrorMessage());
                VariableBinding[] varBindings = event.getVariableBindings();
                if (varBindings == null || varBindings.length == 0) {
                for (VariableBinding varBinding : varBindings) {

And we have enforced the GETNEXT behavior by setting:

We experience, that the request IDs increase by 2 instead of the expected 1:

Java-log output:

(Continue reading)

david jones | 23 Sep 23:37 2014

from: david jones

Hello snmp4j

jonesda24 <at>

SNMP4J mailing list
SNMP4J <at>
John Money | 19 Sep 21:12 2014

Device sending Trap with Inform

Hi Frank,

I am using snmp4j to listen for traps from multiple devices and it works
great! Recently, I started receiving traps from a device that is expecting
an Inform response to know that the trap has been received. Right now, the
device just continues to resend the traps and I receive all of them but I
only need each trap once.

I have been doing a lot of googling and I haven't found an example of how
to setup snmp4j to respond to the Trap/Inform so that the device will know
that the trap was received. Right now I have a CommandResponder
implementation that receives the Trap PDUs, but it is not receiving the
Inform PDUs that are being sent on the same port. If I configure my linux
server snmptrapd it receives the Traps and Inform messages, so it does not
appear to be an issue with the network. I am not sure why my snmp4j
configuration can receive the Traps but not the Informs.


1. Any idea why I am receiving Traps by not Informs?
2. Do you have an example for how to use snmp4j to acknowledge Traps sent
be a device that is expecting a response?

Here is my code:

public void start() {
try {
String address = LOCALHOST + port;"startSnmpServer at " + address);
Address _listenAddress = GenericAddress.parse(address);
(Continue reading)

jackychen | 18 Sep 03:58 2014

About snmp4j agent

Hi, Frank:
I want create a snmp Agent,the agent can manage some devices, I have the MIB for the agent, the mib contain
some table and several scalar node, each row for table is represent a device and the column represent the
attribute of the device. The several scalar node is represent the agent attribute. I want use the snmp4j
agent  implement the Agent. Should I use database to store the temp data for each device? I don't know how to
relate the device.You can give me some advice,

Best regards,
SNMP4J mailing list
SNMP4J <at>
Mooli Tayer | 15 Sep 13:05 2014


Whet version are you using? 

> I'm using BNDtools, i have added the bundle to the building path, however
> most of the functions does not exist.

> example:

> System . out . println ( "Trap Type = " + pdu. getType ( ) ) ;
> System . out . println ( "Variable Bindings = " + pdu. getVariableBindings (
> ) ) ;
> int pduType = pdu. getType ( ) ;
> if ( ( pduType != PDU. TRAP ) && ( pduType != PDU. V1TRAP ) && ( pduType !=
> && ( pduType != PDU. RESPONSE ) )
> {
> pdu. setErrorIndex ( 0 ) ;
> pdu. setErrorStatus ( 0 ) ;
> pdu. setType ( PDU. RESPONSE ) ;
> StatusInformation statusInformation = new StatusInformation ( ) ;
> StateReference ref = cmdRespEvent. getStateReference ( ) ;

> I try to use PDU, but it does not have.. and i have imported import
> org.snmp4j.*;

> I have try to search for a example of SNMP4J trap or other without success..

> > Date: Mon, 15 Sep 2014 05:26:13 -0400
> > From: mtayer <at>
> > To: x5rated <at>
> > CC: snmp4j <at>; osgi-dev <at>
(Continue reading)

daniel Trump | 12 Sep 18:05 2014


Hello I'm very new in this, 
I'm developing and SNMP application with trap and request(sending OID and receiving result data).
I have research in google for example but without success...
I'm able to create a SNMP Trap normal Java programming.. however I can't do it in OSGI..
I'm using the latest bundle a the normal commands are not there...
Does any one is working with iT or can anyone send me more information about SNMP with OSGI?thanks

SNMP4J mailing list
SNMP4J <at>
Vince Zeng | 11 Sep 08:34 2014

Please Help - " maximum number of DatagramSockets reached "

Hi guys,

For SNMP4J when I tried to get / getNext from cisco or dell device I've got exception below after several times.

Exception: maximum number of DatagramSockets reached

Anybody can help? Thank you!

Best Regards

Vince Zeng
Software Dev Staff Engineer
Dell | Software Group, China
Office +86 756 3298769
#3rd floor, Ever Bright International Trade Center, South HaiBin Road, Zhuhai, China

SNMP4J mailing list
SNMP4J <at>
László Leonard | 1 Sep 08:52 2014

SNMP4j duplicate registration exception


I have some dificulties registering my managed objects to MOServer.
The problem occured to me when I try to register a managed objects under an already registered managed object.
I send you the problematic code below:

  <at> SuppressWarnings({ "rawtypes", "unchecked" })
 MOScalar myScalar = new MOScalar(new OID(""), MOAccessImpl.ACCESS_READ_ONLY,
new OctetString(
 ourOwnManagedScalarObjects.put(myScalar.getID().toString(), myScalar);
 try {
server.register(myScalar, new OctetString(""));
} catch (DuplicateRegistrationException e) {
// TODO Auto-generated catch block
 myScalar = new MOScalar(new OID(""), MOAccessImpl.ACCESS_READ_ONLY, new OctetString(
 ourOwnManagedScalarObjects.put(myScalar.getID().toString(), myScalar);
 try {
// the exception is thrown at this line
server.register(myScalar,  new OctetString(""));
} catch (DuplicateRegistrationException e) {
// TODO Auto-generated catch block

Could you explain why I cannot register objects this way please?

(Continue reading)