Problems Cacti 1.1.31 Multiple Pollers

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

Moderators: Developers, Moderators

Post Reply
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

Hi everbody,
I'm having problems installing Remote Poller. I followed all the steps in the new book (Cacti 1.0 Beginner's Guide Second Edition) but I can't get the installation to finish. Specifically when I select in the Wizzard "New Remote Poller" an error appears saying that the config.php file does not have write permissions. When I check the file it has write permission, I have even used "chmod 777 config.php" but the error still continues. Has anyone had the same problem?
Regards.
Attachments
Installation Error
Installation Error
Installation Error.jpg (157.38 KiB) Viewed 1577 times
Permission to config.php
Permission to config.php
ConfigPHP Permissions.jpg (450.54 KiB) Viewed 1577 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by netniV »

So the line of code that sets base_path is in global.php and reads:

Code: Select all

$config['base_path']    = str_replace("\\", "/", substr(dirname(__FILE__),0,-8));
This is the used in the install/index.php with the following:

Code: Select all

if (is_writable($config['base_path'] . '/include/config.php')) {
        $good_write = true;
} else {
        $good_write = false;
}
If the base_path is correct, then the chances are for some reason PHP is cache the status of the file. Try adding the following before the is_writable() call:

Code: Select all

clearstatchache()
see http://php.net/manual/en/function.clearstatcache.php for more information on the function.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

Hi netniV,
Thanks for you reply!
I tried to add clearstatchache() function before "if (is_writable($config['base_path']..." but when i open the install web page nothing appear (blank page) and when comment the function the install page appear again with the same error.
I'm not a PHP programmer, only put the function without arguments. This is correct?
Regards,
Attachments
clearstatchache_function.jpg
clearstatchache_function.jpg (143.98 KiB) Viewed 1497 times
Install Page in Blank.jpg
Install Page in Blank.jpg (81.25 KiB) Viewed 1497 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by netniV »

Would help if I could spell cache correctly ;-) There is an extra H after the C !

Code: Select all

clearstatcache();
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

LOL!!! Typical Layer 8 error :)
I corrected the word but the problem continues...
Regards,
Attachments
Error.jpg
Error.jpg (231.6 KiB) Viewed 1489 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by netniV »

So if you could search for !$good_write, there will be an if statement then opening curly braces, followed by a print.

Can you add the following two lines:

Code: Select all

print '<p>Filename: '. $config['base_path'] . '/include/config.php';
print '</p>';
This will modify your installer to output the full path that it is performing the is_writable on.

On final thing, do you have SELinux turned on? Try running 'sestatus' at the command prompt and see whether what the returns. If it is enabled, it may explain why you have a readonly file that isn't actually readonly.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

On final thing, do you have SELinux turned on?
Yes, I just followed How-To in the New Book "Cacti 1.0 Beginner's Guide Second Edition"...
Attachments
SELinux.jpg
SELinux.jpg (56.89 KiB) Viewed 1482 times
setstatus.jpg
setstatus.jpg (65.59 KiB) Viewed 1482 times
print.jpg
print.jpg (147.22 KiB) Viewed 1482 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by netniV »

Have you restarted since setting permissive? Because the status there says enforcing which means that its not allowing things through I reckon.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

I restarted server but it's the same and the error still continues.
Attachments
sestatus2.jpg
sestatus2.jpg (67.24 KiB) Viewed 1459 times
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by Pucho »

Code: Select all

setenforce 1
will set it as permissive without reboot

Code: Select all

getenforce 
will show you current status as well, I'd recommend you to read this
or you can run

Code: Select all

audit2allow -a -M someName
and then install the policy to fix your permissions and live with selinux enabled.
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

I could fixed the problem guys. In "/etc/selinux/config" I had an error with syntax "SELINUX = permissive" so when server boots up never aplied the policy.
After fix this I could installed succesfully the new poller in my deployment :D
Thank you for assitance Pucho and netniV
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by Pucho »

latota007 wrote:I could fixed the problem guys. In "/etc/selinux/config" I had an error with syntax "SELINUX = permissive" so when server boots up never aplied the policy.
After fix this I could installed succesfully the new poller in my deployment :D
Thank you for assitance Pucho and netniV

Cosas que pasan cuando tenes Lanacion en tus favoritos (?) jajaja

Te mande un PM!
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
latota007
Posts: 7
Joined: Fri Jan 19, 2018 12:47 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by latota007 »

Mas bien diria: Cosas que pasan en la era del Copy & Paste mal hecho :D :D :D

Vi que me mandaste un PM pero no me deja abrirlo, dice que no tengo permisos para acceder...
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Problems Cacti 1.1.31 Multiple Pollers

Post by Pucho »

latota007 wrote:Mas bien diria: Cosas que pasan en la era del Copy & Paste mal hecho :D :D :D

Vi que me mandaste un PM pero no me deja abrirlo, dice que no tengo permisos para acceder...
Te deben faltar un par de posts mas o mas tiempo desde que creaste la cuenta, en fin.

Te pedia feedback respecto de la traduccion en español. El ultimo update que le hice fue en la version 1.1.15 o por ahi creo pero como la uso en ingles tampoco le di mucha bola.

La mayoria de la gente tecnica creo que usa cacti en ingles btw. Como sea, cuando se te habilite el PM respondeme por ahi de ultima asi no spammeamos todo el thread en español =D
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests