Frank,
understood and i am inline with your replies. some how i am not able to properly explain the issue here. would like to try it one more time in simple.
While we are moving from another snmp API provider to SNMP4J, we are facing 2 issue. one in the agent and one in another tool which is kind of manager (just walks through the OID Tree and display the data items).
Agent:
Our goal is to build an agent which will accepts GET/GETNEXT/GETBULK. We will have standalone process which can feed the data to the Managedobjects at runtime. As suggested by you in one of my earlier posts, we extended our MIB class from MOServerLookupListener and implemented queryEvent().
In queryEvent, using MOServerLookupEvent we are getting OID, SnmpRequest, reqType and ManagedObject type on which the LookUpEvent is fired (getLookupResult) we create a row, fill the data from our DB and add it to the corresponding MOTable. So that by the time getRow() is called the table will have the row object.
public void lookupEvent(MOServerLookupEvent event) {
if (event.getLookupResult()==tableMO1) {
myMOTable1.addRow();
}
if (event.getLookupResult() == tableMO12) {
myMOTable2.addRow();
}
if (event.getLookupResult() == tableMO3) {
myMOTable3.addRow();
}
Our MIB is having 3 ManagedObjects (of type table) under a rootOID. By using SNMPB, we are able to succefully walk (GETBULK) through these tables individually. But with a GETBULK on the rootOID what i observed (by looking at the requestType, LookUpResult and the OID of the current subrequest) the agent in the sequence of subrequests, after all the instances of firtst table, for the subrequest of second table lookUpEvent type is correct ut the OID is not of Second table. i would expect the usbrequest should be for the SecondTable with its corresponding OID. In the bove exapmle type of the MO should be tableMO2Entry and OID 2000.2.2. where as i see tableMO2Entry with OID as 200.1.2.2.index2.
because of this even though i know the type of the table object agent is looking for , i cannot create a rowEntry as the OID is not correct. finally the agent is responding back to the manager only with the rows from tableMO1.
the sequence is : lets say each table has 2 row instances.
queryEvent OID:2000.1 reqType:-91
LookUpEvent:tableMO1Entry, queryEvent OID:2000.1.1.1.index1 reqType:-91
LookUpEvent:tableMO1Entry, queryEvent OID:2000.1.1.1.index2 reqType:-91
LookUpEvent:tableMO1Entry, queryEvent OID:2000.1.1.2.index1 reqType:-91
LookUpEvent:tableMO1Entry, queryEvent OID:2000.1.1.2.index2 reqType:-91
LookUpEvent:tableMO2Entry, queryEvent OID:2000.1.1.2.index2 reqType:-91 → this OID should be 2000.2.1 ?
LookUpEvent:tableMO3Entry, queryEvent OID:2000.1.1.2.index2 reqType:-91 → this OID should be 2000.2.1 ?
i can handle this issue by simply ignoring the OID and creating a row (supposed to be the first row as per the index) into the subsequent tables but this may trigger other issues.
Issue with SNMP manager (built with SNMP4J):
I used TreeUtils and implemented a simple manager kind of application. here the issue is it is giving me partial tree data. with tools like like SNMPB or MG-SOFT i am able to walk through the root completely. some times it is TimedOut (but no errors/timeouts reported on the agent side) or some times i see following errors.
Initialized Salt to 62e2920e20b82185.
UDP receive buffer size for socket 0.0.0.0/0 is set to: 131072
Running pending async request with handle PduHandle[1372127675] and retry count left 2
Sending message to 10.131.176.121/8001 with length 46: 30:2c:02:01:01:04:06:70:75:62:6c:69:63:a5:1f:02:04:51:c9:01:bb:02:01:00:02:01:32:30:11:30:0f:06:0b:2b:06:01:04:01:93:78:81:48:82:2c:05:00
Running pending async request with handle PduHandle[1372127675] and retry count left 1
Sending message to 10.131.176.121/8001 with length 46: 30:2c:02:01:01:04:06:70:75:62:6c:69:63:a5:1f:02:04:51:c9:01:bb:02:01:00:02:01:32:30:11:30:0f:06:0b:2b:06:01:04:01:93:78:81:48:82:2c:05:00
Received message from /10.131.176.121/8001 with length 1446:
Looking up pending request with handle PduHandle[1372127675]
Cancelling pending request with handle PduHandle[1372127675]
Running pending async request with handle PduHandle[1372127677] and retry count left 2
Sending message to 10.131.176.121/8001 with length 51: 30:31:02:01:01:04:06:70:75:62:6c:69:63:a5:24:02:04:51:c9:01:bd:02:01:00:02:01:32:30:16:30:14:06:10:2b:06:01:04:01:93:78:81:48:82:2c:01:01:01:13:03:05:00
Received message from /10.131.176.121/8001 with length 1446:
Looking up pending request with handle PduHandle[1372127675]
Received response that cannot be matched to any outstanding request, address=10.131.176.121/8001, requestID=1372127675
BTW, how to upload text file into the post?