Hello
i ran the upgrade from 0.8.8c to 1.2.24
but when it got to 1.0.4 the upgrade stopped .
and the cacti log show:
2023-05-15 13:38:04 - INSTALL: always: Starting UPGRADE Process for v1.2.24
2023-05-15 13:38:04 - INSTALL: always: No tables where found or selected for conversion
2023-05-15 13:38:04 - INSTALL: always: Switched from to /tmp/cdusGLGwi
2023-05-15 13:38:04 - INSTALL: always: NOTE: Using temporary file for db cache: /tmp/cdusGLGwi
2023-05-15 13:38:04 - INSTALL: always: Upgrading from v1.0.4 (DB 1.2.24 (DB: 1.0.4)) to v1.0.5
2023-05-15 13:38:04 - CMDPHP ERROR: A DB Exec Failed!, Error: Unknown column 'snmp_engine_id' in 'automation_devices'
2023-05-15 13:38:04 - CMDPHP SQL Backtrace: (/install/background.php[55]:Installer::beginInstall(), /lib/installer.php[3459]:Installer->install(), /lib/installer.php[2952]:Installer->upgradeDatabase(), /lib/installer.php[3352]:upgrade_to_1_0_5(), /install/upgrades/1_0_5.php[38]:db_install_execute(), /install/functions.php[160]:db_execute_prepared())
2023-05-15 13:38:04 - INSTALL: always: Finished UPGRADE Process for v1.2.24
2023-05-15 13:38:04 - INSTALL: always: WARNING: One or more upgrades failed to install correctly
2023-05-15 13:38:04 - INSTALL: always: Installation was started at 2023-05-15 10:38:04, completed at 2023-05-15 10
i checked the table 'automation_devices' and there is no column 'snmp_engine_id'
it was not created...
tail install-complete.log
[2023-05-15 13:38:04] [ global always ] Setting PHP Option max_execution_time = 0
[2023-05-15 13:38:04] [ global always ] Setting PHP Option memory_limit = -1
[2023-05-15 13:38:04] [ global always ] Starting UPGRADE Process for v1.2.24
[2023-05-15 13:38:04] [ global always ] No tables where found or selected for conversion
[2023-05-15 13:38:04] [ global always ] Switched from to /tmp/cdusGLGwi
[2023-05-15 13:38:04] [ global always ] NOTE: Using temporary file for db cache: /tmp/cdusGLGwi
[2023-05-15 13:38:04] [ global always ] Upgrading from v1.0.4 (DB 1.2.24 (DB: 1.0.4)) to v1.0.5
[2023-05-15 13:38:04] [ global always ] Finished UPGRADE Process for v1.2.24
[2023-05-15 13:38:04] [ global always ] WARNING: One or more upgrades failed to install correctly
[2023-05-15 13:38:04] [ global always ] Installation was started at 2023-05-15 10:38:04, completed at 2023-05-15 10:38:04
tail install-general.log
[2023-05-15 13:38:04] [ always ] Setting PHP Option max_execution_time = 0
[2023-05-15 13:38:04] [ always ] Setting PHP Option memory_limit = -1
[2023-05-15 13:38:04] [ always ] Starting UPGRADE Process for v1.2.24
[2023-05-15 13:38:04] [ always ] No tables where found or selected for conversion
[2023-05-15 13:38:04] [ always ] Switched from to /tmp/cdusGLGwi
[2023-05-15 13:38:04] [ always ] NOTE: Using temporary file for db cache: /tmp/cdusGLGwi
[2023-05-15 13:38:04] [ always ] Upgrading from v1.0.4 (DB 1.2.24 (DB: 1.0.4)) to v1.0.5
[2023-05-15 13:38:04] [ always ] Finished UPGRADE Process for v1.2.24
[2023-05-15 13:38:04] [ always ] WARNING: One or more upgrades failed to install correctly
[2023-05-15 13:38:04] [ always ] Installation was started at 2023-05-15 10:38:04, completed at 2023-05-15 10:38:04
----
i have tried to run the upgrade_database.php from cli but it didnt help
php -q upgrade_database.php --debug --forcever=1.0.4
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.4
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
+++++++x+++++
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_command MODIFY COLUMN command varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_data_template_field_mappings MODIFY COLUMN data_source_names varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_managers_notifications MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_notifications_log MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1
################################
################################
[Success] - <no error>
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 1 WHERE data_source_profile_id = 0
################################
################################
[Fail] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_devices MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_snmp_items MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE host MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE poller_item MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE snmpagent_managers MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - <no error>
+------------------------------+
SELECT COUNT(*) FROM external_links WHERE sortorder=0
################################
database upgrade to 1.2.24 stuck at 1.0.4
Moderators: Developers, Moderators
Re: database upgrade to 1.2.24 stuck at 1.0.4
try php -q upgrade_database.php --debug --forcever=1.0.0
Let the Cacti grow!
Re: database upgrade to 1.2.24 stuck at 1.0.4
php -q upgrade_database.php --debug --forcever=1.0.0
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.0
Upgrading from v1.0.0 (DB 1.0.4) to v1.0.4
-
################################
[Skipped] - <no error>
+------------------------------+
ALTER TABLE `poller_output_boost` ADD PRIMARY KEY(local_data_id,time,rrd_name) USING BTREE
################################
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
+++++++x+++++
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_command MODIFY COLUMN command varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_data_template_field_mappings MODIFY COLUMN data_source_names varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_managers_notifications MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_notifications_log MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1
################################
################################
[Success] - <no error>
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 1 WHERE data_source_profile_id = 0
################################
################################
[Fail] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_devices MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_snmp_items MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE host MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE poller_item MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE snmpagent_managers MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - <no error>
+------------------------------+
SELECT COUNT(*) FROM external_links WHERE sortorder=0
################################
same error
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.0
Upgrading from v1.0.0 (DB 1.0.4) to v1.0.4
-
################################
[Skipped] - <no error>
+------------------------------+
ALTER TABLE `poller_output_boost` ADD PRIMARY KEY(local_data_id,time,rrd_name) USING BTREE
################################
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
+++++++x+++++
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_command MODIFY COLUMN command varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE poller_data_template_field_mappings MODIFY COLUMN data_source_names varchar(191) NOT NULL default ""
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_managers_notifications MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
ALTER TABLE snmpagent_notifications_log MODIFY COLUMN notification varchar(180) NOT NULL
################################
################################
[Success] - <no error>
+------------------------------+
SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1
################################
################################
[Success] - <no error>
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 1 WHERE data_source_profile_id = 0
################################
################################
[Fail] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_devices MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE automation_snmp_items MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE host MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE poller_item MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - DB Exec Failed!, Error 1054: Unknown column 'snmp_engine_id' in 'automation_devices'
+------------------------------+
ALTER TABLE snmpagent_managers MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""
################################
################################
[Success] - <no error>
+------------------------------+
SELECT COUNT(*) FROM external_links WHERE sortorder=0
################################
same error
Re: database upgrade to 1.2.24 stuck at 1.0.4
try to run this sql query
ALTER TABLE automation_devices
ADD COLUMN snmp_engine_id varchar(30) DEFAULT '' AFTER snmp_context,
ALTER TABLE automation_devices
ADD COLUMN snmp_engine_id varchar(30) DEFAULT '' AFTER snmp_context,
Let the Cacti grow!
Re: database upgrade to 1.2.24 stuck at 1.0.4
Hello
i have found the cause of the problem
there were missing fields in the TABLE automation_devices
like
snmp_context
so the upgrade scripts failed.
i checked the cacti.log and saw what field the script was looking for and
once i have added the missing fields to the table, the upgrade scripts were able to continue.
i have done it few times until the upgrade was done.
thank you macan !
without your answer I wouldn't of found it
i have found the cause of the problem
there were missing fields in the TABLE automation_devices
like
snmp_context
so the upgrade scripts failed.
i checked the cacti.log and saw what field the script was looking for and
once i have added the missing fields to the table, the upgrade scripts were able to continue.
i have done it few times until the upgrade was done.
thank you macan !
without your answer I wouldn't of found it
Who is online
Users browsing this forum: No registered users and 1 guest