Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different responses from command line than from library #45

Closed
maufc opened this issue Feb 15, 2019 · 5 comments
Closed

Different responses from command line than from library #45

maufc opened this issue Feb 15, 2019 · 5 comments

Comments

@maufc
Copy link

maufc commented Feb 15, 2019

Hi.
I have some troubles trying to comunitate with some ComAp Controllers using this library.
We got 16 units, 6 AMF-25 and 10 PWR models. All same model units got the same firmware.
I always got an answer if I use snmpget from the command line but it fails randomly (independently of the model)
The response I got is the following:
{ ResponseInvalidError: OID '1.3.6.1.4.1.28634.6.3780509972.2.8198.0' in request at positiion '0' does not match OID '1.3.6.1.4.1.28634.6.-514457324.2.8198.0' in response at position '0'
at Object.feedCb (/home/mauricio/server/node_modules/net-snmp/index.js:626:22)
at Object.Session.onSimpleGetResponse [as onResponse] (/home/mauricio/server/node_modules/net-snmp/index.js:951:7)
at Session.onMsg (/home/mauricio/server/node_modules/net-snmp/index.js:920:9)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8)
name: 'ResponseInvalidError',
message: 'OID '1.3.6.1.4.1.28634.6.3780509972.2.8198.0' in request at positiion '0' does not match OID '1.3.6.1.4.1.28634.6.-514457324.2.8198.0' in response at position '0'' }
What would be the problem that fails using the library but it doesn't when using snmp from the command line.
Thanks!

@maufc maufc changed the title Different responses from command line than Different responses from command line than from library Feb 15, 2019
@stephenwvickers
Copy link
Collaborator

Hi @maufc,

So it looks like the large integer in the OID is not being parsed correctly.

Are you able to provide a packet trace of the query and response so I can troubleshoot it further?

Thanks

Steve

@maufc
Copy link
Author

maufc commented Apr 23, 2019

Hi. I'm sorry I couldn't answer before.
I couldn't provide the packet Trace of the query or the response. If you can tell me how to do it I will.
Could it be dice on some other way?
Thanks

@stephenwvickers
Copy link
Collaborator

So it looks like you are on a Lunix host, in which case do something like (untested):

tcpdump -w capture.cap -i any port 161

Recreate the issue, then attach the resulting capture.cap file.

@maufc
Copy link
Author

maufc commented Aug 6, 2019

Hi.
Sorry for the late response...
According to this, I do get an answer from the device but I still get an error on the command line.
This is the capture:
19:06:53.676674 IP generador-NUC7i3BNH.46454 > 153.0.0.140.snmp: GetRequest(37) E:28634.6.3607365907.2.8198.0
19:06:53.685290 IP 153.0.0.140.snmp > generador-NUC7i3BNH.46454: GetResponse(38) E:28634.6.3607365907.2.8198.0=11
This is the response on command line:
{ ResponseInvalidError: OID '1.3.6.1.4.1.28634.6.3607365907.2.8198.0' in request at positiion '0' does not match OID '1.3.6.1.4.1.28634.6.-687601389.2.8198.0' in response at position '0'
at Object.feedCb (/home/generador/server/node_modules/net-snmp/index.js:626:22)
at Object.Session.onSimpleGetResponse [as onResponse] (/home/generador/server/node_modules/net-snmp/index.js:951:7)
at Session.onMsg (/home/generador/server/node_modules/net-snmp/index.js:920:9)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8)
name: 'ResponseInvalidError',
message: 'OID '1.3.6.1.4.1.28634.6.3607365907.2.8198.0' in request at positiion '0' does not match OID '1.3.6.1.4.1.28634.6.-687601389.2.8198.0' in response at position '0'' }
IP 153.0.0.140-- no response mon -- OID: 1.3.6.1.4.1.28634.6.3607365907.2.8198.0

Hope you understand where the problem is.

Thanks!

@maufc
Copy link
Author

maufc commented Dec 29, 2020

This topic was never solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants