Upgrade issue from version 1.1.19 to 1.2.11

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

Moderators: Developers, Moderators

Post Reply
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I am having lots of issue upgrading from Cacti 1.1.19 on CentOS release 6.10 to 1.2.11. The version I am trying to upgrade is a Cacti installed from the repository, and seems to be working ok before I try to upgrade.

I have tried to do this 2 different ways :-

1. Install in place on the existing server, using the process outlined here https://www.cacti.net/downloads/docs/html/upgrade.html. When I try to navigate to the http://your-server/cacti/ address I get a 500 error. On investigating the httpd error_log I see :-

[Thu Apr 23 01:40:54 2020] [error] [client 192.168.193.52] PHP Parse error: syntax error, unexpected '[' in /usr/share/cacti/lib/functions.php on line 5283
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I am also have problems putting the full post above here. If I put a big post in with all the detail, I am getting :-

Forbidden
You don't have permission to access /posting.php on this server.

So putting the post on multiple posts....
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

2. I have tried migrating to a new build Centos 8 box I have built and installing from source. But when I go to sign onto the web intereface I get the following error :-

Fatal Error - Cacti Database Not Initialized
The Cacti Database has not been initialized. Please initilize it before continuing.

Also, at some point I also get the following error, but I have not figured out exactly what triggers this :-
I also can get :-
[root@nms cacti]# mysql -u root –p
ERROR 1300 (HY000): Invalid utf8 character string: '\x96p'

But I am not sure which step is causing this issue.
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

If just try and do the basic install using the process outline at https://computingforgeeks.com/how-to-in ... -centos-8/ on a new Centos 8 build, and a new install of cacti and fresh database, I get further, but still does not work. Everything works until I get up to getting the http login page. But the username of admin/admin does not seem to work and it just goes straight back to the login screen.

Thanks in advance for the help.
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I have used the following guides to do the above :-

For the upgrade steps :-
https://www.cacti.net/downloads/docs/html/upgrade.htm for the upgrade steps.

For new build :-
https://computingforgeeks.com/how-to-in ... -centos-8/

and
https://computingforgeeks.com/how-to-in ... on-rhel-8/
for mariaDB install.

For migrating to a new box :-
http://amar-linux.blogspot.com/2017/04/ ... erver.html

Thanks in advance for the help. Sorry this post is in multiple parts and a little disjointed, but it did not seem to let me post a single more consolidated post.
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I found the repair_database.php script and there seems to be some issues there. See below :-

[root@centos64-svr-64 cli]# php repair_database.php
Repairing All Cacti Database Tables
Repairing Table -> 'aggregate_graph_templates' Successful
Repairing Table -> 'aggregate_graph_templates_graph' Successful
Repairing Table -> 'aggregate_graph_templates_item' Successful
Repairing Table -> 'aggregate_graphs' Successful
Repairing Table -> 'aggregate_graphs_graph_item' Successful
Repairing Table -> 'aggregate_graphs_items' Successful
Repairing Table -> 'automation_devices' Successful
Repairing Table -> 'automation_graph_rule_items' Successful
Repairing Table -> 'automation_graph_rules' Successful
Repairing Table -> 'automation_ips' Successful
Repairing Table -> 'automation_match_rule_items' Successful
Repairing Table -> 'automation_networks' Successful
Repairing Table -> 'automation_processes' Successful
Repairing Table -> 'automation_snmp' Successful
Repairing Table -> 'automation_snmp_items' Successful
Repairing Table -> 'automation_templates' Successful
Repairing Table -> 'automation_tree_rule_items' Successful
Repairing Table -> 'automation_tree_rules' Successful
Repairing Table -> 'cdef' Successful
Repairing Table -> 'cdef_items' Successful
Repairing Table -> 'color_template_items' Successful
Repairing Table -> 'color_templates' Successful
Repairing Table -> 'colors' Successful
Repairing Table -> 'data_input' Successful
Repairing Table -> 'data_input_data' Successful
Repairing Table -> 'data_input_fields' Successful
Repairing Table -> 'data_local' Successful
Repairing Table -> 'data_source_profiles' Successful
Repairing Table -> 'data_source_profiles_cf' Successful
Repairing Table -> 'data_source_profiles_rra' Successful
Repairing Table -> 'data_source_purge_action' Successful
Repairing Table -> 'data_source_purge_temp' Successful
Repairing Table -> 'data_source_stats_daily' Successful
Repairing Table -> 'data_source_stats_hourly' Successful
Repairing Table -> 'data_source_stats_hourly_cache' Successful
Repairing Table -> 'data_source_stats_hourly_last' Successful
Repairing Table -> 'data_source_stats_monthly' Successful
Repairing Table -> 'data_source_stats_weekly' Successful
Repairing Table -> 'data_source_stats_yearly' Successful
Repairing Table -> 'data_template' Successful
Repairing Table -> 'data_template_data' Successful
Repairing Table -> 'data_template_rrd' Successful
Repairing Table -> 'external_links' Successful
Repairing Table -> 'graph_local' Successful
Repairing Table -> 'graph_template_input' Successful
Repairing Table -> 'graph_template_input_defs' Successful
Repairing Table -> 'graph_templates' Successful
Repairing Table -> 'graph_templates_gprint' Successful
Repairing Table -> 'graph_templates_graph' Successful
Repairing Table -> 'graph_templates_item' Successful
Repairing Table -> 'graph_tree' Successful
Repairing Table -> 'graph_tree_items' Successful
Repairing Table -> 'host' Successful
Repairing Table -> 'host_graph' Successful
Repairing Table -> 'host_snmp_cache' Successful
Repairing Table -> 'host_snmp_query' Successful
Repairing Table -> 'host_template' Successful
Repairing Table -> 'host_template_graph' Successful
Repairing Table -> 'host_template_snmp_query' Successful
Repairing Table -> 'plugin_config' Successful
Repairing Table -> 'plugin_db_changes' Successful
Repairing Table -> 'plugin_hooks' Successful
Repairing Table -> 'plugin_realms' Successful
Repairing Table -> 'poller' Successful
Repairing Table -> 'poller_command' Successful
Repairing Table -> 'poller_data_template_field_mappings' Successful
Repairing Table -> 'poller_item' Successful
Repairing Table -> 'poller_output' Successful
Repairing Table -> 'poller_output_boost' Successful
Repairing Table -> 'poller_output_boost_processes' Successful
Repairing Table -> 'poller_output_realtime' Successful
Repairing Table -> 'poller_reindex' Successful
Repairing Table -> 'poller_resource_cache' Successful
Repairing Table -> 'poller_time' Successful
Repairing Table -> 'reports' Successful
Repairing Table -> 'reports_items' Successful
Repairing Table -> 'sessions' Successful
Repairing Table -> 'settings' Successful
Repairing Table -> 'settings_tree' Successful
Repairing Table -> 'settings_user' Successful
Repairing Table -> 'settings_user_group' Successful
Repairing Table -> 'sites' Successful
Repairing Table -> 'snmp_query' Successful
Repairing Table -> 'snmp_query_graph' Successful
Repairing Table -> 'snmp_query_graph_rrd' Successful
Repairing Table -> 'snmp_query_graph_rrd_sv' Successful
Repairing Table -> 'snmp_query_graph_sv' Successful
Repairing Table -> 'snmpagent_cache' Successful
Repairing Table -> 'snmpagent_cache_notifications' Successful
Repairing Table -> 'snmpagent_cache_textual_conventions' Successful
Repairing Table -> 'snmpagent_managers' Successful
Repairing Table -> 'snmpagent_managers_notifications' Successful
Repairing Table -> 'snmpagent_mibs' Successful
Repairing Table -> 'snmpagent_notifications_log' Successful
Repairing Table -> 'user_auth' Successful
Repairing Table -> 'user_auth_cache' Successful
Repairing Table -> 'user_auth_group' Successful
Repairing Table -> 'user_auth_group_members' Successful
Repairing Table -> 'user_auth_group_perms' Successful
Repairing Table -> 'user_auth_group_realm' Successful
Repairing Table -> 'user_auth_perms' Successful
Repairing Table -> 'user_auth_realm' Successful
Repairing Table -> 'user_domains' Successful
Repairing Table -> 'user_domains_ldap' Successful
Repairing Table -> 'user_log' Successful
Repairing Table -> 'vdef' Successful
Repairing Table -> 'vdef_items' Successful
Repairing Table -> 'version' Successful

NOTE: Checking for Invalid Cacti Templates
NOTE: 1 Invalid Data Input Rows found in Data Templates
NOTE: 5059 Invalid Data Input Data Rows based upon template mappings found in Data Templates
NOTE: 12 Invalid Data Input Data rows based upon field mappings found in Data Templates

WARNING: Cacti Template Problems found in your Database. Using the '--force' option will remove
the invalid records. However, these changes can be catastrophic to existing data sources. Therefore, you
should contact your support organization prior to proceeding with that repair.

Could this be related to my issue, and should I run this with forced?
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by bmfmancini »

Do you have a backup of your current DB ?

You can try running with force and repair the issues but I would strongly suggest you have a backup of the DB first

Also for the upgrade what version of PHP are you running ?
if its anything prior to 5.4 that could also be an issue
Telecom Lifer, Monitoring and performance enthusiast, Father, Husband

Cacti Bug Hunter and Member

www.seanmancini.com
sean(at)seanmancini.com
github.com/bmfmancini

My Cacti scripts and templates ( Non official)
Cacti install wizard https://github.com/bmfmancini/cacti-install-wizard
Cacti templates https://github.com/bmfmancini/Cacti-templates

Always willing to help!
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

Thanks for the reply.

On the old centos 6.10 box, PHP version is 5.3.3. So if a higher versions is required, then that might explain that problem. I will see if there is some way of upgrading that without breaking other things on the box and come back to you. Do you think if I follow the proceedure here it would create any issues for me :-
https://www.tecmint.com/install-php-5-4 ... -centos-6/

On the Centos 8 box, I will try getting a DB backup after a forced repair and see if that makes any difference.

However, I suspect there are bigger problems on the Centos 8 box, because even if I try and new Cacti install with an import on the default DB, I can't sign on with the web interface. So would it be sensible to focus on that problem and resolve that before we tackle the more difficult issue of the upgrade?

Happy to take your advice on the best we to proceed.
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I am still stuggling to make any progress with Cacti 1.2.11.

I have tried all of the following :-

1. Forced a repair_database.php, updated php to 5.6.40 and tried to do an upgrade on the Centos 6.10 box, and I got exactly the same issue. ie 500 error and "PHP Parse error: syntax error, unexpected '[' in /usr/share/cacti/lib/functions.php on line 5283" in the httpd error log.

2. I have done a dump of the database and tried installing on a new Centos 8 build to do an upgrade. But again I end up locked out of mysql with the following error :-

[root@nms restore]# mysql -u root –p
ERROR 1300 (HY000): Invalid utf8 character string: '\x96p'

3. I even just tried a generic cacti install from the Centos 8 repository as outlined here https://www.itzgeek.com/how-tos/linux/c ... hel-8.html. But again, I end up in the same place where I get the http://x.x.x.x/cacti/install/install.php signon screen, but I can't signon. It just flicks back to the signon screen.

Note, step 3 was done with a completely different guide and using the repository rather than installing from scratch, but I still ended up at the same place.

I am at a complete loss. All suggestions welcome.

Thanks heaps.
swainstm1
Posts: 15
Joined: Wed Apr 22, 2020 10:50 am

Re: Upgrade issue from version 1.1.19 to 1.2.11

Post by swainstm1 »

I have tried a new install on a new Centos 8 box, and even that seems to be an issue. So I am suspicious the issue is to do with Cacti 1.2.11. Given upgrade is more complex with more variables, I have started a new post focusing on issue with clear install. Once that issue is addressed, I will revisit.

New post is viewtopic.php?f=2&t=60905

Thanks heaps.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest