Remember Me? - Reinstalled Cacti still having issues

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

I did what everyone said from my prior posts.
I reinstalled Cacti
IIS 5.1
Windows XP
mysql

Using the installer BSOD2600 provided...installed it all went to http://localhost/cacti and it says:
: FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

I read the post install instructions to do this:
c:\> mysql -u root -p cacti
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipw';
FLUSH PRIVILEGES;
exit

Verify the correct username and password are set correctly in \cacti\include\config.php.

But when I do that it asks for a password which i type in cactipw and it errors out saying "Access denied for user root @ localhost....

I checked my config.php file it says:

Code: Select all

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
$database_ssl = false;

/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at http://serverip/cacti/ this
   would be set to /cacti/
*/
$url_path = '/cacti/';

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

?>
I went through all the issues in the beginning, and it appears I am headed into more issues after a fresh install. What gives, isnt there a simple way to install cacti? What am I doing wrong now?

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

Has this PC ever had MySQL previously installed?

Any errors in these logs?
<webdir>\cacti\log\mysql_install.txt
C:\documents and settings\All Users\MySQL\<MySQL version>\data\<servername>.err
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:Has this PC ever had MySQL previously installed?

Any errors in these logs?
<webdir>\cacti\log\mysql_install.txt
C:\documents and settings\All Users\MySQL\<MySQL version>\data\<servername>.err
No this was a fresh install of XP, the only thing it had was IIS.

Here is the log for mysql_install_log:

Code: Select all

----------------------------------------
Welcome to the MySQL Server Instance Configuration Wizard 1.0.17.0
Date: 2012-02-22 10:33:50

Installing service ...

Product Name:         MySQL Server 5.5
Version:              5.5.19
Installation Path:    C:\Program Files\MySQL\MySQL Server 5.5\

Creating configuration file C:\Program Files\MySQL\MySQL Server 5.5\\my.ini using template C:\Program Files\MySQL\MySQL Server 5.5\my-template.ini.
Options:
SERVER
MYISAM
DSS
STRICTMODE

Variables:
port: 3306
default-character-set: latin1
basedir: "C:/Program Files/MySQL/MySQL Server 5.5/"
datadir: "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/"


Creating Windows service entry.
Service name: "MySQL"
Parameters:   "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\\my.ini" MySQL.
Windows service MySQL installed.
Service started successfully.
The security settings could not be applied to the database because the connection has failed with the following error.

Error Nr. 2003
Can't connect to MySQL server on 'localhost' (10061)

I do not see any MySQL folder in "All Users". I did search the entire box for *.err files and it says none exist.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Remember Me? - Reinstalled Cacti still having issues

Post by phalek »

I'm curious, but what does

Code: Select all

ping localhost
return ?

And did you try it using 127.0.0.1 or the real IP as the DB server instead of localhost ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

phalek wrote:I'm curious, but what does

Code: Select all

ping localhost
return ?

And did you try it using 127.0.0.1 or the real IP as the DB server instead of localhost ?
I had changed my config file to the name of the computer:

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "TKAHD-CACTI-1";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
$database_ssl = false;

But I still get the same error.

If I ping TKAHD-CACTI-1 it pings correctly.
4 packets sent and received.

But if I go to:

http://myhostname/cacti

The error I get is:
FATAL: Cannot connect to MySQL server on 'TKAHD-CACTI-1'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

jhermiz1978 wrote:I do not see any MySQL folder in "All Users". I did search the entire box for *.err files and it says none exist.
In the output above, this is were the data resides:
datadir: "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/"

In that folder, do you see a cacti folder? Does it contain a bunch of files? If so, then appears the cacti database is installed. If not, this is the source of a problem.

Why the MySQL Server Instance Configuration Wizard failed to connect to the MySQL service is troubling. Any thing of interest in the windows event logs? Is the mysql service even running?
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:
jhermiz1978 wrote:I do not see any MySQL folder in "All Users". I did search the entire box for *.err files and it says none exist.
In the output above, this is were the data resides:
datadir: "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/"

In that folder, do you see a cacti folder? Does it contain a bunch of files? If so, then appears the cacti database is installed. If not, this is the source of a problem.

Why the MySQL Server Instance Configuration Wizard failed to connect to the MySQL service is troubling. Any thing of interest in the windows event logs? Is the mysql service even running?
BSOD2600, thanks for the info...You are right I do see this directory. Inside of this: C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.5\data

I see 3 folders mysql, performance_schema, and test.
I also see two files...I am seeing a .err file with the name TKAHD-CACTI-1.err. Its contents are as follows:

Code: Select all

120221 15:11:00 [Note] Plugin 'FEDERATED' is disabled.
120221 15:11:00 [Note] Plugin 'InnoDB' is disabled.
120221 15:11:00 [Note] Event Scheduler: Loaded 0 events
120221 15:11:00 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120221 15:12:21 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120221 15:12:21 [Note] Event Scheduler: Purging the queue. 0 events
120221 15:12:21 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120221 15:12:24 [Note] Plugin 'FEDERATED' is disabled.
120221 15:12:24 [Note] Plugin 'InnoDB' is disabled.
120221 15:12:24 [Note] Event Scheduler: Loaded 0 events
120221 15:12:24 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120221 15:23:04 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120221 15:23:04 [Note] Event Scheduler: Purging the queue. 0 events
120221 15:23:05 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120221 15:26:51 [Note] Plugin 'FEDERATED' is disabled.
120221 15:26:51 [Note] Plugin 'InnoDB' is disabled.
120221 15:26:52 [Note] Event Scheduler: Loaded 0 events
120221 15:26:52 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120221 15:46:28 [Warning] IP address '2002:6321:79c1::6321:79c1' could not be resolved: The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. 
120221 15:55:37 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120221 15:55:37 [Note] Event Scheduler: Purging the queue. 0 events
120221 15:55:37 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120222 10:33:52 [Note] Plugin 'FEDERATED' is disabled.
120222 10:33:52 [Note] Plugin 'InnoDB' is disabled.
120222 10:33:52 [Note] Event Scheduler: Loaded 0 events
120222 10:33:52 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120222 10:35:13 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120222 10:35:13 [Note] Event Scheduler: Purging the queue. 0 events
120222 10:35:13 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120222 10:35:16 [Note] Plugin 'FEDERATED' is disabled.
120222 10:35:16 [Note] Plugin 'InnoDB' is disabled.
120222 10:35:16 [Note] Event Scheduler: Loaded 0 events
120222 10:35:16 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120223  3:16:31 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120223  3:16:31 [Note] Event Scheduler: Purging the queue. 0 events
120223  3:16:32 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120223  3:18:32 [Note] Plugin 'FEDERATED' is disabled.
120223  3:18:32 [Note] Plugin 'InnoDB' is disabled.
120223  3:18:33 [Note] Event Scheduler: Loaded 0 events
120223  3:18:33 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120223 11:31:35 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Normal shutdown

120223 11:31:35 [Note] Event Scheduler: Purging the queue. 0 events
120223 11:31:35 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

120223 11:32:54 [Note] Plugin 'FEDERATED' is disabled.
120223 11:32:54 [Note] Plugin 'InnoDB' is disabled.
120223 11:33:00 [Note] Event Scheduler: Loaded 0 events
120223 11:33:00 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.19'  socket: ''  port: 3306  MySQL Community Server (GPL)
120223 11:38:47 [Warning] IP address '2002:6321:79c1::6321:79c1' could not be resolved: The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. 
I also did check the mysql service inside of the services and it says "Started" automatic, so it appears the service is running.
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:
jhermiz1978 wrote:I do not see any MySQL folder in "All Users". I did search the entire box for *.err files and it says none exist.
In the output above, this is were the data resides:
datadir: "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/"

In that folder, do you see a cacti folder? Does it contain a bunch of files? If so, then appears the cacti database is installed. If not, this is the source of a problem.

Why the MySQL Server Instance Configuration Wizard failed to connect to the MySQL service is troubling. Any thing of interest in the windows event logs? Is the mysql service even running?
Looks like that database is not even there, is there any way to get it in there. I tried to reinstall mysql same issue (on another machine). So is there some sort of way to run a script to create the cacti database?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

IPv6 enabled XP 'eh? I wonder if that's the source of these problems. Will have to do some testing when I've got time to see if I can replicate.

Anyways, yes you'll have to manually install the cacti mysql database. http://docs.cacti.net/manual:087:1_inst ... er_windows You'll only need to do the configuration portions, as the installer already took care of the various installs. Don't do the "old-passwords" config in MySQL.
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:IPv6 enabled XP 'eh? I wonder if that's the source of these problems. Will have to do some testing when I've got time to see if I can replicate.

Anyways, yes you'll have to manually install the cacti mysql database. http://docs.cacti.net/manual:087:1_inst ... er_windows You'll only need to do the configuration portions, as the installer already took care of the various installs. Don't do the "old-passwords" config in MySQL.
BSOD,

Again thank you so much...I think I am closer or not even close at all :).

I was able to do this:

Set a password for the root user (if not set already during MySQL installation)
c:\> mysqladmin --user=root password somepassword
c:\> mysqladmin --user=root --password reload
Create the MySQL database:
c:\> mysqladmin --user=root --password create cacti
Import the default Cacti database:
c:\> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql

And now I can see a folder for cacti...

But when I do this:
Create a MySQL username and password for Cacti.
c:\> mysql --user=root --password mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipw';
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> flush privileges;

It says NO ROWS WERE UPDATED.

I followed the link you posted...

But now when I go to http://machinename/cacti I still get:

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

Here is what my include/config.php says:

Code: Select all

<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2011 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 = "cacti";
$database_hostname = "TKAHD-CACTI-1";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
$database_ssl = false;

/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at http://serverip/cacti/ this
   would be set to /cacti/
*/
$url_path = '/cacti/';

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

?>
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

1) any particular reason you're using the computer name instead of localhost?
2) are you using iis or apache? first post stated iis, but the last one you showed an apache path. depending what you're using, it can be picky about localhost vs pcname usage.
3) Does a phpinfopage work?
4) any new mysql errors in the .err file?
5) any php errors logged?
6) When you imported cacti.sql, you now see a bunch of files like cdef, data_input, data_template, etc. in that MySQL/data/cacti/ folder, right? If not, then the cacti.sql file wasn't loaded, which is bad.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

It's the IPv6 which is the source of the MySQL problems. I was able to replicate your problem. According to http://bugs.mysql.com/bug.php?id=52381, its not fixed until 5.6.1 and 6.0 releases.
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:It's the IPv6 which is the source of the MySQL problems. I was able to replicate your problem. According to http://bugs.mysql.com/bug.php?id=52381, its not fixed until 5.6.1 and 6.0 releases.
I assume I should hold off for now then?

Thanks for replicating the issue.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Remember Me? - Reinstalled Cacti still having issues

Post by BSOD2600 »

You really need IPv6? If not, then removing it will solve the problem with MySQL.

Otherwise, if you feel brave, could try the dev builds of mysql 5.6.1 or 6.0.
jhermiz1978
Posts: 32
Joined: Wed Dec 21, 2011 9:44 am

Re: Remember Me? - Reinstalled Cacti still having issues

Post by jhermiz1978 »

BSOD2600 wrote:You really need IPv6? If not, then removing it will solve the problem with MySQL.

Otherwise, if you feel brave, could try the dev builds of mysql 5.6.1 or 6.0.
Man you are good...

I disabled ipv6 and cacti appears to be up and running...
I did install the snmp services on 2 of my servers.
But on my cacti machine if I try to do

snmpwalk NameOfMyFirstServer

It times out and says no log handling enabled - using stderr logging
snmpwalk: Timeout.

I've turned on the snmp service. Set the community name to public READ ONLY.
I cant think of anything else I need to check....
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests