Graphs not working showing "-nan" error!

Hi,
I am experiencing issues with the device and ports graphs in LibreNMS, none of the graphs are displaying anything and the In and Out values show a “-nan” error, as shown below.

Has anyone encountered a similar issue?

I’m running the latest LibreNMS Docker container, version 24.8.0 Sun, Aug 25, 2024.

I checked the librenms.log file and found the following messages. Could these be related to why the graphs aren’t working?

librenms:/opt/librenms/logs# cat librenms.log 
Next Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.config' doesn't exist (Connection: mysql, SQL: select
 * from `config` where (`config_name` = device_display_default) limit 1) in /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(755): Illuminate\Database\Connection->runQueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(424): Illuminate\Database\Connection->run()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2748): Illuminate\Database\Connection->select()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2736): Illuminate\Database\Query\Builder->runSelect()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3290): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}(
)
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2737): Illuminate\Database\Query\Builder->onceWithColumns()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(720): Illuminate\Database\Query\Builder->get()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(704): Illuminate\Database\Eloquent\Builder->getModels()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\Database\Eloquent\Builder->get()
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(549): Illuminate\Database\Eloquent\Builder->first()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(583): Illuminate\Database\Eloquent\Builder->firstOrNew()
#11 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(23): Illuminate\Database\Eloquent\Builder->updateOrCreate()
#12 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2333): Illuminate\Database\Eloquent\Model->forwardCallTo()
#13 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2345): Illuminate\Database\Eloquent\Model->__call()
#14 /opt/librenms/LibreNMS/Config.php(262): Illuminate\Database\Eloquent\Model::__callStatic()
#15 /opt/librenms/LibreNMS/Config.php(460): LibreNMS\Config::persist()
#16 /opt/librenms/LibreNMS/Config.php(61): LibreNMS\Config::processConfig()
#17 /opt/librenms/app/Providers/ConfigServiceProvider.php(27): LibreNMS\Config::load()
#18 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Providers\ConfigServiceProvider->boot()
#19 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#20 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#21 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#22 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#23 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1006): Illuminate\Container\Container->call()
#24 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(987): Illuminate\Foundation\Application->bootProvider()
#25 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
#26 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(988): array_walk()
#27 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#28 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(261): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
#29 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(447): Illuminate\Foundation\Application->bootstrapWith()
#30 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\Foundation\Console\Kernel->bootstrap()
#31 /opt/librenms/app/Console/Kernel.php(66): Illuminate\Foundation\Console\Kernel->handle()
#32 /opt/librenms/lnms(39): App\Console\Kernel->handle()
#33 {main}
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.config' doesn't exist in /opt/librenms/vendor/laravel/framework/src/Illuminate/D
atabase/Connection.php:416

/opt/librenms $ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 24.8.0 (2024-08-25T23:45:45+02:00)
DB Schema | 2024_07_19_120719_update_ports_stack_table (296)
PHP       | 8.2.20
Python    | 3.11.9
Database  | MariaDB 10.5.26-MariaDB-ubu2004
RRDTool   | 1.8.0
SNMP      | 5.9.4
===========================================

[OK]    Installed from the official Docker image; no Composer required
[OK]    Database connection successful
[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 is enabled
[OK]    Locks are functional
[OK]    No python wrapper pollers found
[OK]    Redis is functional
[WARN]  IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK]    rrd_dir is writable
[OK]    rrdtool version ok
[WARN]  Updates are managed through the official Docker image

Any help would be greatly appreciated! Thank you!

Run validate and it might tell you what’s up.

If that doesn’t work, run through the install docs again, just don’t delete any files or drop any databases.

Hi @laf,
Validate looks fine, I ran through the docker install again but I am still seeing the same issue! Any other ideas? Thanks! :pray:

$ docker compose up -d
[+] Running 8/8
 ✔ Network librenms_default       Created                                                                              0.1s
 ✔ Container librenms_msmtpd      Started                                                                              0.1s
 ✔ Container librenms_db          Started                                                                              0.1s
 ✔ Container librenms_redis       Started                                                                              0.2s
 ✔ Container librenms             Started                                                                              0.1s
 ✔ Container librenms_snmptrapd   Started                                                                              0.1s
 ✔ Container librenms_dispatcher  Started                                                                              0.1s
 ✔ Container librenms_syslogng    Started


 /opt/librenms $ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 24.8.0 (2024-08-25T23:45:45+02:00)
DB Schema | 2024_07_19_120719_update_ports_stack_table (296)
PHP       | 8.2.20
Python    | 3.11.9
Database  | MariaDB 10.5.26-MariaDB-ubu2004
RRDTool   | 1.8.0
SNMP      | 5.9.4
===========================================

[OK]    Installed from the official Docker image; no Composer required
[OK]    Database connection successful
[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 is enabled
[OK]    Locks are functional
[OK]    No python wrapper pollers found
[OK]    Redis is functional
[WARN]  IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK]    rrd_dir is writable
[OK]    rrdtool version ok
[WARN]  Updates are managed through the official Docker image

Log in to mysql and check the config table exists, show create table config;

BTW I’m running a test env through docker, same version and it’s fine.

Hi!
I figured out my issue. The file permissions for the /data/rrd directory somehow got set to root. I changed them to librenms user and now all graphs are working again. Hope this helps someone having similar issue! Thanks again!

1 Like

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