-
Notifications
You must be signed in to change notification settings - Fork 114
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
Traceback in format_ios_ver #11
Comments
Good morning, Can you try editing node.py? I will try to update to a new version with this fix soon, but this should work for now. def _format_ios_ver(self, img):
to def _format_ios_ver(self, img):
Give that a try and let me know. Thanks. Michael Laforest From: J4bber [mailto:notifications@github.com] This is seen when used against a Cisco Nexus 7000 $ mnet.py graph -r 10.108.18.4 -f test.png -d 2 -c mnet.conf MNet Suite v0.8 Config file: mnet.conf Diagram title: MNet Network Diagram +l3n7k_76ad_ru34 (10.108.18.4)
Traceback (most recent call last): — |
I have the same issue with a 6509E. I modified the script but it still only discovers the first node and then exits. I've also tried with a 3750 with the same result. It discovers the first node but fails to crawl the network. I've tried changing the
|
I have the same problem: ./mnet.py graph -d4 -r 10.10.10.10 -f mnet.svg -C mnet.catalog
Diagram title: MNet Network Diagram
----- DEVICES
Platform: None I have tried on some cisco 3750, 3850, 4500 switches, same results. no links detected. |
Made the edit to node.py as suggested by Michael which fixed the traceback but discovery beyond the root node is broken. I can grab info for the root device (hostname, IP, serial, routing) but the platform and IOS version from the OID_ENTPHYENTRY consistently come back across a number of different platforms as 'None' and this seems to stop the discovery process dead in it's tracks. I can complete 'snmpwalk' commands to most of the OIDs listed in 'snmp.py' to my root node just fine. I tried to add print instructions to the various steps for the _get_chassis_info function in node.py for debugging purposes but I don't get any output (at all). Here is the output for the graph module after making the change Michael suggested. It looks like the same behavior others are experiencing.
|
I'll try debugging it a bit more tomorrow. It would be a shame for a very small thing to prevent the entire process working. |
Any updates on this issue? I'm facing the same problem. |
Got the same issue on a Cisco Catalyst 4500 running 15.0(2)SG
|
I am having the same issues as the people above, after making the suggested edits to node.py. It discovers the first device but none after that. SNMP connectivity from the server to my switches is good, LLDP is enabled and shows neighbors via the CLI. |
Actually - I forgot to update this thread - this might be fixed, at least I fixed it for me. I submitted a fix to master a couple weeks ago. The fix in this thread does not really fix it, just removes version from the discovery. |
Ohh shiny! Thanks for the work! I'll be able to test tomorrow with 20 or so 2960X and a 6503/04! |
Different error now. I uninstalled the old version using 'sudo pip uninstall mnet' and then installed the latest master (extracted zip, uploaded to server) using 'sudo pip install -e mnet-master/' and it installs successfully. If I leave depth at 0 is runs w/o error. But if set depth to 1 or more I get this:
|
What devices are you running the script against? I'm wondering if the Pip version is actually updated with the current master. |
My root device is a Cisco Nexus 9372. Other switches in the same network (directly connected) are Nexus 55xx, 2950, and 2960. I uninstalled the PIP version and installed using the zip file from the master "https://github.com/MJL85/mnet/archive/master.zip" Seems like an issue with netaddr based on that last traceback? There is a bunch of comments and suggestions on reddit here that I am sifting through at the moment. But I am pretty new to using Python so any suggestions are welcome! |
There are definitely some differences between the different packages required/python versions. I'll take a look tomorrow too. Check if you are running Python 2 or 3 and what is the version of your different packages. Ideally, if we can find the magical working versions I can probably cobble a Docker container from which we run everything with the correct dependencies. |
I disabled using netaddr in "~/mnet-master/mnetsuite/util.py" by setting "USE_NETADDR" to 0. It works against CDP but it looks like the code on my switches don't support LLDP info via SNMP, so I will have to look into that further. Thanks guys for your help! |
Glad to hear that you found a workaround! That traceback is actually happening inside the netaddr package. Glad the issue reported in the opening thread is fixed for you! If you want, you can open another issue specific to this netaddr component, and report the versions you are using too. |
Any update. i loaded the pip version. loaded the master.zip. And neither will discover any links. |
This is seen when used against a Cisco Nexus 7000
$ mnet.py graph -r 10.108.18.4 -f test.png -d 2 -c mnet.conf
MNet Suite v0.8
Written by Michael Laforest mjlaforest@gmail.com
Diagram title: MNet Network Diagram
Out Catalog file: None
Traceback (most recent call last):
File "/usr/local/bin/mnet.py", line 198, in
main(sys.argv[1:])
File "/usr/local/bin/mnet.py", line 67, in main
graph(argv[1:])
File "/usr/local/bin/mnet.py", line 129, in graph
graph.crawl(opt_root_ip)
File "/usr/local/lib/python2.7/dist-packages/mnetsuite/graph.py", line 92, in crawl
n.query_node()
File "/usr/local/lib/python2.7/dist-packages/mnetsuite/node.py", line 485, in query_node
self._get_chassis_info()
File "/usr/local/lib/python2.7/dist-packages/mnetsuite/node.py", line 809, in _get_chassis_info
self.ios = self._format_ios_ver(self.ios)
File "/usr/local/lib/python2.7/dist-packages/mnetsuite/node.py", line 831, in _format_ios_ver
img_s = re.search('(Version:? |CCM:)([^ ,$]*)', img)
File "/usr/lib/python2.7/re.py", line 142, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
The text was updated successfully, but these errors were encountered: