Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Mar 29, 2017 11:53 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Wed Jul 22, 2015 1:27 am 
Offline

Joined: Wed Jul 22, 2015 12:00 am
Posts: 4
Hi, I am trying to install cacti on my VM using CentOS6.5

I followed the guide you provided however I keep having the same error trying to access the WebUI.

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

Please help!

I have tried various config and restarted the services including httpd & mysqld, flush iptables...
but results are the same...
Code:
[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;


Code:
[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "root";
$database_password = "password";
$database_port = "3306";
$database_ssl = false;


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Wed Jul 22, 2015 3:48 am 
Offline

Joined: Wed Jul 22, 2015 12:00 am
Posts: 4
timlee wrote:
Hi, I am trying to install cacti on my VM using CentOS6.5

I followed the guide you provided however I keep having the same error trying to access the WebUI.

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

Please help!

I have tried various config and restarted the services including httpd & mysqld, flush iptables...
but results are the same...
Code:
[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;


Code:
[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "root";
$database_password = "password";
$database_port = "3306";
$database_ssl = false;


Hi all,

I found out the answer to my own question... The problem lies with the local loopback, I need to set it as
Code:
127.0.0.1               localhost.localdomain localhost


in the /etc/hosts.

This was not mentioned in any guide. Hope someone will find it useful :D


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Wed Jul 22, 2015 3:50 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2567
Location: Kressbronn, Germany
how about changing cacti-cent6.localdomain to localhost ?

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Wed Jul 22, 2015 4:59 am 
Offline

Joined: Wed Jul 22, 2015 12:00 am
Posts: 4
phalek wrote:
how about changing cacti-cent6.localdomain to localhost ?


Tried that and it doesn't work.


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Wed Jul 22, 2015 5:32 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2567
Location: Kressbronn, Germany
what about a simple 127.0.0.1 ?

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Jul 23, 2015 2:19 am 
Offline

Joined: Wed Jul 22, 2015 12:00 am
Posts: 4
phalek wrote:
what about a simple 127.0.0.1 ?


Hi phalek,

This works too. Thanks!


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:07 am 
Offline

Joined: Wed Feb 17, 2016 5:26 am
Posts: 5
hi,

thank for tourial , i installed cacti but when install plugin realtime have problem.
Quote:
# cd /usr/share/cacti/plugins/realtime

Create a new directory called “temp”
# mkdir temp

Set the permissions on the new directory to be writable by all
# chmod 777 temp
but Realtime pop up all say :
Quote:
The Image Cache Directory is not writable. Please set permissions and then attempt to open another realtime graph.

After changed The Image Cache Director as link below that working .

http://www.itechlounge.net/2013/11/linux-cacti-the-image-cache-directory-does-not-exist/?mode=list


Quote:
Console > Settings > Misc > Cache Directory

The default path is :

/var/www/html/cache/


Make sure the directory is writable :


chmod 777 /var/www/html/cache/



Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:12 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2567
Location: Kressbronn, Germany
Seems like you missed this step from the guide:
Code:
6.   In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:25 am 
Offline

Joined: Wed Feb 17, 2016 5:26 am
Posts: 5
phalek wrote:
Seems like you missed this step from the guide:
Code:
6.   In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”

Dear Phalek,

I did it, try many times but no work.Please check pic.

6. In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”
7. Click “Save”
8. Check that the “Cache Directory” now shows “[OK: DIR FOUND]”


Attachments:
cacti.PNG
cacti.PNG [ 114.93 KiB | Viewed 2099 times ]
Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:28 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2567
Location: Kressbronn, Germany
Your temp dir is not 777, but only 775 ....

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:36 am 
Offline

Joined: Wed Feb 17, 2016 5:26 am
Posts: 5
phalek wrote:
Your temp dir is not 777, but only 775 ....

Hi Phalek,

I try changed 775 to 777 or anythings. No working.


Attachments:
cacti 2.PNG
cacti 2.PNG [ 120.36 KiB | Viewed 2098 times ]
Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:41 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2567
Location: Kressbronn, Germany
It's usually a permission issue then. I suggest you do a
Code:
chown -R apache /usr/share/cacti/plugins/


And test again. Apache may simply not be able to get to the plugins directory. Maybe one of the parent directory of that temp dir doesn't have the correct permissions for apache to access ...

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: [HOWTO] Cacti Install Guide CentOS 6 - 64
PostPosted: Thu Feb 25, 2016 4:47 am 
Offline

Joined: Wed Feb 17, 2016 5:26 am
Posts: 5
phalek wrote:
It's usually a permission issue then. I suggest you do a
Code:
chown -R apache /usr/share/cacti/plugins/


And test again. Apache may simply not be able to get to the plugins directory. Maybe one of the parent directory of that temp dir doesn't have the correct permissions for apache to access ...


Hi, Phalek,

Nothing changed.


Attachments:
cacti3.PNG
cacti3.PNG [ 148.57 KiB | Viewed 2098 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 5 hours


Who is online

Users browsing this forum: shabaz and 1 guest


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