-
-
Notifications
You must be signed in to change notification settings - Fork 16
FAQ
On this chapter, you will find a compilation of errors that may occur while using NetDoc.
The ingestion process may fail if NetDoc encounters an unknown situation. To investigate, navigate to Other -> Jobs and check if any NetDoc.Ingest job has failed.
Example:
| Line | Level | Message |
|---|---|---|
| 32 | Info | Ingesting log 255 with command show interfaces switchport on device 172.25.82.48 via netmiko_cisco_ios |
| 33 | Failure | An exception occurred: ValueError: Invalid interface mode ??? (10) |
In the above error, the log 255 fails because ??? represents an invalid interface mode. For further information, refer to this page.
To debug the ingestion phase, consider to export and import logs in a development NetDoc instance. Refers to:
-
scripts/log_import.pyto import previously exported logs. -
scripts/log_ingest.pyto (re) ingest one or more logs.
Nornir inventory is empty
The Nornir inventory does not contain any discoverable devices.
To resolve this, go to NetDoc -> Discoverables and ensure that the desired devices are configured with discoverable = True.
An exception occurred: ValueError: Invalid interface mode ??? (10)
Traceback (most recent call last):
File "/Users/dainese/src/netbox/netbox/extras/scripts.py", line 476, in _run_script
script.output = script.run(data=data, commit=commit)
File "/Users/dainese/src/netbox/netbox/scripts/NetDoc.py", line 290, in run
log_ingest(log)
File "/Users/dainese/src/netdoc/netdoc/utils.py", line 373, in log_ingest
module.ingest(log)
File "/Users/dainese/src/netdoc/netdoc/ingestors/netmiko_cisco_ios_show_interfaces_switchport.py", line 19, in ingest
mode = utils.normalize_interface_mode(item.get("mode"))
File "/Users/dainese/src/netdoc/netdoc/utils.py", line 494, in normalize_interface_mode
raise ValueError(f"Invalid interface mode {mode}")
ValueError: Invalid interface mode ??? (10)
The interface mode is processed by normalize_interface_mode(). To address this issue, open an issue on NetDoc repository, attaching the log. Visit NetDoc issues.
An exception occurred: IntegrityError: Multiple neighbors on SWITCH5:GigabitEthernet0/3 (gi0/3) or VIOS4:GigabitEthernet0/0 (gi0/0)
Based on CDP and LLDP information, multiple neighbors are detected on a single interface. NetDoc may encounter situations where it identifies more than one neighbor connected to a wire. By default, NetDoc raises an exception in such cases. To bypass the exception, set both RAISE_ON_CDP_FAIL and RAISE_ON_LLDP_FAIL to False. Alternatively, you can skip CDP and/or LLDP commands while starting a discovery Job.
Parsing is currenlty demanded to NTC templates.
To debug the parsing phase, consider to export and import logs in a development NetDoc instance. Refers to:
-
scripts/log_parse_ntc.pyto parse logs directly using NTC templates (useful to debug or add NTC templates). -
scripts/log_parse.pyto parse logs via NetDoc.
Jun 25 13:07:00 netbox python3[2106]: rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (300 seconds)
It means that the Django RQ job has surpassed the timeout value specified in the configuration file. Edit your configuration.py file and increase:
RQ_DEFAULT_TIMEOUT = 600
Alternatively, skip commands as described below.
In large environments, ingesting routes, ARP tables, and MAC address tables can be time-consuming. To skip specific discovery commands, use discovery scripts (Other -> Scripts -> NetDoc) and:
- add keywords separated by commas as filter (e.g. "mac,route,arp");
- set
Filter excludeto exclude commands matching the filter (deny list).
If you have 404 errors while loading network diagramas, you need to rebuild the static file repository as following:
/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py collectstatic
There is an incompatibility between the latest RQ version and NetBox 3.4.10:
Jul 25 16:47:19 netbox python3[2334]: ImportError: cannot import name 'use_connection' from 'rq' (/opt/netbox/venv/lib/python3.9/site-packages/rq/__init__.py)
Install RQ 1.13.0: pip install rq==1.13.0 and eventually update local_requirements.txt.
NetDoc is based on a lot of components: Nornir and Netmiko (connection), NTC Templates (parsing), NetDoc (data normalization and ingestion). To debug go through the following steps:
- Go to NetDoc -> Logs and check, in order, for logs which have Success = ✘, Parsed = ✘, Ingested = ✘.
- Open a specific log and check raw output and parsed output.
- Use the violet button on the top-right corner, in the log view page to export the log and send it to me.