Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 26, 2019 11:20 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Fri Jan 05, 2018 3:40 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
OK, the very first thing that really stuck out to me was that it claims your settings table has crashed and needs to be repaired. Also, a lot of tables are missing so It would appear something is seriously wrong with the database. Do you have a backup from before the upgrade?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 7:24 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
i had noticed that same issue, and I attempted to repair it before the upgrade to no avail.
I then made a copy of that database folder, attempted to do the upgrade, and well, the rest went down hill.
at this point I think im going to have to start over, which means importing all my tempaltes, scripts, etc.. unfortunately, I used to rely on a lot of the plug ins, and I think those no longer work whatsoever.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 8:12 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
That would depend on the plugin. Some may work but any errors and 1.x will automajically disable them.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 8:33 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
wish there was a way to repair my old database so I didn't have to start from scratch.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 8:38 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
There may be if you google for it. Unfortunately, I only know how to use MySQL and not an advanced supporter of it.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 8:50 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
looks like cacti has its own repair_database.php. I ran that got this back
Repairing All Cacti Database Tables
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_processes' 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 -> '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_stats_hourly_cache' Successful
Repairing Table -> 'data_source_stats_hourly_last' Successful
Repairing Table -> 'data_template' Successful
Repairing Table -> 'data_template_data' Successful
Repairing Table -> 'data_template_data_rra' Successful
Repairing Table -> 'data_template_rrd' 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 -> 'manage_admin_link' Successful
Repairing Table -> 'manage_alerts' Successful
Repairing Table -> 'manage_groups' Successful
Repairing Table -> 'manage_host' Successful
Repairing Table -> 'manage_poller_output' Successful
Repairing Table -> 'manage_process' Successful
Repairing Table -> 'manage_services' Successful
Repairing Table -> 'manage_sites' Successful
Repairing Table -> 'manage_tcp' Successful
Repairing Table -> 'manage_templates' Successful
Repairing Table -> 'manage_uptime_method' Successful
Repairing Table -> 'plugin_autom8_graph_rule_items' Successful
Repairing Table -> 'plugin_autom8_graph_rules' Successful
Repairing Table -> 'plugin_autom8_match_rule_items' Successful
Repairing Table -> 'plugin_autom8_thold_rule_items' Successful
Repairing Table -> 'plugin_autom8_thold_rules' Successful
Repairing Table -> 'plugin_autom8_tree_rule_items' Successful
Repairing Table -> 'plugin_autom8_tree_rules' Successful
Repairing Table -> 'plugin_config' Successful
Repairing Table -> 'plugin_db_changes' Successful
Repairing Table -> 'plugin_discover_hosts' Successful
Repairing Table -> 'plugin_discover_template' Successful
Repairing Table -> 'plugin_hooks' Successful
Repairing Table -> 'plugin_nectar' Successful
Repairing Table -> 'plugin_nectar_items' Successful
Repairing Table -> 'plugin_notification_lists' Successful
Repairing Table -> 'plugin_realms' Successful
Repairing Table -> 'plugin_snmpagent_cache' Successful
Repairing Table -> 'plugin_snmpagent_cache_notifications' Successful
Repairing Table -> 'plugin_snmpagent_cache_textual_conventions' Successful
Repairing Table -> 'plugin_snmpagent_managers' Successful
Repairing Table -> 'plugin_snmpagent_managers_notifications' Successful
Repairing Table -> 'plugin_snmpagent_mibs' Successful
Repairing Table -> 'plugin_snmpagent_notifications_log' Successful
Repairing Table -> 'plugin_thold_contacts' Successful
Repairing Table -> 'plugin_thold_host_failed' Successful
Repairing Table -> 'plugin_thold_log' Successful
Repairing Table -> 'plugin_thold_template_contact' Successful
Repairing Table -> 'plugin_thold_threshold_contact' Successful
Repairing Table -> 'plugin_usersettings' Successful
Repairing Table -> 'poller' Successful
Repairing Table -> 'poller_command' Successful
Repairing Table -> 'poller_item' Successful
Repairing Table -> 'poller_output' Successful
Repairing Table -> 'poller_output_boost_processes' Successful
Repairing Table -> 'poller_output_rt' Successful
Repairing Table -> 'poller_reindex' Successful
Repairing Table -> 'poller_time' Successful
Repairing Table -> 'reports' Successful
Repairing Table -> 'reports_items' Successful
Repairing Table -> 'rra' Successful
Repairing Table -> 'rra_cf' Successful
Repairing Table -> 'settings' Successful
Repairing Table -> 'settings_graphs' Successful
Repairing Table -> 'settings_tree' Successful
Repairing Table -> 'settings_user' 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 -> 'thold_data' Successful
Repairing Table -> 'thold_template' Successful
Repairing Table -> 'user_auth' Successful
Repairing Table -> 'user_auth_perms' Successful
Repairing Table -> 'user_auth_realm' Successful
Repairing Table -> 'user_log' Successful
Repairing Table -> 'version' Successful

NOTE: Checking for Invalid Cacti Templates
NOTE: 66 Invalid Data Input Data Rows based upon template mappings found in Dat
Templates
NOTE: 3 Invalid Data Input Data rows based upon field mappings found in Data Te
plates

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

I didn't get any error when logging in (oh, the upgrade wanted to run again).. but when I login, all I get now is a white screen.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 9:43 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
ok I did a few things.. being desperate and all.
I got the db upgraded.. I got logged in.. my devices are all there.. but my settings are kinda jacked. I need to set the paths of my poller, spine, etc, but it wont keep my settings.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 9:49 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
Are you getting any errors in your logs?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 9:58 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
most recent CLOG after I cleared it
2018-01-08 06:57:48 - WEBUI: Cacti Log Cleared from Web Management Interface
01/08/2018 06:57:48 - WEBUI NOTE: Cacti Log file C:/inetpub/wwwroot/cacti/log/cacti.log, Removed by user admin
01/08/2018 06:57:49 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 514 db_fetch_cell_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 280 cacti_debug_backtrace)
01/08/2018 06:57:49 - DBCALL ERROR: SQL Assoc Failed!, Error:2006, SQL:'SELECT po.output, po.time, UNIX_TIMESTAMP(po.time) as unix_time, po.local_data_id, dl.data_template_id, pi.rrd_path, pi.rrd_name, pi.rrd_num FROM poller_output AS po INNER JOIN poller_item AS pi ON po.local_data_id=pi.local_data_id AND po.rrd_name=pi.rrd_name INNER JOIN data_local AS dl ON dl.id=po.local_data_id ORDER BY po.local_data_id LIMIT 40000'
01/08/2018 06:57:49 - DBCALL ERROR: SQL Assoc Failed!, Error: MySQL server has gone away
01/08/2018 06:57:49 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 539 process_poller_output)(C:\inetpub\wwwroot\cacti\lib\poller.php: 384 db_fetch_assoc)(C:\inetpub\wwwroot\cacti\lib\database.php: 360 db_fetch_assoc_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 401 cacti_debug_backtrace)
01/08/2018 06:57:50 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 514 db_fetch_cell_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 280 cacti_debug_backtrace)
01/08/2018 06:57:50 - DBCALL ERROR: SQL Assoc Failed!, Error:2006, SQL:'SELECT po.output, po.time, UNIX_TIMESTAMP(po.time) as unix_time, po.local_data_id, dl.data_template_id, pi.rrd_path, pi.rrd_name, pi.rrd_num FROM poller_output AS po INNER JOIN poller_item AS pi ON po.local_data_id=pi.local_data_id AND po.rrd_name=pi.rrd_name INNER JOIN data_local AS dl ON dl.id=po.local_data_id ORDER BY po.local_data_id LIMIT 40000'
01/08/2018 06:57:50 - DBCALL ERROR: SQL Assoc Failed!, Error: MySQL server has gone away
01/08/2018 06:57:50 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 539 process_poller_output)(C:\inetpub\wwwroot\cacti\lib\poller.php: 384 db_fetch_assoc)(C:\inetpub\wwwroot\cacti\lib\database.php: 360 db_fetch_assoc_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 401 cacti_debug_backtrace)
01/08/2018 06:57:51 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 514 db_fetch_cell_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 280 cacti_debug_backtrace)
01/08/2018 06:57:51 - DBCALL ERROR: SQL Assoc Failed!, Error:2006, SQL:'SELECT po.output, po.time, UNIX_TIMESTAMP(po.time) as unix_time, po.local_data_id, dl.data_template_id, pi.rrd_path, pi.rrd_name, pi.rrd_num FROM poller_output AS po INNER JOIN poller_item AS pi ON po.local_data_id=pi.local_data_id AND po.rrd_name=pi.rrd_name INNER JOIN data_local AS dl ON dl.id=po.local_data_id ORDER BY po.local_data_id LIMIT 40000'
01/08/2018 06:57:51 - DBCALL ERROR: SQL Assoc Failed!, Error: MySQL server has gone away
01/08/2018 06:57:51 - CMDPHP SQL Backtrace: (C:\inetpub\wwwroot\cacti\poller.php: 539 process_poller_output)(C:\inetpub\wwwroot\cacti\lib\poller.php: 384 db_fetch_assoc)(C:\inetpub\wwwroot\cacti\lib\database.php: 360 db_fetch_assoc_prepared)(C:\inetpub\wwwroot\cacti\lib\database.php: 401 cacti_debug_backtrace)


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:02 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
Something really isn't right here because that means the website is losing connectivity to the database whilst running the query:
https://dev.mysql.com/doc/refman/5.7/en/gone-away.html

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:12 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
ok wait.. im back in.. all my devices are there.
I had to stop MySQL.. copy my settings tables from my backup to the current directory, restart MySQL and the settings all showed up. I even sent a test message and it showed up.
im going to wait to see if my graphs actually populate data.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:26 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
zero data on my graphs.. logs don't show much, ill up load one in a little bit.. gotta fix an MS office issue on my PC first.
I log in, I get a white screen.. I F5, cacti shows up.
my settings WERE there.. now I cant get into that section .. it just doesn't do anything.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:30 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
As well as your cacti logs, I would also check your apache logs to see what they show.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:37 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
running on IIS


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Mon Jan 08, 2018 10:39 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
dunno if this helps.. but I get this error when I try to run the poller manually..

c:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php
Cannot load Zend OPcache - it was already loaded


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group