Upgrading from 1.138 to 1.2.17

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

Moderators: Developers, Moderators

Post Reply
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Hi all - I have a new server built for cacti - but when I installed fresh it pulled version 1.138. I have no RRA or graphs, and nothing in the database. Following this, however I am still stuck at 1.138 --

https://github.com/Cacti/documentation/ ... g-Cacti.md

I seem to be missing something obvious - any tips? 1.1.38 loads up fine via web browser - but nothing seems to be copying 1.2.17 to the correct directory -

1.13.8 is currently in /usr/share/cacti, I do not see anything in /var/www/html/
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrading from 1.138 to 1.2.17

Post by bmfmancini »

Going to need a lot more info on this

how are you doing the upgrade package or compiling ?
when you say the database is empty are all of the tables empty or there is no data at all ?

did you by chance import the cacti.sql database ? you should not do that if this is an upgrade
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!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Brand new install - I installed all the pre-reqs - did and apt-get cacti and on Ubuntu 18.04 and it installed 1.138. There are no graphs/RRAs/anything - database was created when Cacti was installed and the password change - that is all. Is there a specific link I should be using to go directly to 1.2.17 instead of installing 1.138?

EDIT - Sean - your own article helped me out - mad props man!

https://www.seanmancini.com/2019/02/fix ... ion-error/
Last edited by vossler19 on Wed May 05, 2021 8:05 am, edited 1 time in total.
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrading from 1.138 to 1.2.17

Post by bmfmancini »

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!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

So going through that - and ran into this error - after attempting to run this command -

\sudo mysql -u root cacti < /var/www/html/cacti/cacti.sql

ERROR 1071 (42000) at line 1987: Specified key was too long; max key length is 767 bytes

I did create the database with these settings-

CREATE DATABASE cacti DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; ;
GRANT ALL PRIVILEGES ON cacti.* TO 'cacti'@'localhost' IDENTIFIED BY 'cacti';
GRANT SELECT ON mysql.time_zone_name TO cacti@localhost;
ALTER DATABASE cacti CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
FLUSH PRIVILEGES;

Now getting this - which I believe is tied to the above -
Attachments
db1.PNG
db1.PNG (29.72 KiB) Viewed 5121 times
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrading from 1.138 to 1.2.17

Post by bmfmancini »

ensure your my.cnf has
innodb_large_prefix = 1
if not add it restart mysql or mariadb
then try to re-import the db
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!
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrading from 1.138 to 1.2.17

Post by bmfmancini »

Here is a sample my.cnf you should match up

innodb_file_format = Barracuda
character_set_client = utf8mb4
max_allowed_packet = 16777777
join_buffer_size = 32M
innodb_file_per_table = ON
innodb_large_prefix = 1
innodb_buffer_pool_size = 250M
innodb_additional_mem_pool_size = 90M
innodb_flush_log_at_trx_commit = 2
innodb_doublewrite = ON
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!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Getting closer - but in adding this to the client server area of the /etc/mysql/my.cnf - I get an error on each line -

mysql: unknown variable 'innodb_file_format=Barracuda'

I commented that out - then on the very next line -

mysql: unknown variable 'character_set_client=utf8mb4'

Attached is a SS of the my.cnf file - I am sure I am missing something again -

Also - here is the version of my mariadb - Server version: 10.1.47-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
Attachments
my.cnf.PNG
my.cnf.PNG (35.44 KiB) Viewed 5114 times
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Fixed it - needed to add a [mysqld} tag - Thanks so much so far for your help Sean!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Making some progress -- I have the timezone set in my system as the database is using system as the timezone as well -- Is there any way to bypass these checks? (attached)
Attachments
tz1.PNG
tz1.PNG (320.15 KiB) Viewed 5112 times
tz2.PNG
tz2.PNG (31.98 KiB) Viewed 5112 times
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Upgrading from 1.138 to 1.2.17

Post by bmfmancini »

oh for that make sure you have the timezone set in php.ini
there are two of them for ubuntu/debian

cli/php.ini
apache/php.ini

usually in /etc/php/<version number>/cli
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!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Yep your own linked helped out - any ideas on this error when attempting to install plugins?


Disregard - I had capitalized in the directory -- all set now.
Attachments
plug.PNG
plug.PNG (148 KiB) Viewed 5109 times
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

What is the correct crontab setting - I am getting the "The cacti poller has not run yet.".

After banging my head against it - got it.
Attachments
cron.PNG
cron.PNG (53.7 KiB) Viewed 5104 times
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Upgrading from 1.138 to 1.2.17

Post by macan »

vossler19 wrote: Wed May 05, 2021 9:40 am What is the correct crontab setting - I am getting the "The cacti poller has not run yet.".

After banging my head against it - got it.
Bad username, in /etc/crontab is something like this:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php 2>&1

6th column is username. Poller is running with this user's privileges You have here wrong username.
Let the Cacti grow!
vossler19
Posts: 45
Joined: Thu Aug 03, 2017 2:27 pm

Re: Upgrading from 1.138 to 1.2.17

Post by vossler19 »

Yep - I got it by using the google machine. Thanks for all the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests