Basic installations problems

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

Moderators: Developers, Moderators

Post Reply
etc
Cacti User
Posts: 52
Joined: Thu Apr 19, 2007 2:36 pm

Basic installations problems

Post by etc »

From the INSTALL file, it's not clear what "your full Cacti path" is. Is it here Cacti is installed?

Also, when I go to the http://cacti_server/cacti, all I get is an Index page with nothing on it. Certainly no login prompt.
I made sure that httpd was started. This is on Linux Advanced Server 4.


7. Add a line to your /etc/crontab file similar to:

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Replace cactiuser with the valid user specified in the previous step.

Replace /var/www/html/cacti/ with your full Cacti path.

8. Point your web browser to:

http://your-server/cacti/

Log in the with a username/password of admin. You will be required to
change this password immediately. Make sure to fill in all of the path
variables carefully and correctly on the following screen.

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Full cacti path refers to the path, where all cacti php files live in. The crontab calls poller.php, so you must enter the full path to that very file.
Reinhard
etc
Cacti User
Posts: 52
Joined: Thu Apr 19, 2007 2:36 pm

Post by etc »

OK, I put the exact path in the crontab entry, where the php files are.
To test, I su'ed to the cacti user and tried to execute it manually and here is what I got, it doesn't look right. And there is nothing on the web page when I go to it.



[cacti@bizcacti ~]$ /usr/local/cacti-0.8.6j/poller.php
sh: -: command not found
Rael
Cacti User
Posts: 129
Joined: Thu Apr 05, 2007 9:28 am

Post by Rael »

etc wrote:OK, I put the exact path in the crontab entry, where the php files are.
To test, I su'ed to the cacti user and tried to execute it manually and here is what I got, it doesn't look right. And there is nothing on the web page when I go to it.



[cacti@bizcacti ~]$ /usr/local/cacti-0.8.6j/poller.php
sh: -: command not found
Of course it wouldn't look right, you're trying to execute the php script as a shell script.

type `php /usr/local/cacti-0.8.6j/poller.php` to initiate the php processor
etc
Cacti User
Posts: 52
Joined: Thu Apr 19, 2007 2:36 pm

Post by etc »

What does this mean?

Code: Select all



root:/usr/local/cacti-0.8.6j # php  /usr/local/cacti-0.8.6j/poller.php
sh: -: command not found
Content-type: text/html
X-Powered-By: PHP/4.3.9

04/23/2007 05:24:59 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
04/23/2007 05:24:59 AM - SYSTEM STATS: Time:293.1492 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
PHP Warning:  pclose(): 44 is not a valid stream resource in /usr/local/cacti-0.8.6j/lib/rrd.php on line 48
[/b]
etc
Cacti User
Posts: 52
Joined: Thu Apr 19, 2007 2:36 pm

Post by etc »

I think it's making progress as it's a more meaningful error message.



# php /usr/local/cacti-0.8.6j/poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

04/23/2007 06:03:54 AM - CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server on 'bizcacti'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
sh: -: command not found

User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

etc wrote:I think it's making progress as it's a more meaningful error message.



# php /usr/local/cacti-0.8.6j/poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

04/23/2007 06:03:54 AM - CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server on 'bizcacti'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
sh: -: command not found

change bizcacti to localhost (assuming you are not connecting to mysql on another box)
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
etc
Cacti User
Posts: 52
Joined: Thu Apr 19, 2007 2:36 pm

Post by etc »

Yes, MySQL is on the same box. Still having issues with authentication - could it be the password is not synced?


# php /usr/local/cacti-0.8.6j/poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

04/23/2007 08:22:48 AM - CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
sh: -: command not found
04/23/2007 08:27:41 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
04/23/2007 08:27:41 AM - SYSTEM STATS: Time:292.8034 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources: RRDsProcessed:0
PHP Warning: pclose(): 23 is not a valid stream resource in /usr/local/cacti-0.8.6j/lib/rrd.php on line 48


User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

the password in config.php must match that of the mysql user who can manage the cacti database.
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
arevelo
Posts: 6
Joined: Thu Aug 07, 2008 8:09 pm
Location: ecuador

poller.php iisn't working???

Post by arevelo »

Please help me
how can i know if the poller.php is working ?, I ran from cli:
[root@localhost cacti]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

but i didn't have another line that told if all is ok. I don''t known if it's de reason why I can't do any graph with cacti , allways recive the same error:
RRDTool Says:
ERROR: opening '/opt/lampp/htdocs/cacti/rra/switch_gestion_mplsatm_snmp_oid_12.rrd': No such file or directory


thanks
grifs71
Posts: 14
Joined: Wed Apr 22, 2009 12:31 pm

Re: poller.php iisn't working???

Post by grifs71 »

arevelo wrote:Please help me
how can i know if the poller.php is working ?, I ran from cli:
[root@localhost cacti]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

but i didn't have another line that told if all is ok. I don''t known if it's de reason why I can't do any graph with cacti , allways recive the same error:
RRDTool Says:
ERROR: opening '/opt/lampp/htdocs/cacti/rra/switch_gestion_mplsatm_snmp_oid_12.rrd': No such file or directory


thanks

I had this same issue, I battled through the cacti and did a chown cactiuser:apache on rra however I am not really sure what I did to make it work now.

Gandalf helped me a lot on here see my post...

http://forums.cacti.net/viewtopic.php?p=164260#164260
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest