Upgrading from 0.8.8b after crash - Error 500

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

Moderators: Developers, Moderators

Post Reply
mpalmer67
Posts: 3
Joined: Wed Jun 23, 2021 1:11 pm

Upgrading from 0.8.8b after crash - Error 500

Post by mpalmer67 »

We had an old cacti server that wasnt being maintained crash, I'm running updates on the existing install to the newest git clone. Getting close, but getting stuck now on an error:
PHP Fatal error: Uncaught TypeError: Argument 6 passed to tail_file() must be of the type int, null given, called in /var/www/cacti/lib/installer.php on line 3421 and defined in /var/www/cacti/lib/functions.php:1042\nStack trace:\n#0 /var/www/cacti/lib/installer.php(3421): tail_file('/var/www/cacti/...', 100, -1, ' INSTALL:', 1, NULL)\n#1 /var/www/cacti/lib/installer.php(2708): Installer::getInstallLog()\n#2 /var/www/cacti/lib/installer.php(1632): Installer->processStepInstall()\n#3 /var/www/cacti/lib/installer.php(184): Installer->processCurrentStep()\n#4 [internal function]: Installer->jsonSerialize()\n#5 /var/www/cacti/install/step_json.php(66): json_encode(Object(Installer))\n#6 {main}\n thrown in /var/www/cacti/lib/functions.php on line 1042,
I've confirmed I have all the php modules when going through all the steps, it passed everything.

If I try a CLI DB Upgrade:
php upgrade_database.php --debug
Upgrading from v0.8.8b
Performing Database Upgrade
- from v0.8.8b (DB 0.8.8b)
to v1.0.0
++++++++++++++++++++++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++++++++++++++++++++++++++++++++-++++-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++PHP Fatal error: Uncaught TypeError: Argument 1 passed to get_hash_data_source_profile() must be of the type int, string given, called in /var/www/cacti/install/upgrades/1_0_0.php on line 1486 and defined in /var/www/cacti/lib/functions.php:3401
Stack trace:
#0 /var/www/cacti/install/upgrades/1_0_0.php(1486): get_hash_data_source_profile('Upgrade Profile...')
#1 /var/www/cacti/cli/upgrade_database.php(128): upgrade_to_1_0_0()
#2 {main}
thrown in /var/www/cacti/lib/functions.php on line 3401
I'm sure im missing something, or there's a bug because I'm skipping a lot of versions. Just trying to keep all the hosts configs without having to re-created everything. Any tips?
No SELinux, seems to be the common thing everyone replies :)
mpalmer67
Posts: 3
Joined: Wed Jun 23, 2021 1:11 pm

Re: Upgrading from 0.8.8b after crash - Error 500

Post by mpalmer67 »

Okay, killed the git version. Loaded debian packages from apt. Ran manual upgrade_database.php. It's running now!
Upgrading from v0.8.8b
Upgrading from v0.8.8b (DB 0.8.8b) to v1.0.0
+++++++++++++++++++++++++++++++++++-+++++++++++++++++++++-+++++++++++++++++++++++++++++++++++++++++++++++++++-++++-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Upgrading from v1.0.0 (DB 1.0.0) to v1.0.4
-
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
++++++++++++++
Upgrading from v1.0.5 (DB 1.0.5) to v1.1.2
++++++++++++
Upgrading from v1.1.2 (DB 1.1.2) to v1.1.4
++++++-+++++++++++++++++++++++++++++++++++++++++++
Upgrading from v1.1.4 (DB 1.1.4) to v1.1.6
++++++++++++++++++++++++++-+++++
Upgrading from v1.1.6 (DB 1.1.6) to v1.1.7
+
Upgrading from v1.1.7 (DB 1.1.7) to v1.1.8

Upgrading from v1.1.8 (DB 1.1.8) to v1.1.11
+++
Upgrading from v1.1.11 (DB 1.1.11) to v1.1.14
+
Upgrading from v1.1.14 (DB 1.1.14) to v1.1.17
+++++++++++
Upgrading from v1.1.17 (DB 1.1.17) to v1.1.20
++-+++-+++-+++
Upgrading from v1.1.20 (DB 1.1.20) to v1.1.26
++++++++-
Upgrading from v1.1.26 (DB 1.1.26) to v1.1.28
++++++-++
Upgrading from v1.1.28 (DB 1.1.28) to v1.1.31
++++++++
Upgrading from v1.1.31 (DB 1.1.31) to v1.1.34
-++-++++++++++++++++++++-+-+++++++++-++++++++++++++++++++++++-++-++
Upgrading from v1.1.34 (DB 1.1.34) to v1.1.35
+++
Upgrading from v1.1.35 (DB 1.1.35) to v1.1.36

Upgrading from v1.1.36 (DB 1.1.36) to v1.1.37
+
Upgrading from v1.1.37 (DB 1.1.37) to v1.2.0
+++++++++++++++++++++++++++++++++++++++++
Upgrading from v1.2.0 (DB 1.2.0) to v1.2.1
++
Upgrading from v1.2.1 (DB 1.2.1) to v1.2.2
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Upgrading from 0.8.8b after crash - Error 500

Post by macan »

It seems that you used the wrong version from github. Develop branch is cacti 1.3 and needs PHP 7.x. You have to use 1.2.x branch
Let the Cacti grow!
mpalmer67
Posts: 3
Joined: Wed Jun 23, 2021 1:11 pm

Re: Upgrading from 0.8.8b after crash - Error 500

Post by mpalmer67 »

Huh, well im on PHP 7.3.27-1~deb10u1. Anyways, the deb version is working great now!
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Upgrading from 0.8.8b after crash - Error 500

Post by netniV »

There are likely to be type errors on develop as we have started to put expected types onto the parameters within lib/functions.php as a start. Could you log the above on GitHub to be investigated even though you have now gone to the package version?

If you had switched to the 1.2.x branch, you would have had the latest stable release from github, rather than our work-in-progress branch.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

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

Who is online

Users browsing this forum: No registered users and 0 guests