Hi guys,
I've installed cacti following this guide https://computingforgeeks.com/install-a ... on-ubuntu/ as I am not very experienced in Linux,
but in the end I cannot make cacti service running.... This is what I get:
root@test:/etc/default# sudo systemctl status cactid.service
● cactid.service - Cacti Daemon Main Poller Service
Loaded: loaded (/etc/systemd/system/cactid.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) since Sun 2022-03-20 10:09:35 UTC; 1s ago
Process: 263373 ExecStart=/var/www/html/cacti/cactid.php (code=exited, status=0/SUCCESS)
I am running Ubuntu 20.04.
When I open http://serverip/cacti i get below:
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2021 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
lines ommited
*/
include('./include/auth.php');
top_header();
....
Can somebody help with this, where should I look for the issue?
Cacti service not running
Moderators: Developers, Moderators
Re: Cacti service not running
Try to use official documentation. There is howto for ubuntu too:
https://docs.cacti.net/
https://docs.cacti.net/
Let the Cacti grow!
Re: Cacti service not running
It turned out that PHP MySQL module was missing:
root@testmachine:/home/admin# tail -f /var/log/syslog | grep cacti
*** testmachine systemd[1]: cactid.service: Scheduled restart job, restart counter is at 103613.
*** testmachine cactid.php[1768241]: FATAL: Connection to Cacti database failed. Please ensure:
*** testmachine cactid.php[1768241]: - the PHP MySQL module is installed and enabled.
*** testmachine cactid.php[1768241]: - the database is running.
*** testmachine cactid.php[1768241]: - the credentials in config.php are valid.
*** testmachine systemd[1]: cactid.service: Succeeded.
Fix: sudo apt install php libapache2-mod-php php-mysql
Then I got this error:
Mar 25 22:15:15 123 systemd[1]: cactid.service: Scheduled restart job, restart counter is at 103665.
Mar 25 22:15:15 123 cactid.php[1770120]: System log file is not available for writing, please enable write access
Mar 25 22:15:15 123 cactid.php[1770120]: Log: /var/www/html/cacti/log/cacti.log
Mar 25 22:15:15 123 systemd[1]: cactid.service: Succeeded.
Fix: chown -R www-data:www-data /var/www/html/cacti/
root@testmachine:/home/admin# tail -f /var/log/syslog | grep cacti
*** testmachine systemd[1]: cactid.service: Scheduled restart job, restart counter is at 103613.
*** testmachine cactid.php[1768241]: FATAL: Connection to Cacti database failed. Please ensure:
*** testmachine cactid.php[1768241]: - the PHP MySQL module is installed and enabled.
*** testmachine cactid.php[1768241]: - the database is running.
*** testmachine cactid.php[1768241]: - the credentials in config.php are valid.
*** testmachine systemd[1]: cactid.service: Succeeded.
Fix: sudo apt install php libapache2-mod-php php-mysql
Then I got this error:
Mar 25 22:15:15 123 systemd[1]: cactid.service: Scheduled restart job, restart counter is at 103665.
Mar 25 22:15:15 123 cactid.php[1770120]: System log file is not available for writing, please enable write access
Mar 25 22:15:15 123 cactid.php[1770120]: Log: /var/www/html/cacti/log/cacti.log
Mar 25 22:15:15 123 systemd[1]: cactid.service: Succeeded.
Fix: chown -R www-data:www-data /var/www/html/cacti/
Who is online
Users browsing this forum: No registered users and 0 guests