Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] cacti failed on perl-perfSONAR_PS-Toolkit-3.3.2-13.psPS

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] cacti failed on perl-perfSONAR_PS-Toolkit-3.3.2-13.psPS


Chronological Thread 
  • From: Jason Zurawski <>
  • To: Zhi-Wei Lu <>, Kevin Kawaguchi <>
  • Cc:
  • Subject: Re: [perfsonar-user] cacti failed on perl-perfSONAR_PS-Toolkit-3.3.2-13.psPS
  • Date: Fri, 11 Apr 2014 14:39:15 -0400

Hey Zhi-Wei/Kevin;

Being that cacti is an external product I am not sure we can offer any more
positive suggestions on how to proceed. At this stage you may have more luck
asking on the cacti mailing list.

There are two SQL files on the host that would be valuable to look at if you
do decide to do a manual add of tables:

> /opt/perfsonar_ps/toolkit/scripts/cacti_toolkit_init.sql
> /opt/perfsonar_ps/toolkit/web/root/admin/cacti/cacti.sql


The first is what our scripts create (and we will file a bug to modify this),
and the second is what ships with the 0.8.8b version of cacti. This second
one probably has the definitions to create the missing tables, these were
added to my instance when I ran the script:

> plugin_config
> plugin_db_changes
> plugin_hooks
> plugin_realms


I suppose the other alternative is to downgrade to a version of cacti that
doesn't have the plugin architecture (0.8.7 most likely).

Thanks, and sorry we can't help you fully resolve this;

-jason

On Apr 11, 2014, at 2:26 PM, Zhi-Wei Lu
<>
wrote:

> Hi Jason,
>
> The upgrade script didn't work, it gave many warning messages, and it says
> that your cacti is already up to date.
>
> PHP Warning: date(): It is not safe to rely on the system's timezone
> settings. You are *required* to use the date.timezone settin\
> g or the date_default_timezone_set() function. In case you used any of
> those methods and you are still getting this warning, you m\
> ost likely misspelled the timezone identifier. We selected
> 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /opt/perfsonar_ps/t\
> oolkit/web/root/admin/cacti/lib/functions.php on line 486
>
> Your Cacti is already up to date.
>
> We might have to manually adding those missing tables in, but the existing
> tables could be altered as well.
>
>
> Zhi-Wei Lu
> IET-CR-Network Operations Center
> University of California, Davis
> (530) 752-0155
>
> -----Original Message-----
> From: Jason Zurawski
> [mailto:]
>
> Sent: Friday, April 11, 2014 6:40 AM
> To: Zhi-Wei Lu; Kevin Kawaguchi
> Cc:
>
> Subject: Re: [perfsonar-user] cacti failed on
> perl-perfSONAR_PS-Toolkit-3.3.2-13.psPS
>
> Hey Zhi-Wei/Kevin;
>
> From reading online documentation, version 0.8.8 of CACTI now includes the
> Plugin Architecture directly as you note. It appears there is a database
> upgrade script that can be run to add the new tables. I tried this on a
> local instance, but I didn't have any historical data:
>
>> php
>> /opt/perfsonar_ps/toolkit/web/root/admin/cacti/cli/upgrade_database.php
>
>
> I would recommend before trying this to make a mysql backup (note, below
> command may need a -u or -p option supplied, depending on what the
> permissions of the database are):
>
>> mysqldump -l --add-drop-table cacti > mysql.cacti
>
> Let us know if this works, and we can file a bug to improve our database
> upgrade scripts.
>
> Thanks;
>
> -jason
>
> On Apr 11, 2014, at 3:04 AM, Zhi-Wei Lu
> <>
> wrote:
>
>> Hi Jason,
>>
>> I went back to the source rpm and perfSONAR_PS-Toolkit-3.3.1.1.tar.gz
>> introduces extra plugin_hooks tables (and other tables) while
>> perfSONAR_PS-Toolkit-3.3.1.tar.gz didn't have those tables!
>>
>>
>> On 04/10/2014 11:24 PM, Zhi-Wei Lu wrote:
>>> Hi Jason,
>>>
>>> The mysql database for cacti is actually clean, I can query the database
>>> either as user "root" or "cacti", but the cacti database built from the
>>> previous version of perfSonar is incompatible with the current version.
>>> table plugin_hooks along with many other tables required in the current
>>> version do not exist in the previous version.
>>>
>>> On 04/10/2014 04:52 PM, Jason Zurawski wrote:
>>>> Hey Zhi-Wei/Kevin;
>>>>
>>>> This is just a guess - but maybe mysql needs to have a repair done?
>>>> Some forums I read on the cacti web site seem to indicate that is a good
>>>> first thing to try:
>>>>
>>>>> mysqlcheck -u aaa -p --auto-repair --optimize --all-databases
>>>>
>>>> Let us know if that has any positive impact;
>>>>
>>>> Thanks;
>>>>
>>>> -jason
>>>>
>>>> On Apr 10, 2014, at 7:25 PM, Zhi-Wei Lu
>>>> <>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>> We recently update our system to the latest perfSonar version using
>>>>> "yum update" last week and rebooted system. We noticed that today
>>>>> that our cacti environment failed since our last reboot.
>>>>> There are tons of error message such as the following in the log file:
>>>>> 04/10/2014 03:02:37 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!,
>>>>> Error:'1146', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM
>>>>> plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON
>>>>> pc.directory=ph.name WHERE ph.status = 1 AND hook = 'config_arrays'
>>>>> AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id,
>>>>> ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN
>>>>> plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND
>>>>> hook = 'config_arrays' AND ph.name NOT IN ('settings', 'boost',
>>>>> 'dsstats') ORDER BY id ASC"
>>>>> Upon investigating the issue, we noticed that
>>>>> /opt/perfsonar_ps/toolkit/web/root/admin/cacti/cacti.sql
>>>>> has all the definitions of the missing SQL tables, but our current
>>>>> /var/lib/mysql/cacti does not have the proper table.
>>>>> Apparently, this current version if cacti is different from the
>>>>> previous version from the perfSonar packages, what is the proper way to
>>>>> upgrade the mysql cacti database to be consistent with the current
>>>>> version. We would like to keep our previous data if it is possible.
>>>>> Thank you very much for your help.
>>>>> Zhi-Wei Lu
>>>>> IET-CR-Network Operations Center
>>>>> University of California, Davis
>>>>> (530) 752-0155



Archive powered by MHonArc 2.6.16.

Top of Page