Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Aug 17, 2018 12:20 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Tue Apr 17, 2018 6:38 pm 
Offline

Joined: Mon Feb 23, 2009 12:15 pm
Posts: 31
OS: CentOS 7
Cacti : 1.1.37
MACTrack: 4.2
--------------

Just got MACTrack (re)installed after Cacti upgrade (1.1.35 -> 1.1.37) and getting following errors.
Could anyone help me get this running?
Many thanks in advance..

2018/04/17 16:30:44 - ERROR PHP WARNING: Missing argument 24 for api_device_save(), called in /usr/share/cacti/plugins/mactrack/mactrack_actions.php on line 158 and defined in file: /usr/share/cacti/lib/api_device.php on line: 169
2018/04/17 16:30:44 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_devices.php: 44 form_mactrack_save)(/plugins/mactrack/mactrack_devices.php: 95 api_mactrack_device_save)(/plugins/mactrack/mactrack_actions.php: 69 sync_mactrack_to_cacti)(/plugins/mactrack/mactrack_actions.php: 158 api_device_save)(/lib/api_device.php: 169 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/04/17 16:30:44 - ERROR PHP NOTICE: Undefined variable: device_threads in file: /usr/share/cacti/lib/api_device.php on line: 233
2018/04/17 16:30:44 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_devices.php: 44 form_mactrack_save)(/plugins/mactrack/mactrack_devices.php: 95 api_mactrack_device_save)(/plugins/mactrack/mactrack_actions.php: 69 sync_mactrack_to_cacti)(/plugins/mactrack/mactrack_actions.php: 158 api_device_save)(/lib/api_device.php: 233 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/04/17 16:30:45 - ERROR PHP ERROR: Call to undefined function api_data_source_cache_crc_update() in file: /usr/share/cacti/lib/utility.php on line: 658
2018/04/17 16:30:45 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4628 cacti_debug_backtrace)


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Tue Apr 17, 2018 9:02 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 153
I'm running exactly the same versions without any issues.

I had MT installed from 1.1.21 and been upgrading Cacti without actually reinstalling MT so not sure about the setup part of it.

Sounds more like cacti related. When do you get that msg? right after installing it? or while trying to add/edit devices, etc?

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 3:57 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1326
Parameter 24 is the number of device threads. It would appear that MacTrack has been broken in this regard for some time as its never passed that parameter.

I've checked the history of api_device_save() in lib/api_device.php and it's not changed in a year or more.
I've also checked the history of mactrack_api_device_save() in mactrack_actions.php and it's not changed since 2016!

So, could you do me a favour and report this over on https://github.com/cacti/plugin_mactrack/issues

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 1:19 pm 
Offline

Joined: Mon Feb 23, 2009 12:15 pm
Posts: 31
Issue has been open opened at GitHub...

In the mean time if there is anyone who found a walk around and post it, it will be much appreciated.

Regards,


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 1:29 pm 
Offline

Joined: Mon Feb 23, 2009 12:15 pm
Posts: 31
Pucho wrote:
I'm running exactly the same versions without any issues.

I had MT installed from 1.1.21 and been upgrading Cacti without actually reinstalling MT so not sure about the setup part of it.

Sounds more like cacti related. When do you get that msg? right after installing it? or while trying to add/edit devices, etc?


Thanks and may be it is due to Cacti upgrade that was done.

I don't think I had that error when I installed MACTrack on 1.1.35 recently.
It is just after the upgrade to 1.1.37, I found all the plugins installed were gone and had to re-install them.
I began to see this error after this Cacti upgrade, plugin re-install.
BTW, the upgrade was done by yum... and I would see this error(cacti.log) when I try to configure and save a device in Device Tracking.

Regards,


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 1:59 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1326
The plugins were disabled I would imagine not uninstalled. Cacti does not uninstall a plugin automatically only disables them. If a package manager removed a plugin folder, that's beyond cacti's remit but you shouldn't have lost any data.

I will double check the 1.1.35 release and see if the same issue persists. It may be that changes to the error handlers is what is now showing up the issue where previously it was hidden.

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 2:01 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1326
So I've checked 1.1.35 and that should have had exactly the same issue. It expects device threads, which mactrack isn't providing. I will have to double check the mactrack code tomorrow and see if it can provide that, otherwise it'll have to default it to 1.

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: ERROR PHP WARNING: Missing argument 24 for...
PostPosted: Wed Apr 18, 2018 5:22 pm 
Offline

Joined: Mon Feb 23, 2009 12:15 pm
Posts: 31
netniV wrote:
So I've checked 1.1.35 and that should have had exactly the same issue. It expects device threads, which mactrack isn't providing. I will have to double check the mactrack code tomorrow and see if it can provide that, otherwise it'll have to default it to 1.


If this helps in any way....

I went back and searched for the "Missing argu..." from older(prior to upgrade) log files which did not yield any.
It only begins to appear after the upgrade.

Regards,


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group