Index device_perf is corrupted

Hi everyone,
I didn’t use LibreNMS for few days and dont know when this started, however, now every time I’m trying to open any device for details - I get in to error webpage saying “Woops, something wrong, checl LibreNMS.log”

So few facts:

  1. No configuration changes done on LibreNMS side.
  2. LibreNMS webpage is working. I can open it, I can search for device, I even can see some graphs for particular device if I mouse over on it.
    BUT, if I click on any device - instead of opening detailed webpage for particular device - I get error page “Woops, something went wrong”.
    3 .Tried reboots, etc… nothing worked.
  3. In the log, I see that all the devices are polling successfully.

5.This is the error log I see in the log:
SQLSTATE[HY000]: General error: 1712 Index device_perf is corrupted (Connection: mysql, SQL: select exists(select * from device_perf where device_id = 300) as exists) {“view”:{“view”:“/opt/librenms/resources/views/device/index.blade.php”,“data”:[]},“userId”:1,“exception”:"[object] (Spatie\LaravelIgnition\Exceptions\ViewException(code: 0): SQLSTATE[HY000]: General error: 1712 Index device_perf is corrupted (Connection: mysql, SQL: select exists(select * from device_perf where device_id = 300) as exists) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795)
[previous exception] [object] (Illuminate\Database\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1712 Index device_perf is corrupted (Connection: mysql, SQL: select exists(select * from device_perf where device_id = 300) as exists) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795)
[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1712 Index device_perf is corrupted at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:421)"}

  1. Finally, the validate.php status:
    administrator@librenms:~$ sudo -u librenms /opt/librenms/validate.php
    [sudo] password for administrator:
    ===========================================
    Component | Version
    --------- | -------
    LibreNMS | 23.10.0-5-g7c542d70a (2023-10-29T20:46:04-07:00)
    DB Schema | 2023_10_20_075853_cisco_asa_add_default_limits (268)
    PHP | 8.1.2-1ubuntu2.14
    Python | 3.10.12
    Database | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
    RRDTool | 1.7.2
    SNMP | 5.9.1
    ===========================================

[OK] Composer Version: 2.5.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

perhaps a mysql crash/recover issue?

Perhaps try a repair table device_perf as per above article?

1 Like

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