I have an issue where I am attempting to schedule the cron entry and I am unable to get it working.
Everything works fine when running straight from console/SSH but not when scheduled. Here is the error log. I know I will get blasted but for sake of all things functional I am just attempting to run it as root, this is an internal server within private data center for a client.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Running netdbscraper on devices
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDBHelper.pm: ./NetDBHelper.pm: Permission denied at /opt/netdb/netdbscraper/netdbscraper.pl line 77.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/netdbscraper/netdbscraper.pl line 77.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 3463 intstatus entries in to switchstatus table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 2149 MAC entries in to switchports table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 191 neighbor discovery entries in to neighbor table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 3039 ARP Entries in to ipmac table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): NetDB update complete
root@nasubuntu:/#
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fixed it 30 minutes later, was actually related to me trying to run it via root's crontab instead of just running is as myself (normal user). Once I moved it to my crontab and specified full path of perl, all is well.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have an issue where I am attempting to schedule the cron entry and I am unable to get it working.
Everything works fine when running straight from console/SSH but not when scheduled. Here is the error log. I know I will get blasted but for sake of all things functional I am just attempting to run it as root, this is an internal server within private data center for a client.
Here is the current cron entry:
00,15,30,50 * * /usr/bin/perl /opt/netdb/netdbctl.pl -ud -a -m -nd > /dev/null
Wed Nov 13 23:30:01 2019: netdbctl(30257): Running netdbscraper on devices
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDBHelper.pm: ./NetDBHelper.pm: Permission denied at /opt/netdb/netdbscraper/netdbscraper.pl line 77.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/netdbscraper/netdbscraper.pl line 77.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 3463 intstatus entries in to switchstatus table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 2149 MAC entries in to switchports table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 191 neighbor discovery entries in to neighbor table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): Importing 3039 ARP Entries in to ipmac table
Wed Nov 13 23:30:01 2019: netdbctl(30257): Can't locate NetDB.pm: ./NetDB.pm: Permission denied at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): BEGIN failed--compilation aborted at /opt/netdb/updatenetdb.pl line 87.
Wed Nov 13 23:30:01 2019: netdbctl(30257): NetDB update complete
root@nasubuntu:/#
Fixed it 30 minutes later, was actually related to me trying to run it via root's crontab instead of just running is as myself (normal user). Once I moved it to my crontab and specified full path of perl, all is well.
Thanks