Getting this error on cacti when trying to run the SPINE poller as user “cacti”
# sudo -u cacti /usr/local/spine/bin/spine -C /usr/local/spine/etc/spine.conf
SPINE: Using spine config file [/usr/local/spine/etc/spine.conf]
Version 1.2.27 starting
ERROR: Spine Log File Could Not Be Opened/Created
2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622796531520] ERROR: SS[0] Script Server did not start properly return message was: ‘Configuration file include/config.php is present, but unreadable.
‘2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] PHP Script Server communications lost sending Command[/usr/share/cacti/scripts/ss_apache_stats.php ss_apache_stats ‘172.22.1.19’ hits
]. Restarting PHP Script Server2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] Script Server did not start properly return message was: ‘Configuration file include/config.php is present, but unreadable.
‘2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] PHP Script Server communications lost sending Command[/usr/share/cacti/scripts/ss_apache_stats.php ss_apache_stats ‘172.22.1.19’ hits
]. Restarting PHP Script Server2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] Script Server did not start properly return message was: ‘Configuration file include/config.php is present, but unreadable.
‘2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] PHP Script Server communications lost sending Command[/usr/share/cacti/scripts/ss_apache_stats.php ss_apache_stats ‘172.22.1.19’ hits
]. Restarting PHP Script Server2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] Script Server did not start properly return message was: ‘Configuration file include/config.php is present, but unreadable.
‘2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] PHP Script Server communications lost sending Command[/usr/share/cacti/scripts/ss_apache_stats.php ss_apache_stats ‘172.22.1.19’ kbytes
]. Restarting PHP Script Server2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] Script Server did not start properly return message was: ‘Configuration file include/config.php is present, but unreadable.
‘2025-05-20 00:17:23 – SPINE: Poller[1] PID[77396] PT[140622562326080] ERROR: SS[0] PHP Script Server communications lost sending Command[/usr/share/cacti/scripts/ss_apache_stats.php ss_apache_stats ‘172.22.1.19’ kbytes
The PHP scripts executed by the Script Server running under “cacti” user might be having permissions issues. i.e. the PHP scripts executed by the Spine poller (which might be running or trying to access resources as the cacti
user) are encountering permission issues when trying to access the database configuration.
Grant read permissions to the cacti
user (or the user running the PHP scripts): If the PHP scripts are indeed running as the cacti
user, you’ll need to give this user read access to the /etc/cacti/db.php
file. You can do this by adding the cacti
user to the apache
group (if that’s appropriate for your system) or by changing the group ownership of db.php
to a group that cacti
is a member of, and then granting read permissions to that group. Alternatively, you could grant read permissions to “others,” but this is generally less secure.
Example (adding cacti
to the apache
group):
# usermod -a -G apache cacti
After this, the cacti
user should have read access to /etc/cacti/db.php
because the apache
group has read permissions. You might need to log out and back in as the cacti
user for the group membership to update.
Or
Ensure the PHP Script Server runs as the apache
user: If possible, configure the PHP Script Server within Cacti to run as the apache
user, which already has read access to the configuration file.