CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rr
Moderators: Developers, Moderators
CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rr
Hi there,
I am having difficulties locating a problem in a new Cacti installation and would appreciate some help.
My search did not turn up much...
Symptom: As a new device is being added through web UI, the subsequent rra/ sub folder/files are not being generated.
- Log is being sent to both Syslog and cacti.log and only the Syslog gets updated.
- rra/ and log/ under /var/www/cacti/ are cactiuser:cacti with 755 perm.
Same with files under those folder (created by manually running cron poller entry after device addtion in GUI.)
Though rrd file/folders are not being created via. GUI.
- crontab is running the poller as supposed to (log visible at /var/log/messages)
*/5 * * * * cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1
- running cron entry as cactiuser creates the missing folder and rrd files but does not get updated when cron runs the poller.
- All the binary/log Path entries in the GUI are verified.
Its as if there is some disconnection between GUI and poller but I am not sure what.
I am runinng
Cacti Version - 0.8.7g
Cacti OS - CentOS x84, 64-bit with 2.6.18-128.2.1.el5 kernel
Cacti Patch is up to date.
Some snapshot from log;
Aug 3 15:11:27 cactisvr Cacti[6563]: CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rra/7'
Aug 3 15:11:27 cactisvr Cacti[18783]: CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rra/7'
Aug 3 15:15:00 cactisvr Cacti[9830]: SYSTEM: STATS: Time:298.7870 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:20:00 cactisvr Cacti[9892]: SYSTEM: STATS: Time:298.7830 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:25:00 cactisvr Cacti[9934]: SYSTEM: STATS: Time:298.7955 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:30:00 cactisvr Cacti[9973]: SYSTEM: STATS: Time:298.8166 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Many thanks in advance for your help,
Troy
I am having difficulties locating a problem in a new Cacti installation and would appreciate some help.
My search did not turn up much...
Symptom: As a new device is being added through web UI, the subsequent rra/ sub folder/files are not being generated.
- Log is being sent to both Syslog and cacti.log and only the Syslog gets updated.
- rra/ and log/ under /var/www/cacti/ are cactiuser:cacti with 755 perm.
Same with files under those folder (created by manually running cron poller entry after device addtion in GUI.)
Though rrd file/folders are not being created via. GUI.
- crontab is running the poller as supposed to (log visible at /var/log/messages)
*/5 * * * * cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1
- running cron entry as cactiuser creates the missing folder and rrd files but does not get updated when cron runs the poller.
- All the binary/log Path entries in the GUI are verified.
Its as if there is some disconnection between GUI and poller but I am not sure what.
I am runinng
Cacti Version - 0.8.7g
Cacti OS - CentOS x84, 64-bit with 2.6.18-128.2.1.el5 kernel
Cacti Patch is up to date.
Some snapshot from log;
Aug 3 15:11:27 cactisvr Cacti[6563]: CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rra/7'
Aug 3 15:11:27 cactisvr Cacti[18783]: CMDPHP: ERROR: Unable to create directory '/var/www/cacti/rra/7'
Aug 3 15:15:00 cactisvr Cacti[9830]: SYSTEM: STATS: Time:298.7870 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:20:00 cactisvr Cacti[9892]: SYSTEM: STATS: Time:298.7830 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:25:00 cactisvr Cacti[9934]: SYSTEM: STATS: Time:298.7955 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Aug 3 15:30:00 cactisvr Cacti[9973]: SYSTEM: STATS: Time:298.8166 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
Many thanks in advance for your help,
Troy
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
Try in order to know what user runs poller actually:
(1) Add full access rights to rra/ directory temporarily (please revert it after testing for security reasons)
# chmod -R 777 rra/
(2) Wait until next polling
(3) If RRD file is created, what permissions it has?
(1) Add full access rights to rra/ directory temporarily (please revert it after testing for security reasons)
# chmod -R 777 rra/
(2) Wait until next polling
(3) If RRD file is created, what permissions it has?
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
Thanks for your reply,
That's the funny thing. Even with 777 nothing gets created in rra directory via cron...
-- edit ----
Updates...
- Removed SElinux and rebooted last night.
- Chmod 777 on log dir. -> cacti.log is getting updated now.
Now the poller won't create rrd files even with manual run.
Neither as cactiuser nor root... Doh!!!
Here is some log...
# php /var/www/cacti/poller.php
08/04/2011 04:14:42 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '281', Max Runtime '298', Poller Runs: '1'
08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
Waiting on 2 of 2 pollers.
Waiting on 2 of 2 pollers.
Waiting on 2 of 2 pollers.
:
:
^C
Waiting on 2 of 2 pollers.
08/04/2011 04:14:44 PM - CMDPHP: Poller[0] WARNING: Cacti Master Poller process terminated by user
I am now looking into spine config, going by log.
That's the funny thing. Even with 777 nothing gets created in rra directory via cron...
-- edit ----
Updates...
- Removed SElinux and rebooted last night.
- Chmod 777 on log dir. -> cacti.log is getting updated now.
Now the poller won't create rrd files even with manual run.
Neither as cactiuser nor root... Doh!!!
Here is some log...
# php /var/www/cacti/poller.php
08/04/2011 04:14:42 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '281', Max Runtime '298', Poller Runs: '1'
08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
Waiting on 2 of 2 pollers.
Waiting on 2 of 2 pollers.
Waiting on 2 of 2 pollers.
:
:
^C
Waiting on 2 of 2 pollers.
08/04/2011 04:14:44 PM - CMDPHP: Poller[0] WARNING: Cacti Master Poller process terminated by user
I am now looking into spine config, going by log.
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
Yes, that is the error regarding database connections.TBombadil wrote: 08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
08/04/2011 04:14:42 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
...
I am now looking into spine config, going by log.
Try
# ./spine --verbosity=5 --readonly
And, 'spine.conf' must be located at one of them:
- same directory as spine executable
- /etc/spine.conf
- /etc/cacti/spine.conf
- ../etc/spine.conf
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
There was a SQL passwd mismatch in spine.conf file and that has been corrected.
Thank you for pointing that out.
Though, yet another problem "SNMP Library Version Mismatch" continues.....
Below is from running spine w/ verbosity set;
:
08/08/2011 04:51:38 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.3.1
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.3.2.2
08/08/2011 04:51:38 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)
syslog shows;
:
08/08/2011 05:05:00 PM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
08/08/2011 05:05:00 PM - SYSTEM STATS: Time:298.7324 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
08/08/2011 05:05:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
08/08/2011 05:05:01 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)
:
Brief search on this forum showed that I am not the only one with the problem and it seems there is some issue with version between net-SMNP and spine. Though I am not seeing any clear answer that seem to resolve the issue????
Thank you for pointing that out.
Though, yet another problem "SNMP Library Version Mismatch" continues.....
Below is from running spine w/ verbosity set;
:
08/08/2011 04:51:38 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.3.1
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.3.2.2
08/08/2011 04:51:38 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)
syslog shows;
:
08/08/2011 05:05:00 PM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
08/08/2011 05:05:00 PM - SYSTEM STATS: Time:298.7324 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:11 RRDsProcessed:0
08/08/2011 05:05:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
08/08/2011 05:05:01 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)
:
Brief search on this forum showed that I am not the only one with the problem and it seems there is some issue with version between net-SMNP and spine. Though I am not seeing any clear answer that seem to resolve the issue????
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
Sorry I'm not sure, too.TBombadil wrote: :
08/08/2011 04:51:38 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.3.1
08/08/2011 04:51:38 PM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.3.2.2
08/08/2011 04:51:38 PM - SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent)
- snip -
Brief search on this forum showed that I am not the only one with the problem and it seems there is some issue with version between net-SMNP and spine. Though I am not seeing any clear answer that seem to resolve the issue????
One user downgraded net-snmp. Another user upgraded.
- http://forums.cacti.net/viewtopic.php?p=129675#p129675
- http://forums.cacti.net/viewtopic.php?p=213055#p213055
Developer of spine says SNMP version check is "self protection mechanism".
- http://forums.cacti.net/viewtopic.php?p=165723#p165723
I suggest, if you have "net-snmp-config.h" at multiple locations,
try "./configure --with-snmp=xxxxx" before compiling spine. (See ./configure --help)
Otherwise, if your "cacti-spine-0.8.7g/config/config.h" has this line,
Code: Select all
#define VERIFY_PACKAGE_VERSION 1
But this still have a risk of conflicts between SNMP versions..
Re: CMDPHP: ERROR: Unable to create directory '/var/www/cact
Running poller in debug mode showed yet another problem which is fixed now.
[cactiuser@cactisvr rra]$ lal /etc/spine.conf
-rw------- 1 cacti cacti 2486 Aug 5 11:26 /etc/spine.conf
Need to dive into this "SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2)" issue.
I will open up another thread for this since its a different contributing issue...
You've done a lot and "Arigatou gozaimasu!"
[cactiuser@cactisvr rra]$ lal /etc/spine.conf
-rw------- 1 cacti cacti 2486 Aug 5 11:26 /etc/spine.conf
Need to dive into this "SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2)" issue.
I will open up another thread for this since its a different contributing issue...
You've done a lot and "Arigatou gozaimasu!"
Solved) SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2)
Gave up on locating and correcting the net-snmp header version information.
Instead, got lazy and installed newer version of Spine (0.8.7g) which has version check disabled....
My version of spine was 0.8.7a (latest via yum w/ few common repositories as of this writing) so download the latest from this site and compiled it based on TheWitness's comment on version 0.8.8e and up has this version check disabled.
Thread : http://forums.cacti.net/viewtopic.php?p=165723
Instead, got lazy and installed newer version of Spine (0.8.7g) which has version check disabled....
My version of spine was 0.8.7a (latest via yum w/ few common repositories as of this writing) so download the latest from this site and compiled it based on TheWitness's comment on version 0.8.8e and up has this version check disabled.
Thread : http://forums.cacti.net/viewtopic.php?p=165723
TheWitness wrote:Update to E. I have made this check not mandatory.
TheWitness
Who is online
Users browsing this forum: JorisFRST and 0 guests