Validation gives Failure to update MariaDB will eventually cause issues ; ./lnms migrate - Gives Error

Dear All,
./validate gives the error

[FAIL] MariaDB version 10.2.2 is the minimum supported version as of March, 2021. We recommend you update MariaDB to a supported version 10.5 suggested). Failure to update MariaDB will eventually cause issues.
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate

and ./lnms migrate, gives the error

-bash-4.2$ ./lnms migrate


  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

Migrating: 2020_12_14_091314_create_port_groups_table

In Connection.php line 678:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists (SQL: create table port_groups (id int unsi
gned not null auto_increment primary key, name varchar(255) not null, desc varchar(255) null) default character set utf8mb4 collate ‘ut
f8mb4_unicode_ci’)

In Exception.php line 18:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists

In PDOStatement.php line 112:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists

=====================================================================

On the GUI I am getting the below error


Please help

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
  • The output of ./validate.php

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | ./pbin.sh
./poller.php -h HOSTNAME -r -f -d | ./pbin.sh

If you need to post any text longer than a few lines, please use a pastebin service such as https://p.libren.ms using non-expiring pastes.

Take a look on this topic:

Thanks, managed to manually upgrade MariaDB. GUI errors are gone, but still validation is giving DB out of date.

I had the same and after following another thread I dropped the port_groups table but now i get
Migrating: 2020_12_14_091314_create_port_groups_table
In Connection.php line 678:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table port_groups add unique port_groups_name_unique(name))
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
In PDOStatement.php line 112:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Does nayone have a clue for me otherwise I shall make another thread.

1 Like

I followed fit4130 advice from thread https://community.librenms.org/t/error-port-device/15386/17
Execute ./lnms migrate --pretend
after dropping the port_groups table again.

@Stephanvw you should run validate.php, I’m guessing you have a too old mysql version

I am in the same boat.

MariaDB has been updated to 10.5.9

1 Like

Procedure I did:

  • Update MariaDB
  • Delete the port_groups table, this table had no data and was generating an error when executing the command: ./lnms migrate
  • run the command: ./lnms migrate

can you write commands, i didmt manage to delete table, neither to update mariadb

On a Terminal type:

mariadb
in maridab type:
MariaDB> connect librenms (or whatever the name of your db is
in DB type:
MariaDB [librenms] > drop table port_groups; (note the semicolon!)

and you are done! Leave DB with exit

Hello Everyone!

Ok. Confession… I am a total Windows guy doing my best to manage a few Linux servers for a company. I have got the same error message as listed above, and I have no friggin idea how to get this figured out. Have gone thru the steps, but getting no where. Does anyone have a few extra cycles that can walk me thru how to do this…???

Tim.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.