Database out of date

I have a distributed setup (web-ui on one server, several poller server and database and memcached combined on a server) the database got out of date (script didn’t ran as it should).

Please let me know.

Web UI server

librenms@librenms-web-ui:~$ ./validate.php

Component Version
LibreNMS 23.7.0-74-g6e4d12461 (2023-08-13T18:43:52+02:00)
DB Schema 2023_03_14_130653_migrate_empty_user_funcs_to_null (249)
PHP 8.2.8
Python 3.8.10
Database MariaDB 10.3.38-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8
===========================================

[OK] Composer Version: 2.5.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
Attempt to fix this issue (y or n)?:y
Attempted to apply fix.
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] MySQl and PHP time match
[OK] Distributed Polling setting is enabled globally
[OK] Connection to memcached is ok
[OK] Connected to rrdcached
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
[FAIL] Scheduler is not running
[FIX]:
sudo cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/
sudo systemctl enable librenms-scheduler.timer
sudo systemctl start librenms-scheduler.timer
librenms@librenms-web-ui:~$

Databse server
librenms@librenms-rrd:~$ ./validate.php

Component Version
LibreNMS 22.9.0-3-g06c361c2b
DB Schema 2023_03_14_130653_migrate_empty_user_funcs_to_null (249)
PHP 7.4.3-4ubuntu2.19
Python 3.8.10
Database MariaDB 10.3.38-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8
====================================

[OK] Composer Version: 2.5.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[WARN] Your database schema has extra migrations (2022_08_15_084506_add_rrd_type_to_sensors_table, 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table, 2023_03_14_130653_migrate_empty_user_funcs_to_null). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] MySQl and PHP time match
[OK] Distributed Polling setting is enabled globally
[OK] Connected to rrdcached
[WARN] PHP version 8.1 is the minimum supported version as of September, 2022. We recommend you update PHP to a supported version (8.1 suggested) to continue to receive updates. If you do not update PHP, LibreNMS will continue to function but stop receiving bug fixes and updates.
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[FAIL] Some poller nodes have not checked in recently
Inactive Nodes:
librenms-web-ui
librenms-p1
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
[WARN] Your install is over 24 hours out of date, last update: Thu, 29 Sep 2022 04:32:10 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN] Your local git branch is not master, this will prevent automatic updates.
[FIX]:
You can switch back to master with git checkout master
librenms@librenms-rrd:~$

but if I run, daily or migrate script I get the following.

librenms@librenms-rrd:~$ ./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@librenms-rrd:~$ ./lnms migrate


  • Application In Production!     *
    

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

y

Nothing to migrate.
librenms@librenms-rrd:~$

Ah you have a different version of librenms code on the database server as on the web-ui server.

Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN] Your local git branch is not master, this will prevent automatic updates.
[FIX]:
You can switch back to master with git checkout master

Perhaps try that git checkout master in /opt/librenms as the librenms user, then try daily.sh ?

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