boost server not working (was: boost ondemand update not wor

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

boost server not working (was: boost ondemand update not wor

Post by Atkatla »

Hi,
I got cacti 0.8.7b with spine and PIA 2.1 running. I recorded about 8k datasources with spine, there where no problems. PIA is working with monitor and RRDclean. Then I installed Boost1.7 (from the trunk directory in the SVN depository) to circumvent the pollerproblem.
When Boost is activated, the graphs are only drawn until the moment of the last scheduled update (currently hourly). If I understood correctly the graphs should also be updated, when I open a diagram, so I dont have to wait one hour to see the data of the last hour. This error happens with the non-SVN-Version,too.

I dont use the boost server. I tried, perhaps it could solve the problem, but when I wanted to do "chkconfig --add cacti_rrdsvc" I get the following output:

Code: Select all

cacti:/etc/init.d # chkconfig --add cacti_rrdsvc
insserv: script cacti_rrdsvc is not executable, skipped!
cacti_rrdsvc              0:off  1:off  2:off  3:off  4:off  5:off  6:off
I did the dos2unix before but the original and dos2unix'ed file look like the same when I watch them with the "less"-command.

Can someone please bring some light into that topic? System is DualXeon with Opensuse11 and 4GB RAM.
Last edited by Atkatla on Thu Aug 07, 2008 10:06 am, edited 1 time in total.
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

try:

Code: Select all

chmod +x cacti_rrdsvc
On-demand update doesn't work if there's nothing to demand the update from.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

Ok, i did the "chmod +x cacti_rrdsvc" and then "dos2unix cacti_rrdsvc".
When I did "chkconfig --add cacti_rrdsvc" i got the following output:

Code: Select all

insserv: warning: script 'S01cacti_rrdsvc' missing LSB tags and overrides
insserv: warning: script 'cacti_rrdsvc' missing LSB tags and overrides
cacti_rrdsvc              0:off  1:off  2:off  3:on   4:off  5:on   6:off
The service itself is running now, but not the server.

Code: Select all

cacti:/etc/init.d/rc5.d # ps -ef | grep boost_server.php
root     19338  6115  0 15:52 pts/0    00:00:00 grep boost_server.php

cacti:/etc/init.d/rc5.d  # telnet localhost 9050
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused

Code: Select all

cacti:/etc/init.d # php /srv/www/htdocs/cacti/plugins/boost/boost_server.php -d
2008:08:07 13:59:57 - Cacti RRDtool Service Started
but no more response.

Then I realized, that I forgot to change the path (I did it once, but then overwrote the file again when upgraded to Boost SVN). So I edited the file with my cacti path, but the result ist the same.

After dos2unix, my cacti_rrdsvc looks like:

Code: Select all

#!/bin/bash
# [comments]
PROGPATH="/srv/www/htdocs/cacti/plugins/boost/"
PROG="boost_server.php"
[ -f $PROGPATH$PROG ] || exit 0
RETVAL=0
start() {
        echo -n $"Starting Cacti RRDTool Process: "
        if [ -e /var/lock/subsys/$PROG ]; then
                echo "    [  ESC[31;01mFAILESC[m  ]"
        else
                $PROGPATH$PROG > /dev/null 2>&1 &
                touch /var/lock/subsys/$PROG
                echo "    [  ESC[32;01m OK ESC[m  ]"
        fi
        return 0
}
stop() {
        echo -n $"Stopping Cacti RRDTool Process: "
        if [ -e /var/lock/subsys/$PROG ]; then
                killall $PROG > /dev/null 2>&1
                rm -f /var/lock/subsys/$PROG  > /dev/null 2>&1
                echo "    [  ESC[32;01m OK ESC[m  ]"
        else
                echo "    [  ESC[31;01mFAILESC[m  ]"
        fi
        return 0
}
restart() {
        stop
        start
}
status() {
        echo -n $"Status of Cacti RRDTool Process: "
        if [ -e /var/lock/subsys/$PROG ]; then
                echo "running ..."
        else
                echo "down"
        fi
        return 0
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        restart
        ;;
  status)
        status
    ;;
  *)
        echo $"Usage: $0 {start|stop|restart|status}"
        exit 1
esac
exit $?
How can I cleanly unistall the service, to try again? Was the dos2unix conversion correct?
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

It's a linux service now, you don't need to uninstall it, you just need to turn it on. You've set it up as a service, so it WILL turn on on reboots, but you still haven't started it.

Code: Select all

./cacti_rrdsvc start
That should do it.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

Nope, the service was running.

Code: Select all

cacti:~ # service cacti_rrdsvc restart
Stopping Cacti RRDTool Process:     [   OK   ]
Starting Cacti RRDTool Process:     [   OK   ]
cacti:~ #  telnet localhost 9050
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused
cacti:~ # php /srv/www/htdocs/cacti/plugins/boost/boost_server.php -d
2008:08:07 21:39:24 - Cacti RRDtool Service Started
^C
cacti:~ #
The RRDtool service does not react.
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

Try launching it yourself, again, and instead of ctrl-c'ing it, try telnetting again.

Also, when you ./cacti_rrdsvc start, is the php script actually running, or does it just say "Start OK" and not do anything?

Also, do you have selinux, or any other firewall software enabled?
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

I disabled the firewall.

Console 1:

Code: Select all

cacti:~ # php /srv/www/htdocs/cacti/plugins/boost/boost_server.php -d
2008:08:07 21:56:06 - Cacti RRDtool Service Started
2008:08:07 21:56:18 - Host Connected '127.0.0.1'
2008:08:07 21:56:18 - Host Validated '127.0.0.1'
No further response on console 1.

The last 2 lines appeared when I connected via telnet on console 2:

Code: Select all

cacti:~ # telnet localhost 9050
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
No further resonse on console 2.

TElnet session closes when I CTRL+C the PHP script in console 1.

edit:interesting:

Code: Select all

cacti:~ # ./cacti_rrdsvc start
-bash: ./cacti_rrdsvc: No such file or directory
how can that be? I did all those chkconfig thingies...

Whats the difference between "./cacti_rrdsvc start" and "service cacti_rrdsvc start"? The ladder one works.
Last edited by Atkatla on Thu Aug 07, 2008 3:08 pm, edited 1 time in total.
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

Well, before you were doing

Code: Select all

service cacti_rrdsvc start
Which I didn't notice, so you're probably not in the same directory as that startup script.

So, just do what you did before, again. And all should be working happily.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

Ahh, something with the autostart was/is wrong. The script is only running when I enable it via console. As soon as I close the console or CTRL+C it, the boost server goes down.

How do I solve that problem? I thought chkconfig --add cacti_rrdsvc did add it to runlevel 3 and 5? As I'm new to Unix please consider the typical beginner errors which I possibly made. :D

paste from an earlier post:
When I did "chkconfig --add cacti_rrdsvc" i got the following output:
Code:
insserv: warning: script 'S01cacti_rrdsvc' missing LSB tags and overrides
insserv: warning: script 'cacti_rrdsvc' missing LSB tags and overrides
cacti_rrdsvc 0:off 1:off 2:off 3:on 4:off 5:on 6:off
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

At that point, you should just be able to start the service and log out.

If not, then I don't know. Might be a weird compiliation error in php causing it to bind to your terminal. The devs might have a better idea, but I think they're all at Linux World today.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

Thanks for the help.

According to a suggestion from TheWitness in another thread I did the following:

Code: Select all

cactiuser@cacti:~/plugins/boost> php poller_boost.php -d -f
PHP Warning:  session_start(): open(/var/lib/php5/sess_316cqdkqbidoarujfl3tno0hvejtcbd4, O_RDWR) failed: Permission denied (13) in /srv/www/htdocs/cacti/include/global.php on line 148
This is one of those warnings which reads as if it shouldnt be there...
Could it be an access rights problem?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yup, it's a permissions problem. Change that and you will be golden.

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?
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

But change the permission of what file? /me=unix-noob
Atkatla
Cacti User
Posts: 69
Joined: Mon Apr 14, 2008 3:17 pm

Post by Atkatla »

It wasnt a permission problem.

I had to add "php" before "$PROGPATH$PROG" in the start/else section of the script. Now its working. Thanks for your help anyway. :D
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests