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

not_found #3

Open
mehdipourfar opened this issue Jul 17, 2018 · 8 comments
Open

not_found #3

mehdipourfar opened this issue Jul 17, 2018 · 8 comments

Comments

@mehdipourfar
Copy link

I just get this error when I run the command.
Can't send request to <my_router_ip> due to not_found

@ates
Copy link
Owner

ates commented Jul 17, 2018

Try the latest commit

@mehdipourfar
Copy link
Author

That problem is solved. Thanks a lot. But there is a new problem. I can only get result of a single index.
For example, if I run walk function on this oid [1,3,6,1,2,1,2,2,1,16, 201443072] , I will get the appropriate result, but if I don't mention the index, like this [1,3,6,1,2,1,2,2,1,16], I will get noSuchInstance.

I have extracted tcpdump output to compare snmpcl and netsnmp requests. The difference is between GetRequest and GetNextRequest and I think the problem is there.

snmpcl request:

14:09:26.534693 IP WEB-2.localdomain.commplex-main > <my_ip>.snmp: C="" GetRequest(29) interfaces.ifTable.ifEntry.ifOutOctets
14:09:26.558983 IP <my_ip>.snmp > WEB-2.localdomain.commplex-main: C="
" GetResponse(29) interfaces.ifTable.ifEntry.ifOutOctets=[noSuchInstance]

netsnmp request:

4:09:36.205017 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(29) interfaces.ifTable.ifEntry.ifOutOctets
14:09:36.224262 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(32) interfaces.ifTable.ifEntry.ifOutOctets.128=0
14:09:36.224460 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(31) interfaces.ifTable.ifEntry.ifOutOctets.128
14:09:36.252569 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(32) interfaces.ifTable.ifEntry.ifOutOctets.262=0
14:09:36.252731 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(31) interfaces.ifTable.ifEntry.ifOutOctets.262
14:09:36.273400 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(32) interfaces.ifTable.ifEntry.ifOutOctets.390=0
14:09:36.273560 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(31) interfaces.ifTable.ifEntry.ifOutOctets.390
14:09:36.291090 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(32) interfaces.ifTable.ifEntry.ifOutOctets.519=0
14:09:36.291292 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(31) interfaces.ifTable.ifEntry.ifOutOctets.519
14:09:36.312313 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(32) interfaces.ifTable.ifEntry.ifOutOctets.647=0
14:09:36.312511 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(31) interfaces.ifTable.ifEntry.ifOutOctets.647
14:09:36.383007 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="i" GetResponse(37) interfaces.ifTable.ifEntry.ifOutOctets.201326592=216314041
14:09:36.383147 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(33) interfaces.ifTable.ifEntry.ifOutOctets.201326592
14:09:36.408087 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(38) interfaces.ifTable.ifEntry.ifOutOctets.201326656=2152918035
14:09:36.408235 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(33) interfaces.ifTable.ifEntry.ifOutOctets.201326656
14:09:36.428603 IP <my_ip>.snmp > WEB-2.localdomain.59574: C="
" GetResponse(37) interfaces.ifTable.ifEntry.ifOutOctets.201326720=918655572
14:09:36.428706 IP WEB-2.localdomain.59574 > <my_ip>.snmp: C="" GetNextRequest(33) interfaces.ifTable.ifEntry.ifOutOctets.201326720
14:09:36.446827 IP <my_ip>.snmp > WEB-2.localdomain.59574: C=""
" GetResponse(38) interfaces.ifTable.ifEntry.ifOutOctets.201326784=4233280872

@ates
Copy link
Owner

ates commented Jul 18, 2018

Try last commit, is it what u want?

@mehdipourfar
Copy link
Author

If I append the first index in OID, it will work but the problem is that I don't know the first index. I have resolved the problem and created a pull request.
Thank you for your time.

@mehdipourfar
Copy link
Author

I have still a problem. If I add this library as an elixir project dependency, I will get the old not_found message when calling :snmpcl.walk from my iex -S mix shell.

@ates
Copy link
Owner

ates commented Jul 18, 2018

I will check your pull request soon and merge it if it's ok.

@ates
Copy link
Owner

ates commented Jul 18, 2018

which version of snmpcl u use with elixir?

@mehdipourfar
Copy link
Author

My last commit. I have also added this options:
manager: :rebar3, override: true

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