mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mohammadramadan
Posts: 42
Joined: Sun Nov 20, 2016 3:55 am

mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by mohammadramadan »

Hello,
I am in the middle of my new setup of cacti 1.2.24, every thing going well but i am having now an issue with the mactrack plugin.
I have setup all requirements and when I scan the site manually, it woks but down in the window it always say "Next Run Time: 1970-01-01 00:10:00" , the scan task didn't start at all in its time "only when I scan the site manually".
in the log tab I have received this logs ...
--------------
2023-08-12 19:27:07 - CMDPHP PHP ERROR Backtrace: (/plugins/mactrack/mactrack_view_sites.php[36]:mactrack_view_sites(), /plugins/mactrack/mactrack_view_sites.php[332]:mactrack_display_stats(), /plugins/mactrack/lib/mactrack_functions.php[3128]:strtotime(), CactiErrorHandler())
2023-08-12 19:27:07 - ERROR PHP DEPRECATED in Plugin 'mactrack': strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in file: /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line: 3128
2023-08-12 19:27:07 - CMDPHP PHP ERROR Backtrace: (/plugins/mactrack/mactrack_view_sites.php[36]:mactrack_view_sites(), /plugins/mactrack/mactrack_view_sites.php[332]:mactrack_display_stats(), /plugins/mactrack/lib/mactrack_functions.php[3128]:strtotime(), CactiErrorHandler())
2023-08-12 19:27:07 - ERROR PHP DEPRECATED in Plugin 'mactrack': strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in file: /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line: 3128
2023-08-12 19:27:06 - CMDPHP PHP ERROR Backtrace: (/plugins/mactrack/mactrack_view_sites.php[36]:mactrack_view_sites(), /plugins/mactrack/mactrack_view_sites.php[332]:mactrack_display_stats(), /plugins/mactrack/lib/mactrack_functions.php[3128]:strtotime(), CactiErrorHandler())
2023-08-12 19:27:06 - ERROR PHP DEPRECATED in Plugin 'mactrack': strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in file: /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line: 3128
2023-08-12 19:26:53 - SYSTEM MACTRACK: Site scan 'DC', by 'Administrator(admin)'
--------------------------

kindly what could my problem is and how to solve it? I am using mactrack 4.6 from the github
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by Osiris »

Looks like a more recent release of PHP where the type checking rules are much more strick. You should open a ticket on GitHub.
Before history, there was a paradise, now dust.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by TheWitness »

Looks like an old MacTrack. If you are running a fairly recent version of Cacti, use the latest 'develop' of MacTrack. xmacan is working on a new version that I will help with.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
mohammadramadan
Posts: 42
Joined: Sun Nov 20, 2016 3:55 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by mohammadramadan »

Hi Bro,
Firstly thank you so much.
I wanted to tell you that this mactrack is the github downloaded version of the code 4.6.
plus I wanted to tell you that, so funny when loggen in today I found it looks normal and the 1970 issue gone with no error logs related as previously mentiond "Scanning Rate: Every 15 Minutes, Status: Idle, LastRuntime: 0.0 seconds, Processes: 0 processes, Devices: 0, Next Run Time: 2023-08-13 05:45:02".

but received warning of delayed unsynced poller.."2023-08-13 05:20:01 - POLLER: Poller[Main Poller] PID[1288] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 599.6 seconds have passed since the last poll! ".

what do you think I need to take an action regarding the old and the new logs? "check attached please".
Attachments
new log.PNG
new log.PNG (89.7 KiB) Viewed 772 times
Ok_DateTime.PNG
Ok_DateTime.PNG (16.59 KiB) Viewed 776 times
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by Osiris »

I use Cactid. It's a systemd service vs Cron. The poller gap was likely experience right when you made your changes. I wouldn't worry about it.
Before history, there was a paradise, now dust.
mohammadramadan
Posts: 42
Joined: Sun Nov 20, 2016 3:55 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by mohammadramadan »

Hello ,
now I got this change, scan process stucked about 3 hours now and may be more for the second time with this attached message in the image.
why that happen and just work again by it self, and what id this max duration time ??? this getting me crazy.
Attachments
scan stuck.PNG
scan stuck.PNG (34.85 KiB) Viewed 702 times
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by Osiris »

What's going on on the command line? Could be the resolver taking time.
Before history, there was a paradise, now dust.
mohammadramadan
Posts: 42
Joined: Sun Nov 20, 2016 3:55 am

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by mohammadramadan »

How do you want me to test the command line?
User avatar
macan
Cacti Guru User
Posts: 1159
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by macan »

php /path/to/cacti/plugin/mactrack/poller_mactrack.php --debug

Or You can try run it manually for every host
Device tracking -> devices -> choose any and in address will be .... action=edit&device_id=X

X is what we are looking for

try to run (change X with your id)
php /path/to/cacti/plugin/mactrack/mactrack_scanner.php -debug -id=X
Let the Cacti grow!
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: mactrack date always on "Next Run Time: 1970-01-01 00:10:00"

Post by TheWitness »

Run is with the --help option.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest