Migrated LibreNMS CentOS 7 to Rocky Linux 8

When I run the ./validate I get an error “Your database is out of date!” and I run the ./lnms migrate and I get the table already exist. I’m not familiar at all with databases. Do I need to delete some databases?

[librenms@S-MCS-LibreNMS ~]$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
Caching Mac OUI data OK
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$ ./validate.php

Component Version
LibreNMS 21.9.0-10-g8a883140c
DB Schema 2020_06_24_155119_drop_ports_if_high_speed (189)
PHP 7.3.20
Python 3.6.8
MySQL 10.5.12-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.8
====================================

[OK] Composer Version: 2.1.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$
[librenms@S-MCS-LibreNMS ~]$ ./lnms migrate


  • Application In Production!     *
    

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

yes

Migrating: 2020_09_18_230114_create_service_templates_device_group_table

In Connection.php line 692:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘service_templates_device_group’ already exists (SQL: create table service_templates_device_group (service_template_id int unsigned not null, device_group_id
int unsigned not null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’)

In Exception.php line 18:

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

In PDOStatement.php line 112:

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

I was able to fix the problem by dropping the librenms database and importing again.

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