From the logs it’s looking like it’s failing to do a domain lookup on your switches. I assume myhostname.xxx.fr http://myhostname.xxx.fr/ is not the hostname of your switch. Do you have hostnames for your switches? If not, define some local ones in /etc/hosts and add them to the devicelist.csv file. See how that goes.
And see if any data shows up in /tmp/mac.txt. Crank the debug level up if not and post the results back here. I think you may still have IP/hostname issues.
Can you define a fully qualified domain here? The DNS code changed a while back, and while it was supposed to work fine with host records, DNS is throwing an error here. I would just add .something.com http://something.com/ to the end in your host file entry and see how that goes. The program was written with fully qualified domain names in mind, which seems to be the source of the issue according to the error.
Sorry to disturb you again :-( but I added the name on my DNS server... and it doesn't work. A little bit better --> Device: and fqdn: seems to be good.
netdbctl -ud -vv -u root
Tue Dec 9 17:31:47 2014: netdbctl(757): NetDB Debug Level: 3
Tue Dec 9 17:31:47 2014: netdbctl(757): Parsing Devices from Big Brother (optional)
Tue Dec 9 17:31:47 2014: netdbctl(757): Running netdbscraper on devices
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent spawning 20 processes with 0.5s delay
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(761): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d myswitch.mydomain.fr,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Tue Dec 9 17:31:48 2014: netdbctl(757): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to device myswitch.mydomain.fr
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to myswitch.mydomain.fr using SSH(1) Telnet(0)...
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent waiting on 0 processes to finish
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent Complete
Tue Dec 9 17:31:48 2014: netdbctl(757): NetDB update complete
Other ideas...
Ju
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I apologize for all the trouble, but you may be running in to an underlying library issue or something I’m not familiar with on CentOS or the latest perl libraries. I just ran another test on 1.13.1 to one of my devices with a strait IP address and don’t have any troubles with this:
I see that your perl install is in /usr/local/, did you do a custom Perl installation?
At this point it might get a bit messy to be honest. I did some searching and ran in to a lot of instances of the error on google, but they were all related to CPAN issues etc and I couldn’t find any definitive answer. I understand if you’re a CentOS user, but you might want to consider booting the latest Ubuntu image I provide in your ESX environment. It works out of the box and should fire right up without these issues.
Let me know about your Perl install and what you think.
Sorry to disturb you again :-( but I added the name on my DNS server... and it doesn't work. A little bit better --> Device: and fqdn: seems to be good.
netdbctl -ud -vv -u root
Tue Dec 9 17:31:47 2014: netdbctl(757): NetDB Debug Level: 3
Tue Dec 9 17:31:47 2014: netdbctl(757): Parsing Devices from Big Brother (optional)
Tue Dec 9 17:31:47 2014: netdbctl(757): Running netdbscraper on devices
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent spawning 20 processes with 0.5s delay
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(761): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d myswitch.mydomain.fr,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Tue Dec 9 17:31:48 2014: netdbctl(757): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to device myswitch.mydomain.fr
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to myswitch.mydomain.fr using SSH(1) Telnet(0)...
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent waiting on 0 processes to finish
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent Complete
Tue Dec 9 17:31:48 2014: netdbctl(757): NetDB update complete
Thank you Jonathan for your quick answer.
I'll check my perl librairies installation and keep you posted if I find out the issue.
Also try your ubuntu vm...
regars,
Ju
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I put "use diagnostics;" in the file "netdbscraper.pl" to have more error messages.
As you can see below "mydomain" appeared twice:
Net::DNS::Question::new('Net::DNS::Question', 'myswitch.mydomain.fr..mydomain.fr',
So, I modified my resolv.conf and my devices.list to strip the extra domain. It works like a charm.
Thank you so much for your help and your time.
regards,
Julien
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Awesome, I will remember that in the future and make it part of the debugging process. Sorry for all the trouble, but I’m glad it’s working for you now. The rest will hopefully be easy and strait-forward.
I put "use diagnostics;" in the file "netdbscraper.pl" to have more error messages.
As you can see below "mydomain" appeared twice:
Net::DNS::Question::new('Net::DNS::Question', 'myswitch.mydomain.fr..mydomain.fr',
So, I modified my resolv.conf and my devices.list to strip the extra domain. It works like a charm.
Hi,
After a fresh install, everything seems to be ok (No error log) but I see nothing inside the db.
My Technical environment :
- Netdb-1.13.1 fresh install.
- Vmware virtual machine.
- CentOS release 6.2 (Final).
- Linux kernel 2.6.32-220.el6.x86_64.
My Switches :
- cisco WS-C2960S-48TD-L IOS c2960s-universalk9-mz.150-1.SE2.bin
- cisco Nexus N5K-C5548UP NXOS n5000-uk9.6.0.2.N2.2.bin
Same results on both Switches -> Nothing in db.
My devicelist.csv during the NXOS test:
myhostname.xxx.fr,devtype=nxos
My Results :
My_User# netdbctl -ud -vv -u root
Thu Dec 4 08:28:22 2014: netdbctl(14219): NetDB Debug Level: 3
Thu Dec 4 08:28:22 2014: netdbctl(14219): Parsing Devices from Big Brother (optional)
Thu Dec 4 08:28:22 2014: netdbctl(14219): Running netdbscraper on devices
Thu Dec 4 08:28:22 2014: netdbctl(14219): netdbscraper.pl(14222): Parent spawning 20 processes with 0.5s delay
Thu Dec 4 08:28:22 2014: netdbctl(14219): |DEBUG|: Device: myhostname, fqdn: myhostname.xxx.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 08:28:22 2014: netdbctl(14219): |DEBUG|: Device: myhostname, fqdn: myhostname.xxx.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 08:28:22 2014: netdbctl(14219): netdbscraper.pl(14223): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d myhostname.xxx.fr,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Thu Dec 4 08:28:22 2014: netdbctl(14219): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Thu Dec 4 08:28:22 2014: netdbctl(14219): |DEBUG|: Device: myhostname, fqdn: myhostname.xxx.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 08:28:22 2014: netdbctl(14219): nxosscraper.pl(14224): Connecting to device myhostname.xxx.fr
Thu Dec 4 08:28:22 2014: netdbctl(14219): nxosscraper.pl(14224): Connecting to myhostname.xxx.fr using SSH(1) Telnet(0)...
Thu Dec 4 08:28:22 2014: netdbctl(14219): netdbscraper.pl(14222): Parent waiting on 0 processes to finish
Thu Dec 4 08:28:22 2014: netdbctl(14219): netdbscraper.pl(14222): Parent Complete
Thu Dec 4 08:28:22 2014: netdbctl(14219): NetDB update complete
My_User# netdbctl -a -m -u root -debug 3
Thu Dec 4 08:28:57 2014: netdbctl(14234): NetDB Debug Level: 3
Thu Dec 4 08:28:57 2014: netdbctl(14234): Parsing Devices from Big Brother (optional)
Thu Dec 4 08:28:57 2014: netdbctl(14234): Importing 1 intstatus entries in to switchstatus table
Thu Dec 4 08:28:58 2014: netdbctl(14234): NetDB Library Debug Level: 1
Thu Dec 4 08:28:58 2014: netdbctl(14234): Switch Status Table Empty, nothing to import
Thu Dec 4 08:28:58 2014: netdbctl(14234): Importing 1 MAC entries in to switchports table
Thu Dec 4 08:28:58 2014: netdbctl(14234): NetDB Library Debug Level: 1
Thu Dec 4 08:28:58 2014: netdbctl(14234): MAC Table Empty, nothing to import
Thu Dec 4 08:28:58 2014: netdbctl(14234): Importing 1 ARP Entries in to ipmac table
Thu Dec 4 08:28:59 2014: netdbctl(14234): NetDB Library Debug Level: 1
Thu Dec 4 08:28:59 2014: netdbctl(14234): ARP Table Empty, nothing to import
Thu Dec 4 08:28:59 2014: netdbctl(14234): NetDB update complete
My_User# netdb -st
NetDB Statistics
MAC Entries: 0
ARP Entries: 0
Switch Entries: 0
WiFi Entries: 0
Status Entries: 0
Registrations: 0
DB Transactions: 3
Total Rows in DB: 3
If anyone could help me ? :-)
regards,
Ju
Jumah,
From the logs it’s looking like it’s failing to do a domain lookup on your switches. I assume myhostname.xxx.fr http://myhostname.xxx.fr/ is not the hostname of your switch. Do you have hostnames for your switches? If not, define some local ones in /etc/hosts and add them to the devicelist.csv file. See how that goes.
Jonathan
Thank you for your answer, Jonathan.
Unfortunately, I have tried another tests... same results:
Test 1/ IP directly in devicelist.csv
[My_User@My_Server]# netdbctl -ud -vv -u root
Thu Dec 4 17:44:07 2014: netdbctl(3926): NetDB Debug Level: 3
Thu Dec 4 17:44:07 2014: netdbctl(3926): Parsing Devices from Big Brother (optional)
Thu Dec 4 17:44:07 2014: netdbctl(3926): Running netdbscraper on devices
Thu Dec 4 17:44:07 2014: netdbctl(3926): netdbscraper.pl(3929): Parent spawning 20 processes with 0.5s delay
Thu Dec 4 17:44:07 2014: netdbctl(3926): |DEBUG|: Device: 55, fqdn: 10.10.10.10, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:07 2014: netdbctl(3926): |DEBUG|: Device: 55, fqdn: 10.10.10.10, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:07 2014: netdbctl(3926): netdbscraper.pl(3930): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d 10.10.10.10,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Thu Dec 4 17:44:07 2014: netdbctl(3926): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Thu Dec 4 17:44:07 2014: netdbctl(3926): |DEBUG|: Device: 55, fqdn: 10.10.10.10, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:07 2014: netdbctl(3926): nxosscraper.pl(3931): Connecting to device 10.10.10.10
Thu Dec 4 17:44:07 2014: netdbctl(3926): nxosscraper.pl(3931): Connecting to 10.10.10.10 using SSH(1) Telnet(0)...
Thu Dec 4 17:44:07 2014: netdbctl(3926): netdbscraper.pl(3929): Parent waiting on 0 processes to finish
Thu Dec 4 17:44:07 2014: netdbctl(3926): netdbscraper.pl(3929): Parent Complete
Thu Dec 4 17:44:07 2014: netdbctl(3926): NetDB update complete
Test 2/ Switch Hostname added in my /etc/hosts file and in the devicelist.csv
[My_User@My_Server]# netdbctl -ud -vv -u root
Thu Dec 4 17:44:33 2014: netdbctl(3944): NetDB Debug Level: 3
Thu Dec 4 17:44:33 2014: netdbctl(3944): Parsing Devices from Big Brother (optional)
Thu Dec 4 17:44:33 2014: netdbctl(3944): Running netdbscraper on devices
Thu Dec 4 17:44:34 2014: netdbctl(3944): netdbscraper.pl(3947): Parent spawning 20 processes with 0.5s delay
Thu Dec 4 17:44:34 2014: netdbctl(3944): |DEBUG|: Device: SWITCH_HOSTNAME, fqdn: SWITCH_HOSTNAME, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:34 2014: netdbctl(3944): |DEBUG|: Device: SWITCH_HOSTNAME, fqdn: SWITCH_HOSTNAME, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:34 2014: netdbctl(3944): netdbscraper.pl(3948): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d SWITCH_HOSTNAME,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Thu Dec 4 17:44:34 2014: netdbctl(3944): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Thu Dec 4 17:44:34 2014: netdbctl(3944): |DEBUG|: Device: SWITCH_HOSTNAME, fqdn: SWITCH_HOSTNAME, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Thu Dec 4 17:44:34 2014: netdbctl(3944): nxosscraper.pl(3949): Connecting to device SWITCH_HOSTNAME
Thu Dec 4 17:44:34 2014: netdbctl(3944): nxosscraper.pl(3949): Connecting to SWITCH_HOSTNAME using SSH(1) Telnet(0)...
Thu Dec 4 17:44:34 2014: netdbctl(3944): netdbscraper.pl(3947): Parent waiting on 0 processes to finish
Thu Dec 4 17:44:34 2014: netdbctl(3944): netdbscraper.pl(3947): Parent Complete
Thu Dec 4 17:44:34 2014: netdbctl(3944): NetDB update complete
Results :
[My_User@My_Server]# netdb -st
NetDB Statistics
MAC Entries: 0
ARP Entries: 0
Switch Entries: 0
WiFi Entries: 0
Status Entries: 0
Registrations: 0
DB Transactions: 3
Total Rows in DB: 3
I am not currently logged in my server with the root user ? Maybe a problem ?
Regards,
Ju
Jumah,
It looks like there are still IP addresses instead of hostnames in there.
In /etc/hosts, add this:
10.10.10.10 test-switch test-switch
Then try this: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d test-switch,devtype=nxos -conf /etc/netdb.conf -om /tmp/mac.txt
And see if any data shows up in /tmp/mac.txt. Crank the debug level up if not and post the results back here. I think you may still have IP/hostname issues.
Thanks
Hi,
I added to /etc/hosts @my_switch_IP test-switch
A ping to test-switch is successful from my vm.
Below the command result:
[My_User@My_Server]# /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d test-switch,devtype=nxos -conf /etc/netdb.conf -om /tmp/mac.txt
|DEBUG|: Device: test-switch, fqdn: test-switch, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
nxosscraper.pl(7731): Connecting to device test-switch
nxosscraper.pl(7731): Connecting to test-switch using SSH(1) Telnet(0)...
empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
No more messages with the debug level 5.
Nothing displayed on my tcpdump capture from the vm to @my_switch_IP.
Nothing on the /tmp/mac.txt file.
Find attached my netdb.conf. Maybe an error inside.
Thank you for your help.
Ju
Can you define a fully qualified domain here? The DNS code changed a while back, and while it was supposed to work fine with host records, DNS is throwing an error here. I would just add .something.com http://something.com/ to the end in your host file entry and see how that goes. The program was written with fully qualified domain names in mind, which seems to be the source of the issue according to the error.
Thanks,
Jonathan
Hi Jonathan,
Sorry to disturb you again :-( but I added the name on my DNS server... and it doesn't work. A little bit better --> Device: and fqdn: seems to be good.
netdbctl -ud -vv -u root
Tue Dec 9 17:31:47 2014: netdbctl(757): NetDB Debug Level: 3
Tue Dec 9 17:31:47 2014: netdbctl(757): Parsing Devices from Big Brother (optional)
Tue Dec 9 17:31:47 2014: netdbctl(757): Running netdbscraper on devices
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent spawning 20 processes with 0.5s delay
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(761): Child executing: /opt/netdb/netdbscraper/nxosscraper.pl -debug 3 -d myswitch.mydomain.fr,devtype=nxos,devtype=nxos -conf /etc/netdb.conf -pn
Tue Dec 9 17:31:48 2014: netdbctl(757): empty domain label at /usr/local/lib64/perl5/Net/DNS/Question.pm line 80
Tue Dec 9 17:31:48 2014: netdbctl(757): |DEBUG|: Device: myswitch, fqdn: myswitch.mydomain.fr, mac: 1, wifi: , arp: , vrfs: , ipv6: , devtype: nxos, authgroup:
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to device myswitch.mydomain.fr
Tue Dec 9 17:31:48 2014: netdbctl(757): nxosscraper.pl(762): Connecting to myswitch.mydomain.fr using SSH(1) Telnet(0)...
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent waiting on 0 processes to finish
Tue Dec 9 17:31:48 2014: netdbctl(757): netdbscraper.pl(760): Parent Complete
Tue Dec 9 17:31:48 2014: netdbctl(757): NetDB update complete
Other ideas...
Ju
Ju,
I apologize for all the trouble, but you may be running in to an underlying library issue or something I’m not familiar with on CentOS or the latest perl libraries. I just ran another test on 1.13.1 to one of my devices with a strait IP address and don’t have any troubles with this:
/opt/netdb/netdbscraper/iosscraper.pl -d 172.31.1.29 -om /tmp/mac.txt
I see that your perl install is in /usr/local/, did you do a custom Perl installation?
At this point it might get a bit messy to be honest. I did some searching and ran in to a lot of instances of the error on google, but they were all related to CPAN issues etc and I couldn’t find any definitive answer. I understand if you’re a CentOS user, but you might want to consider booting the latest Ubuntu image I provide in your ESX environment. It works out of the box and should fire right up without these issues.
Let me know about your Perl install and what you think.
Thanks
Thank you Jonathan for your quick answer.
I'll check my perl librairies installation and keep you posted if I find out the issue.
Also try your ubuntu vm...
regars,
Ju
Hi jonathan,
It's solved !!!
I put "use diagnostics;" in the file "netdbscraper.pl" to have more error messages.
As you can see below "mydomain" appeared twice:
Net::DNS::Question::new('Net::DNS::Question', 'myswitch.mydomain.fr..mydomain.fr',
So, I modified my resolv.conf and my devices.list to strip the extra domain. It works like a charm.
Thank you so much for your help and your time.
regards,
Julien
Awesome, I will remember that in the future and make it part of the debugging process. Sorry for all the trouble, but I’m glad it’s working for you now. The rest will hopefully be easy and strait-forward.
Regards,
Jonathan