CereusReporting 2.10.66: unable to send a scheduled report

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

for sure.

and your apache webserver is runnng as:

httpd
www-root
apache
...

?
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

I am not sure that I have understood well your question but my apache server runs as:
[root@c-ovp-cacti01 ~]# httpd -V
Server version: Apache/2.2.3
Server built: Oct 6 2011 12:11:58
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
The deamon used to start the service is not the original one /etc/init.d/httpd but a copy called /etc/init.d/httpdcacti
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

ok,

if you execute the following, what does it display:

Code: Select all

 ps -ef |grep http
The first column is the userid I need.
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

the command output you requested is:

Code: Select all

[root@c-ovp-cacti01 ~]# ps -ef |grep http
apache     609 11662  0 09:35 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache    3072 11662  0 11:04 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache    3403 11662  0 11:14 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
root      8585  7863  0 13:46 pts/0    00:00:00 grep http
root     11662     1  0 Mar07 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
root     22447 11662  0 04:02 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22448 11662  0 04:02 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22449 11662  0 04:02 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22450 11662  0 04:02 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22451 11662  0 04:02 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22452 11662  0 04:02 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22453 11662  0 04:02 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22454 11662  0 04:02 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22455 11662  0 04:02 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22456 11662  0 04:02 ?        00:00:03 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   22481 11662  0 04:02 ?        00:00:00 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32400 11662  0 09:17 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32437 11662  0 09:19 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32438 11662  0 09:19 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32439 11662  0 09:19 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32440 11662  0 09:19 ?        00:00:01 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
apache   32441 11662  0 09:19 ?        00:00:02 /usr/sbin/httpd -f /opt/application/cacti/current/apache223/conf/httpd.conf
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

Can you execute the following commands and re-check:

Code: Select all

cd /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/
chown -R opcacti.apache CereusReporting/
cd /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting
chmod 775 tmp
chmod 775 tmp/CereusReporting_messages.log
chmod 775 templates
chmod 775 backup
chmod 775 archive
chmod -R 775 images
chmod +x parallelGraphRetriever
cd /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting/ReportEngines
chown -R opcacti.www-data mpdf
chmod 775 mpdf/tmp
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

I cannot do this command: chown -R opcacti.www-data mpdf
The user "www-data" doesn't exist. With the other commands, the problem is still present. Now, I am also unable to create an archive, this produces the following error: mPDF error: Unable to create output file: archive/CereusReporting_01Feb14-000_01Mar14-000.pdf. Nothing appears in CereusReporting_messages.log. Nonetheless, it creates new php warnings in php.log.

Code: Select all

[10-Mar-2014 15:52:16] PHP Warning:  chmod(): Operation not permitted in /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting/modules/logger/logger.php on line 24
[10-Mar-2014 15:52:16] PHP Warning:  chmod(): Operation not permitted in /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting/modules/logger/logger.php on line 24
[10-Mar-2014 15:52:16] PHP Warning:  chmod(): Operation not permitted in /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting/modules/logger/logger.php on line 24
[10-Mar-2014 15:52:19] PHP Warning:  fopen(archive/CereusReporting_01Feb14-000_01Mar14-000.pdf): failed to open stream: Permission denied in /opt/application/cacti/G1R0C0/apache223/www/html/cacti/plugins/CereusReporting/ReportEngines/mpdf/mpdf.php on line 7126
I was able to create an archive before, with following rights on archive directory:

Code: Select all

drwxrwxrwx  2 opcacti opcacti    4096 Mar  7 11:28 archive
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

should have been

Code: Select all

chown -R opcacti.apache mpdf
Nevertheless, your permissions see to be really odd. There are basically 2 users that need write access to directories:

The poller user ( or user which the cronjob runs under -> opcacti ) AND the webserver user (apache)

But in your case some 3rd user seems to be involved somehow.
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

I corrected but this didn't change the result.
I verified my installation procedure and there is no more user declared which can be involved here... I also tried to see all users on my system:

Code: Select all

[root@c-ovp-cacti01 ReportEngines]# awk -F':' '{ print $1}' /etc/passwd
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
gopher
ftp
nobody
vcsa
rpc
ntp
dbus
sshd
rpcuser
nfsnobody
haldaemon
osadmin
apache
distcache
opcacti
zend
xfs
rrdcached
pcap
mysql
About the 2 users that need write access to directories, thanks for the information because I didn't know that. After reflection, it is logical...
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

hence, this doesn't make any sense as the opcacti and apache user have write access to the archive dir ... :

Code: Select all

 fopen(archive/CereusReporting_01Feb14-000_01Mar14-000.pdf): failed to open stream: Permission denied in 
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

I agree it is very odd. All what we is that if the group user "other" has all rights, this is functional...
I have to admit, I am lost.
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

What you could do:

delete the CereusReporting_messags.log file and chmod 777 the tmp dir.

then check who owns that file after it has been re-created
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

hum the server doesn't appreciate that , it crashes... :o
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

crashes ? wow. Even more oddities here. That file is just a log file which should be created automatically. Did you chmod 777 the tmp dir ?
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
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by ArcThemaster »

Ouf that was not my fault, that was the VM.
So the file was re-created and guess who's the owner? The winner is opcacti...

Code: Select all

-rwxrwxrwx 1 opcacti opcacti    0 Mar 10 16:49 CereusReporting_messages.log
ArcThemaster
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting 2.10.66: unable to send a scheduled repo

Post by phalek »

well, ok. Can you check the "debug mode" and set it to e.g. "debug" ?

I assume it's still complaining about permissions although it's globally writeable and opcacti is the owner ... funny
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest