cacti 1.2.3 fresh install web interface broken

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

Moderators: Moderators, Developers

Author
Message
artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

cacti 1.2.3 fresh install web interface broken

#1 Post by artsx » Fri Jun 07, 2019 10:50 am

hi forum members,

i am very new to cacti, tried to install it, however, it is bad experience for me as the page after install is broken in a sense that only text is being displayed, no any tabs nothing are shown as it is shown in CACTI screenshots. I literally followed the install procedure from this resource:

https://www.osradar.com/how-to-install- ... -centos-7/

i guess the install guide is pretty the same in all internet resources. i was just having issues with mariadb version, so i've created a new report and installed 10.3 version of mariadb from here:

# MariaDB 10.3 CentOS repository list - created 2018-11-19 23:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

mysqladmin Ver 9.1 Distrib 10.3.15-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Server version 10.3.15-MariaDB
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 25 sec

Threads: 7 Questions: 1 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 0.040

PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


however as you can see in attached screenshots, i don't get any kind of graphics any kind of tabs or whatever in the web interface, just text...

can you please tell me what is wrong with my setup?

install steps:

yum install httpd httpd-devel mariadb-server -y
yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp net-snmp-utils net-snmp-libs rrdtool -y

systemctl start httpd.service; systemctl start mariadb.service; systemctl start snmpd.service
systemctl enable httpd.service;systemctl enable mariadb.service;systemctl enable snmpd.service

yum install cacti -y
mysqladmin -u root password
mysql -u root -p
create database cacti;
GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY '';
FLUSH privileges;
quit;

rpm -ql cacti | grep cacti.sql
mysql -u cacti -p cacti < /usr/share/doc/cacti-1.2.3/cacti.sql

vi /etc/cacti/db.php
cacti/

vi /etc/httpd/conf.d/cacti.conf


systemctl restart httpd.service

uncomment below line in cron below:

vi /etc/cron.d/cacti
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p mysql

mysql -u root -p
GRANT SELECT ON mysql.time_zone_name TO [email protected];
FLUSH privileges;
quit;

Installation completed.
Attachments
profile.png
profile
profile.png (20.72 KiB) Viewed 1345 times
paths.png
paths
paths.png (19.69 KiB) Viewed 1345 times
permissions.png
permissions
permissions.png (24.68 KiB) Viewed 1345 times
3rd screen.png
thirds screenshot
3rd screen.png (16.73 KiB) Viewed 1345 times
initial screen.jpg
initial screen
initial screen.jpg (90.85 KiB) Viewed 1345 times

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#2 Post by artsx » Fri Jun 07, 2019 10:55 am

rest of screenhsots
Attachments
install completed.txt
(29.3 KiB) Downloaded 45 times
interface.png
interface.png (12.52 KiB) Viewed 1344 times
complete.png
complete.png (12.31 KiB) Viewed 1344 times
confirm install.png
confirm install.png (6.47 KiB) Viewed 1344 times
template setup.png
template setup.png (20.55 KiB) Viewed 1344 times

netniV
Cacti Guru User
Posts: 2788
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti 1.2.3 fresh install web interface broken

#3 Post by netniV » Fri Jun 07, 2019 3:39 pm

Make sure the url_path value is correct in the config.php as the CSS is not being found. See your apache logs to see what is being accessed and failing.

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#4 Post by artsx » Fri Jun 07, 2019 6:06 pm

thanks for quick turnaround.

$url_path is currect, otherwise i'd not be able to access it at all, no?

Code: Select all

cat /usr/share/cacti/include/config.php | grep url_pa
 * Set the $url_path to point to the default URL of your cacti install.
$url_path = '/cacti/';
actually, i had activated debug logs:

Code: Select all

cat /etc/httpd/conf/httpd.conf  | egrep "ErrorLog|LogLevel" | grep -v "^#"
ErrorLog "logs/error_log"
LogLevel debug
however attached is what i am getting in /var/log/httpd/error_log. no evidence of errors.

i've even tried to chown the directory, with no luck getting it working:

Code: Select all

chown -R apache:apache  /usr/share/cacti/
i am stuck :(
Attachments
error_log.txt
apache err log
(18.09 KiB) Downloaded 43 times

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#5 Post by artsx » Fri Jun 07, 2019 7:46 pm

btw, just noticed below warnings caused by cron. was supposed to modify global.conf and change the username and password:

Code: Select all

Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 875 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)
Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 876 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)
Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 877 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)
Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 878 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)
Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 879 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)
Jun  8 04:40:01 my-server mysqld: 2019-06-08  4:40:01 880 [Warning] Access denied for user 'cactiuser'@'localhost' (using password: YES)

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#6 Post by artsx » Sat Jun 08, 2019 10:16 am

tried to "navigate" thru the menu, i found that graphs are shown, even tho they are not correctly filled by real values, but still generated and shown. however, css is not being loaded

can you please let me know how to fight the css issue?
Attachments
graphs shown.PNG
graphs shown.PNG (201.54 KiB) Viewed 1303 times

cigamit
Developer
Posts: 2780
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: cacti 1.2.3 fresh install web interface broken

#7 Post by cigamit » Sat Jun 08, 2019 11:20 am

Honestly just looks like you don't have
$url_path
set correctly in your config.php. Load up the DevTools for your browser, and see if its not able to load any files.

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#8 Post by artsx » Sat Jun 08, 2019 11:29 am

thanks for reply.

i think my url_path is correct, however, css files seems to be broken.
i've attached the output of web browser console with errors.

Code: Select all

Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. main.css:2136:10
Error in parsing value for ‘background’.  Declaration dropped. main.css:2149:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2151:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2152:14
Expected color but found ‘show’.  Error in parsing value for ‘color’.  Declaration dropped. main.css:2260:9
Error in parsing value for ‘background’.  Declaration dropped. main.css:2275:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2277:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2278:14
Error in parsing value for ‘float’.  Declaration dropped. main.css:2350:9
Error in parsing value for ‘background’.  Declaration dropped. main.css:2416:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2418:14
Error in parsing value for ‘background’.  Declaration dropped. main.css:2419:14
Stylesheets without CSSOM changes reparsed to check for errors. Refresh the page to also see errors from stylesheets changed from CSSOM and from style attributes.
i am not really good at html/css.

did any body in general installed cacti 1.2.3 from yum and that worked for them?

PS: my url_path

Code: Select all

cat /usr/share/cacti/include/config.php | grep url_pa
 * Set the $url_path to point to the default URL of your cacti install.
$url_path = '/cacti/';
PS2: my distro:

Code: Select all

cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
Attachments
errors from browser console.txt
(17.59 KiB) Downloaded 44 times

cigamit
Developer
Posts: 2780
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: cacti 1.2.3 fresh install web interface broken

#9 Post by cigamit » Sat Jun 08, 2019 11:42 am

What browser are you using? Any browser addons that might be affecting it? Something seems wrong. You are getting this error for most of your CSS files
The stylesheet http://my-server/cacti/include/themes/m ... 921bc369ad was not loaded because its MIME type, “text/plain”, is not “text/css”.
Yet, in Cacti we very clearly set the correct MIME type (from my server).
https://github.com/Cacti/cacti/blob/dev ... .php#L5122
<link href='/include/themes/dark/default/style.css?a11dfd5064dcb6bf4fe1ea4c2e188d77' type='text/css' rel='stylesheet'>
You might post the source of the page (just the top headers part).

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#10 Post by artsx » Sat Jun 08, 2019 11:58 am

tried on both firefox and chrome. both have same issue.
strange thing happened. once i closed the developer console, page got normally loaded. really cannot understand what is going on

it does not allow me to attach the source of page.

Code: Select all

<!DOCTYPE html>
<html>
<head>
		<meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1'>
	<meta content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0' name='viewport'>
	<meta name='apple-mobile-web-app-capable' content='yes'>
	<meta name='mobile-web-app-capable' content='yes'>
	<meta name='robots' content='noindex,nofollow'>
	<title>Console </title>
	<meta http-equiv='Content-Type' content='text/html;charset=utf-8'>
	<script type='text/javascript'>
		var theme='modern';
		var searchFilter='Enter a search term';
		var searchRFilter='Enter a regular expression';
		var noFileSelected='No file selected';
		var timeGraphView='Time Graph View';
		var filterSettingsSaved='Filter Settings Saved';
		var spikeKillResuls='SpikeKill Results';
		var utilityView='Utility View';
		var realtimeClickOn='Click to view just this Graph in Realtime';
		var realtimeClickOff='Click again to take this Graph out of Realtime';
		var treeView='Tree View';
		var listView='List View';
		var previewView='Preview View';
		var cactiHome='Cacti Home';
		var cactiProjectPage='Cacti Project Page';
		var cactiCommunityForum='User Community';
		var cactiDocumentation='Documentation';
		var reportABug='Report a bug';
		var aboutCacti='About Cacti';
		var spikeKillResults='SpikeKill Results';
		var showHideFilter='Click to Show/Hide Filter';
		var clearFilterTitle='Clear Current Filter';
		var clipboard='Clipboard';
		var clipboardID='Clipboard ID';
		var clipboardNotAvailable='Copy operation is unavailable at this time';
		var clipboardCopyFailed='Failed to find data to copy!';
		var clipboardUpdated='Clipboard has been updated';
		var clipboardNotUpdated='Sorry, your clipboard could not be updated at this time';
		var defaultSNMPSecurityLevel='authPriv';
		var defaultSNMPAuthProtocol='MD5';
		var defaultSNMPPrivProtocol='DES';
		var passwordPass='Passphrase length meets 8 character minimum';
		var passwordTooShort='Passphrase too short';
		var passwordMatchTooShort='Passphrase matches but too short';
		var passwordNotMatchTooShort='Passphrase too short and not matching';
		var passwordMatch='Passphrases match';
		var passwordNotMatch='Passphrases do not match';
		var errorOnPage='Sorry, we could not process your last action.';
		var errorNumberPrefix='Error:';
		var errorReasonPrefix='Reason:';
		var errorReasonTitle='Action failed';
		var errorReasonUnexpected='The response to the last action was unexpected.';
		var mixedReasonTitle='Some Actions failed';
		var mixedOnPage='Note, we could not process all your actions.  Details are below.';
		var sessionMessageTitle='Operation successful';
		var sessionMessageSave='The Operation was successful.  Details are below.';
		var sessionMessageOk='Ok';
		var sessionMessagePause='Pause';
		var sessionMessageContinue='Continue';
		var sessionMessageCancel='Cancel';
		var zoom_i18n_zoom_in='Zoom In';
		var zoom_i18n_zoom_out='Zoom Out';
		var zoom_i18n_zoom_out_factor='Zoom Out Factor';
		var zoom_i18n_timestamps='Timestamps';
		var zoom_i18n_zoom_2='2x';
		var zoom_i18n_zoom_4='4x';
		var zoom_i18n_zoom_8='8x';
		var zoom_i18n_zoom_16='16x';
		var zoom_i18n_zoom_32='32x';
		var zoom_i18n_zoom_out_positioning='Zoom Out Positioning';
		var zoom_i18n_mode='Zoom Mode';
		var zoom_i18n_graph='Graph';
		var zoom_i18n_quick='Quick';
		var zoom_i18n_advanced='Advanced';
		var zoom_i18n_newTab='Open in new tab';
		var zoom_i18n_save_graph='Save graph';
		var zoom_i18n_copy_graph='Copy graph';
		var zoom_i18n_copy_graph_link='Copy graph link';
		var zoom_i18n_on='Always On';
		var zoom_i18n_auto='Auto';
		var zoom_i18n_off='Always Off';
		var zoom_i18n_begin='Begin with';
		var zoom_i18n_center='Center';
		var zoom_i18n_end='End with';
		var zoom_i18n_disabled='Disabled';
		var zoom_i18n_close='Close';
		var zoom_i18n_settings='Settings';
		var zoom_i18n_3rd_button='3rd Mouse Button';
	</script>
	<link href='/cacti/include/themes/modern/images/favicon.ico' rel='shortcut icon'>
	<link href='/cacti/include/themes/modern/images/cacti_logo.gif' rel='icon' sizes='96x96'>
	<link href='/cacti/include/themes/modern/jquery.zoom.css?aabc6f45db68bd321ca27338899ef75d' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery-ui.css?a7406d654968e3c1531207059a9d15d2' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/default/style.css?b16e44c8ea2180ea769a22921bc369ad' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.multiselect.css?e8d1b3ce433249ef1f2f15343caa74fb' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.timepicker.css?431ab7d4ef48afd9c39a647c5c990b0a' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.colorpicker.css?24366e47db1fb3b58658a53d9a445214' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/c3.css?4aef467349628c8e407ecc205eac5375' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/pace.css?813d842ea49d68287a59d7f49575aaa6' type='text/css' rel='stylesheet'>
<link href='/cacti/include/fa/css/fontawesome.css?c33e55a3e79984d24f3309545701cb1b' type='text/css' rel='stylesheet'>
<link href='/cacti/include/vendor/flag-icon-css/css/flag-icon.css?216e807dd0b784846799cb18051f250d' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/main.css?f268fc58192e437f36db1c4b92e2e7d2' type='text/css' rel='stylesheet'>
<script type='text/javascript' src='/cacti/include/js/screenfull.js?60a2ad1d452950179fa4d2c5d1b5dee4'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.js?2f0d15c70b7e652d5d61ed4032eb44af'></script>
<script type='text/javascript' src='/cacti/include/js/jquery-ui.js?f1f075fe32aca8216e55c5d00106fba7'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.ui.touch.punch.js?4195aad6f616651c00557e84c6721646'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.cookie.js?0b804d4f90de70b032a9986b22165b75'></script>
<script type='text/javascript' src='/cacti/include/js/js.storage.js?dbcd4e6ad90c47adfa9dd509ceb55eb9'></script>
<script type='text/javascript' src='/cacti/include/js/jstree.js?9c5fd7680b6c205ef0d84938a714863c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.hotkeys.js?fbf82bcab286e9fc5cdf863eb067230f'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablednd.js?a33b14ebf8ce2abf7911e62cbc19e0c5'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.zoom.js?ebe407101d8d61e617730e487c2739f2'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.multiselect.js?50c27f2739136f7628a37ea9490f84b8'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.multiselect.filter.js?eb99fd8e2b0736c839c1b0a736af21c0'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.timepicker.js?f29132ab24085f909242175ad11cfcbc'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.colorpicker.js?3b7032780b24b9b48050e5d245a36260'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.js?8d331985e11cfc65649a915073cb30ed'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.widgets.js?3cc0d7b3426e1db1e4a099db18b17e3c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.pager.js?8ca32d30195c98492cd028f582f07c8c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.metadata.js?bdd7532ce75cce796a5451bd4322d61f'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.sparkline.js?c7638b825bc7deb1cf58c990825d35b2'></script>
<script type='text/javascript' src='/cacti/include/js/Chart.js?ae4cd3db34d0ea7ea1a9596d5d4120e6'></script>
<script type='text/javascript' src='/cacti/include/js/dygraph-combined.js?b5b448f71f8c3eb4a39506299bd81b0c'></script>
<script type='text/javascript' src='/cacti/include/js/d3.js?deffc46f8897f03577db78366eeb8c42'></script>
<script type='text/javascript' src='/cacti/include/js/c3.js?7d5f7e1808389a5ef7184d395cff08e8'></script>
<script type='text/javascript' src='/cacti/include/js/pace.js?30fbf6c62d78d3367fa50bd51913200c'></script>
<script type='text/javascript' src='/cacti/include/realtime.js?dc16bb28852bb26232ab9d269210abdd'></script>
<script type='text/javascript' src='/cacti/include/layout.js?fbb280abb7bd39a609438a67f991da29'></script>
<script type='text/javascript' src='/cacti/include/themes/modern/main.js?aa10c919b68dbbd87eb1a0a62212db43'></script>
<script type="text/javascript">if (top != self) {top.location.href = self.location.href;}</script><script type="text/javascript">var csrfMagicToken = "sid:2005e2258a6b8c290655bbf40071a10fd39e5327,1560012412";var csrfMagicName = "__csrf_magic";</script><script src="/cacti/include/vendor/csrf/csrf-magic.js" type="text/javascript"></script></head>
<body>
	<div id='cactiPageHead' class='cactiPageHead' role='banner'>
		<div id='tabs'><div class='maintabs'><nav><ul role='tablist'>
Attachments
plugins.PNG
plugins.PNG (20.33 KiB) Viewed 1289 times
screen shot - loaded.PNG
screen shot - loaded.PNG (17.15 KiB) Viewed 1289 times
addons.PNG
addons.PNG (16.4 KiB) Viewed 1289 times
themes.PNG
themes.PNG (14.93 KiB) Viewed 1289 times

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#11 Post by artsx » Sat Jun 08, 2019 12:11 pm

deleted
Last edited by artsx on Sat Jun 08, 2019 2:08 pm, edited 1 time in total.

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#12 Post by artsx » Sat Jun 08, 2019 1:05 pm

the same issue is present with IE also
tried from another laptop: still no css being loaded. i don't think the issue is on local side or it is browser related, but on the remote(server) side.

any idea is appreciated.

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#13 Post by artsx » Mon Jun 10, 2019 10:05 am

can you please help guys?

artsx
Posts: 19
Joined: Thu Jun 06, 2019 8:10 pm

Re: cacti 1.2.3 fresh install web interface broken

#14 Post by artsx » Mon Jun 10, 2019 12:41 pm

i've upgraded to 1.2.4 (followed this procedure https://www.cacti.net/downloads/docs/html/upgrade.html)

but the issue is still present :(

cigamit
Developer
Posts: 2780
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: cacti 1.2.3 fresh install web interface broken

#15 Post by cigamit » Mon Jun 10, 2019 12:57 pm

It isn't a problem that I can see with your Cacti install, it seems to either be an issue with your browser, or maybe a web proxy or something you are going through. Something on your side is blocking most of the CSS / Javascript.

Post Reply