Open sanielfishawy opened 9 months ago
Here are the lines of the tableFeedCb() method:
function tableFeedCb (req, varbinds) {
for (var i = 0; i < varbinds.length; i++) {
if (isVarbindError (varbinds[i])) {
req.error = new RequestFailedError (varbindError (varbinds[i]));
return true;
}
The culprit seems to be that isVarbindError interprets ObjectType.EndOfMibView as an error. This may be necessary in other circumstances but perhaps it is not correct in this case?
function isVarbindError (varbind) {
return !!(varbind.type == ObjectType.NoSuchObject
|| varbind.type == ObjectType.NoSuchInstance
|| varbind.type == ObjectType.EndOfMibView);
}
Hi @sanielfishawy - I followed your instructions but failed to reproduce the RequestFailedError
. Can you please provide a minimal reproduction of this - with the exact code you use on the calling side and on the agent side. Thanks.
I had the same issue. At the end of the snmpwalk there must be another OID. The table is then read without an error message.
To reproduce:
Create an Agent with MIB containing a single table. Populate the table with rows.
Call session.table against that Agent with the OID of the table.
The final varbinds is an EndOfMibView as follows:
In the function tableFeedCb (index.js line 2425) this EndOfMibView is interpreted as an error and rather than returning the table the session.table() method returns a RequestFailedError: EndOfMibView: