Cacti on RHEL3?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Cacti on RHEL3?

Post by bitpusher »

I'm running RHEL 3 WS Update 4. When I install the fedora core 3 version,
I get the following errors :

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Fatal error: Call to undefined function: cacti_log() in /var/www/html/cacti/lib/database.php on line 51

Any idea what's going on?
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Re: Cacti on RHEL3?

Post by bitpusher »

bitpusher wrote:I'm running RHEL 3 WS Update 4. When I install the fedora core 3 version,
I get the following errors :

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Fatal error: Call to undefined function: cacti_log() in /var/www/html/cacti/lib/database.php on line 51

Any idea what's going on?
After following the patch, and making my config.php look like this :

nclude($config["library_path"] . "/adodb/adodb.inc.php");
include_once($config["library_path"] . "/functions.php");
include($config["library_path"] . "/database.php");

db_connect_real($database_hostname, $database_username, $database_password, $database_default, $
database_type);


I'm still getting the following errors :

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Notice: Use of undefined constant POLLER_VERBOSITY_NONE - assumed 'POLLER_VERBOSITY_NONE' in /var/www/html/cacti/lib/functions.php on line 327

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

I am using the correct mysql databasename, username, and password.
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What version of MySQL. If version 4.1.x, did you specify the old passwords hack? The other issue is just a screwed up patch and is not a problem (for now anyway). We need to move "inclue\config_constants.php" before "lib\functions.php".

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?
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Post by bitpusher »

TheWitness wrote:What version of MySQL. If version 4.1.x, did you specify the old passwords hack? The other issue is just a screwed up patch and is not a problem (for now anyway). We need to move "inclue\config_constants.php" before "lib\functions.php".

TheWitness
mysql 4.0.22
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try this config.php.dist.

TheWitness
Attachments
config.php.zip
(1.89 KiB) Downloaded 383 times
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?
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Post by bitpusher »

TheWitness wrote:Try this config.php.dist.

TheWitness
Fixed all the old errors, created a new one :

Fatal error: Call to undefined function: read_config_option() in /var/www/html/cacti/include/config_form.php on line 651
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Put functions ahead of everything else and try again.

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?
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Post by bitpusher »

TheWitness wrote:Put functions ahead of everything else and try again.

TheWitness
The joys of php in RHEL :)

Now I get this error :


Fatal error: Call to undefined function: db_connect() in /var/www/html/cacti/lib/database.php on line 110
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try this.

TheWitness
Attachments
config.php.zip
(1.89 KiB) Downloaded 275 times
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?
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Post by bitpusher »

TheWitness wrote:Try this.

TheWitness
Still the same error message :

Fatal error: Call to undefined function: db_connect() in /var/www/html/cacti/lib/database.php on line 110

what library does db_connect com from? php-mysql's mysql.so?
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Help?

Post by bitpusher »

Has anybody actually gotten cacti to work properly on RHEL? It seems that RedHat went out of their way to break php (removing php-snmp, etc).
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
dieselpower
Posts: 2
Joined: Thu Mar 17, 2005 3:47 pm

RHEL 3

Post by dieselpower »

I got Cacti to run on RHEL3, but am having rrd graphing problems, errors when creating new graph trees & no hosts being shown in the devices view. poller.php also states that "there are no items in the cache or polling is disabled" I have polling enabled, I'm not sure what I need to do to get "items in the cache"

any ideas???

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

Post by gandalf »

dieselpower,

go to "System Utilities-> Clear Poller Cache".
This will populate your poller_item table in the mysql-db.
You may have a look at this using

Code: Select all

mysql --user=<cactiuser> --password=<cactipw>
> use cacti
> select count(*) from poller_item;
(Now you will see the output of the command)
(use following command to clear the poller cache if problem persists)
> delete from poller_item;
>quit
<cactiuser> ist the cacti database userid in <path_cacti>/include/config.php
<cactipw> is the cacti database user pw

hth :wink:
shiva
Posts: 2
Joined: Tue Mar 22, 2005 4:22 pm

Post by shiva »

The joys of php in RHEL :)

Now I get this error :


Fatal error: Call to undefined function: db_connect() in /var/www/html/cacti/lib/database.php on line 110[/quote]


I've encountered today the same problem on Red Hat Advanced Server 3, have you solved?

Regards
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Did you resently update your server?

If so, what RPM updates did you apply?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests