Node-snmp error

Hi all. Trying to use node-red-node-snmp on an Opto22 groov RIO.

when if i try snmp walk node-red just restarts and if i try to get just one OID i get the following.

13‎/‎09‎/‎2022‎ ‎12‎:‎59‎:‎40‎ ‎PM[node: eebcb0f2cc29320d]( : array[1]


0: object

oid: ""

type: 128

value: null

_error: "NoSuchObject:"

tstr: "NoSuchObject"

and from console log

13 Sep 03:05:20 - [error] [snmp:22ed07bef56d7251] NoSuchObject:

Unsure of where to try and fix this. If i use a pc and scan this OID I get an expected response.

If you run snmpwalk in a terminal in the device does it function correctly?

If it does then stop node-red and start it again in a terminal so that you can see the startup log. Then initiate the walk and see what occurs in the terminal. Post the full terminal output from starting node-red up to when it restarts. Copy/paste please, not screenshot.

I have just got the ssh licence for this device so I am hoping to get some time with it tonight and try a few more things.

Now that i have been able to get into it some more I have got a straight fetch working.

if i do snmp from terminal

admin@opto-instro:~/.node-red$ snmpwalk -v 2c -c public
SNMPv2-MIB::sysDescr.0 = STRING: ICT Distribution Panel
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.39145.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (39004) 0:06:30.04
SNMPv2-MIB::sysContact.0 = STRING: .
SNMPv2-MIB::sysServices.0 = INTEGER: 7

If I do snmp fetch from my flow

{"oid":"","type":4,"value":"ICT Distribution Panel","tstr":"OctetString"}

If I do a walk from my flow it just crashes and i get the following from the console.

14 Sep 12:35:25 - [red] Uncaught Exception:
14 Sep 12:35:25 - [error] ReferenceError: response is not defined
at Object.feedCb (/home/dev/.node-red/node_modules/node-red-node-snmp/snmp.js:451:25)
at Session.walkCb (/home/dev/.node-red/node_modules/net-snmp/index.js:2611:11)
at Req.feedCb (/home/dev/.node-red/node_modules/net-snmp/index.js:1935:7)
at Req.Session.onSimpleGetResponse [as onResponse] (/home/dev/.node-red/node_modules/net-snmp/index.js:2178:7)
at Session.onMsg (/home/dev/.node-red/node_modules/net-snmp/index.js:2153:7)
at Socket.emit (events.js:314:20)
at UDP.onMessage [as onmessage] (dgram.js:921:8)
14 Sep 12:35:43 - [info] 

Yes that would seem to be a bug - can you try latest version 1.0.5 ? Thanks

Can you give instructions on how to get to 1.0.5?

I did npm install node-red-node-snmp and it took me to 1.0.3

I will try again its a pain as the network it sits on does not have internet connection.

Managed to get 1.0.5 on.

Walk is now working. Thankyou.

1 Like

Thanks for bringing it to our attention

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.