netbox-device-autodiscovery
netbox-device-autodiscovery copied to clipboard
[ERROR] A critical error occurred while scanning the network, stopping
Hi Drygdryg,
I'm tried to use your script to discovery my network device without luck. Could you help me?
2022-05-13 15:06:20,393 {/opt/netbox/scripts/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:61} [DEBUG] vCenter IP addresses to exclude from scan: []
2022-05-13 15:06:20,415 {/opt/netbox/scripts/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:87} [INFO] Network scanning started
2022-05-13 15:06:20,416 {/opt/netbox/scripts/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:88} [DEBUG] Scan targets: ['172.16.232.0/24']
2022-05-13 15:06:20,416 {/opt/netbox/scripts/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:89} [DEBUG] Nmap arguments: ['-sS', '-O', '--osscan-guess', '-T4', '-n']
2022-05-13 15:08:04,016 {/opt/netbox/scripts/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:67} [ERROR] A critical error occurred while scanning the network, stopping
2022-05-13 15:08:04,017 {run.py:223} [WARNING] Execution of the module "nmap_network_scanner" yielded no results
2022-05-13 15:08:04,017 {run.py:236} [INFO] Initialized deletion of orphaned NetBox objects
2022-05-13 15:08:04,039 {run.py:239} [INFO] Initiated deletion of ip_addresses objects from NetBox
2022-05-13 15:08:04,070 {run.py:251} [INFO] Finished deletion of ip_addresses objects from NetBox
2022-05-13 15:08:04,070 {run.py:239} [INFO] Initiated deletion of interfaces objects from NetBox
2022-05-13 15:08:04,118 {run.py:251} [INFO] Finished deletion of interfaces objects from NetBox
2022-05-13 15:08:04,118 {run.py:239} [INFO] Initiated deletion of devices objects from NetBox
2022-05-13 15:08:04,205 {run.py:251} [INFO] Finished deletion of devices objects from NetBox
2022-05-13 15:08:04,205 {run.py:239} [INFO] Initiated deletion of device_types objects from NetBox
2022-05-13 15:08:04,234 {run.py:251} [INFO] Finished deletion of device_types objects from NetBox
2022-05-13 15:08:04,234 {run.py:253} [INFO] Setting primary IP addresses for devices…
Thanks in advanced
First, make sure that you run the script as root. Try running nmap with the specified arguments manually:
sudo nmap -sS -O --osscan-guess -T4 -n 172.16.232.0/24
I am getting the same error. I tried running the command manually and it worked fine directly in nmap.