cacti 0.8.7e to 0.8.7g upgrade - 'new database' error

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

Moderators: Developers, Moderators

cluckduck
Posts: 5
Joined: Sat Dec 08, 2007 5:39 pm
Location: Canberra AU

cacti 0.8.7e to 0.8.7g upgrade - 'new database' error

Post by cluckduck »

Hi,

I'm trying to upgrade from 0.8.7e to 0.8.7g. I have followed the instructions at:

http://docs.cacti.net/manual:087:1_inst ... ding_cacti

..everything seems to be fine until I go to access the web interface. I am redirected to /cacti/install and am greeted with the following message:

Code: Select all

Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u cactiuser -p cactiprod < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
I did not take the error message's advice as that seems to be a bad idea.

I moved the cacti 0.8.7e directory hierarchy back into place and everything seems to be fine again.

- I made sure the permissions were good on the rra/ and log/ sub-directories in the 0.8.7g directory hierarchy.
- I made sure I migrated the include/config.php settings over.
- I made sure I copied the rra/* files over.

Any clues?

Cheers!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please make sure, that your include/config.php is setup correctly. See http://forums.cacti.net/viewtopic.php?t=38492 for details related to 087g (I will have to upgrade the docs you were referring to)
R.
cluckduck
Posts: 5
Joined: Sat Dec 08, 2007 5:39 pm
Location: Canberra AU

Post by cluckduck »

Hi gandalf,

Hmm, which specific 087g config.php change are you referring to? The PIA-related ones?

I didn't actually copy over my 087e config.php because I sdiff'd the two and the only difference was some stuff in the license thing at the top, and, of course, my 'cactiuser' password. So, I just updated the things in the 087g bundled config.php, copied the rra/ contents, set some filesystem permissions and moved on.

I have not previously installed the PIA or any separate plug-ins -- the only config.php references I can find in the thread you linked was for PIA.

FWIW my cacti database name is 'cactiprod', not 'cacti', just in case that turns out to be a problem.

cheers!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cluckduck wrote:Hi gandalf,

Hmm, which specific 087g config.php change are you referring to? The PIA-related ones?
Yes.
I'm not that sure, that the "url_path" thingy is not related, though.
R.
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

I have the same problem, I followed the same upgrade procedure since 2 years and with 0.8.7g, i have the same error.
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

remsad wrote:I have the same problem, I followed the same upgrade procedure since 2 years and with 0.8.7g, i have the same error.

If I change my credentials within config.php, I'm getting the error :

FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'


So, I can see that the Mysql Credentials are correcy
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

From a different thread, I suspect an issue with config.php.
Please see config.php.dist provided by 087g to find the new format. Copy that to config.php and edit to match your current installation.

If I'm mistaken, please post config.php (removing credentials before posting)
R.
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

gandalf wrote:From a different thread, I suspect an issue with config.php.
Please see config.php.dist provided by 087g to find the new format. Copy that to config.php and edit to match your current installation.

If I'm mistaken, please post config.php (removing credentials before posting)
R.
I've edited the included config.php file from 0.8.7g release.

There is :

______________________


<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2010 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "mqcacti";
$database_hostname = "localhost";
$database_username = "blablablalogin";
$database_password = "blablablapass";
$database_port = "3306";

/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";

?>
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The syntax is fine. And isername/pass as well as db name do match your installation? You can login into mysql using these credentials?
R.
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

gandalf wrote:The syntax is fine. And isername/pass as well as db name do match your installation? You can login into mysql using these credentials?
R.
Yes this it the right one. Like I said, if I change for a bad password, I have the error : "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'"

I had the same problem with 0.8.7g Beta2.

The SQL Credential are right and at this moment I have Cacti 0.8.7f with PIA.

I followed the official Upgrade procedure but without installing PIA with Cacti 0.8.7g first.
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

I've tried 0.8.7g with PIA patched and I have the same problem.

Like I can see into the code : install/index.php, the php script check the Cacti Version:

______
$old_cacti_version = db_fetch_cell("select cacti from version");

/* try to find current (old) version in the array */
$old_version_index = array_search($old_cacti_version, $cacti_versions);

/* do a version check */
if ($old_cacti_version == $config["cacti_version"]) {
_____


When I check the database, all seems to be right

mysql> select * from version;
+--------+
| cacti |
+--------+
| 0.8.7f |
+--------+
1 row in set (0.01 sec)

mysql>
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are using the PIA, your config.php needs a few more options in it. Please refer to the config.php.distrib that comes with the PIA for details.

TheWitness
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?
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

I did this step too. I just want to show I've tried both installation (with and without PIA).
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So long as the version in include/global.php matches that of the version table in MySQL, there should be no version changes or errors presented.

TheWitness
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?
remsad
Posts: 11
Joined: Mon Jun 21, 2010 8:23 pm

Post by remsad »

I've found something very interesting.

There is my production server :

Centos 4.8 / php 4.3.9 / mysql 4.1.22


I replicated some tests under two new server's configuration

Server1 : Centos 4.8 / php 4.3.9 / mysql 4.1.22
Server2 : Centos 5.4 / php 5.4 / mysql 5.1.45

All MySQL connexions are local.

Results:

Cacti 0.8.7.e and Server1 = Working
Cacti 0.8.7.g and Server1 = Not Working
Cacti 0.8.7.e and Server2 = Working
Cacti 0.8.7.g and Server2 = Working

It seems that Cacti 0.8.7g have a problem with Centos 4 or any package from this distribution.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests