Ports page = Whoops, looks like something went wrong. Check your librenms.log

I has the same issue a few days ago where the ports page on any device is broken.
I when back to an older snapshot and was happy although lost a few days of data.

It’s happened again so it’s more than just a corrupt input.
Any help please (and I’m rusty)

./validate.php
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.config/git/config’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.config/git/config’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.config/git/config’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied
warning: unable to access ‘/root/.config/git/config’: Permission denied
warning: unable to access ‘/root/.gitconfig’: Permission denied

Component Version
LibreNMS 21.3.0-76-gf5f72dd39
DB Schema 2021_03_11_003713_rename_printer_columns (204)
PHP 7.4.13
Python 3.6.9
MySQL 10.1.47-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 2.0.12
[OK] Dependencies up-to-date.
[OK] Database connection successful
[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
warning: unable to access ‘/root/.config/git/attributes’: Permission denied

[email protected]:/opt/librenms$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 963M 0 963M 0% /dev
tmpfs 199M 960K 198M 1% /run
/dev/xvda2 79G 16G 59G 22% /
tmpfs 994M 0 994M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 994M 0 994M 0% /sys/fs/cgroup
/dev/loop0 100M 100M 0 100% /snap/core/10908
/dev/loop1 100M 100M 0 100% /snap/core/10958
tmpfs 199M 0 199M 0% /run/user/1000

/opt/librenms/poller.php 58 2021-04-08 00:15:57 - 1 devices polled in 7.368 secs
/opt/librenms/poller.php 45 2021-04-08 00:15:57 - 1 devices polled in 6.836 secs
/opt/librenms/poller.php 52 2021-04-08 00:15:57 - 1 devices polled in 7.695 secs
/opt/librenms/poller.php 64 2021-04-08 00:15:57 - 1 devices polled in 8.769 secs
/opt/librenms/poller.php 63 2021-04-08 00:15:59 - 1 devices polled in 2.123 secs
/opt/librenms/poller.php 43 2021-04-08 00:16:00 - 1 devices polled in 5.707 secs
/opt/librenms/poller.php 44 2021-04-08 00:16:00 - 1 devices polled in 4.748 secs
/opt/librenms/poller.php 48 2021-04-08 00:16:01 - 1 devices polled in 4.959 secs
/opt/librenms/poller.php 70 2021-04-08 00:16:01 - 1 devices polled in 4.646 secs
/opt/librenms/poller.php 55 2021-04-08 00:16:01 - 1 devices polled in 4.618 secs
/opt/librenms/poller.php 74 2021-04-08 00:16:02 - 1 devices polled in 3.798 secs
/opt/librenms/poller.php 73 2021-04-08 00:16:02 - 1 devices polled in 3.927 secs
/opt/librenms/poller.php 76 2021-04-08 00:16:03 - 1 devices polled in 4.920 secs
/opt/librenms/poller.php 31 2021-04-08 00:16:11 - 1 devices polled in 64.92 secs
[2021-04-08 00:16:12] production.ERROR: 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)) {“exception”:"[object] (Illuminate\Database\QueryException(code: 42000): 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)) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:678)
[stacktrace]
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(472): Illuminate\Database\Connection->run()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(359): Illuminate\Database\Schema\Blueprint->build()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(222): Illuminate\Database\Schema\Builder->build()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\Schema\Builder->create()
#6 /opt/librenms/database/migrations/2020_12_14_091314_create_port_groups_table.php(19): Illuminate\Support\Facades\Facade::__callStatic()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(392): CreatePortGroupsTable->up()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(401): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(200): Illuminate\Database\Migrations\Migrator->runMigration()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(165): Illuminate\Database\Migrations\Migrator->runUp()
#11 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(110): Illuminate\Database\Migrations\Migrator->runPending()
#12 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(85): Illuminate\Database\Migrations\Migrator->run()
#13 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(541): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}
()
#14 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(94): Illuminate\Database\Migrations\Migrator->usingConnection()
#15 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#16 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#17 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#18 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#19 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(611): Illuminate\Container\BoundMethod::call()
#20 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#21 /opt/librenms/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute()
#22 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#23 /opt/librenms/vendor/symfony/console/Application.php(971): Illuminate\Console\Command->run()
#24 /opt/librenms/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand()
#25 /opt/librenms/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun()
#26 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(92): Symfony\Component\Console\Application->run()
#27 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(184): Illuminate\Console\Application->run()
#28 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\Console\Application->call()
#29 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Foundation\Console\Kernel->call()
#30 /opt/librenms/includes/sql-schema/update.php(101): Illuminate\Support\Facades\Facade::__callStatic()
#31 {main}

[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at /opt/libr
enms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18)
[stacktrace]
#0 /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(114): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(471): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(671): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(472): Illuminate\Database\Connection->run()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(359): Illuminate\Database\Schema\Blueprint->build()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(222): Illuminate\Database\Schema\Builder->build()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\Schema\Builder->create()
#9 /opt/librenms/database/migrations/2020_12_14_091314_create_port_groups_table.php(19): Illuminate\Support\Facades\Facade::__callStatic()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(392): CreatePortGroupsTable->up()
#11 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(401): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#12 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(200): Illuminate\Database\Migrations\Migrator->runMigration()
#13 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(165): Illuminate\Database\Migrations\Migrator->runUp()
#14 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(110): Illuminate\Database\Migrations\Migrator->runPending()
#15 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(85): Illuminate\Database\Migrations\Migrator->run()
#16 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(541): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}
()
#17 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(94): Illuminate\Database\Migrations\Migrator->usingConnection()
#18 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#19 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): 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(611): Illuminate\Container\BoundMethod::call()
#23 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#24 /opt/librenms/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute()
#25 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#26 /opt/librenms/vendor/symfony/console/Application.php(971): Illuminate\Console\Command->run()
#27 /opt/librenms/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand()
#28 /opt/librenms/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun()
#29 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(92): Symfony\Component\Console\Application->run()
#30 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(184): Illuminate\Console\Application->run()
#31 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\Console\Application->call()
#32 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Foundation\Console\Kernel->call()
#33 /opt/librenms/includes/sql-schema/update.php(101): Illuminate\Support\Facades\Facade::__callStatic()
#34 {main}

[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at /opt/librenms/vendor/doctrine/dbal/
lib/Doctrine/DBAL/Driver/PDOStatement.php:112)
[stacktrace]
#0 /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(112): PDOStatement->execute()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(471): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(671): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(472): Illuminate\Database\Connection->run()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(359): Illuminate\Database\Schema\Blueprint->build()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(222): Illuminate\Database\Schema\Builder->build()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\Schema\Builder->create()
#9 /opt/librenms/database/migrations/2020_12_14_091314_create_port_groups_table.php(19): Illuminate\Support\Facades\Facade::__callStatic()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(392): CreatePortGroupsTable->up()
#11 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(401): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#12 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(200): Illuminate\Database\Migrations\Migrator->runMigration()
#13 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(165): Illuminate\Database\Migrations\Migrator->runUp()
#14 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(110): Illuminate\Database\Migrations\Migrator->runPending()
#15 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(85): Illuminate\Database\Migrations\Migrator->run()
#16 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(541): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}
()
#17 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(94): Illuminate\Database\Migrations\Migrator->usingConnection()
#18 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#19 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): 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(611): Illuminate\Container\BoundMethod::call()
#23 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#24 /opt/librenms/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute()
#25 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#26 /opt/librenms/vendor/symfony/console/Application.php(971): Illuminate\Console\Command->run()
#27 /opt/librenms/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand()
#28 /opt/librenms/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun()
#29 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(92): Symfony\Component\Console\Application->run()
#30 /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Application.php(184): Illuminate\Console\Application->run()
#31 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\Console\Application->call()
#32 /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Foundation\Console\Kernel->call()
#33 /opt/librenms/includes/sql-schema/update.php(101): Illuminate\Support\Facades\Facade::__callStatic()
#34 {main}
"}
/opt/librenms/poller.php 18 2021-04-08 00:16:13 - 1 devices polled in 66.89 secs
/opt/librenms/poller.php 26 2021-04-08 00:16:13 - 1 devices polled in 66.94 secs
/opt/librenms/poller.php 35 2021-04-08 00:16:13 - 1 devices polled in 67.12 secs
/opt/librenms/poller.php 25 2021-04-08 00:16:13 - 1 devices polled in 67.17 secs
/opt/librenms/poller.php 13 2021-04-08 00:16:14 - 1 devices polled in 68.03 secs
/opt/librenms/poller.php 27 2021-04-08 00:20:08 - 1 devices polled in 2.599 secs

Exactly the same problem happened here, only on interface pages.

current issue or have you resolved?

We have not found a solution so far, please let us know if you can resolve it.

You should fix your file permissions and upgrade your database version first

any help with that. I did run some chown commands i found but i still got permission errors.
I also updated the database and changed complete the migrate. this told me the tables already existed.

Please advise.

See this Error port device

Upgrade database to 10.5+ and applying the 2020-12-14 migration commands seems to get the ports page back, cause and definitive fix as yet unknown.

I’ve updated the database and now run the migrate with the following output.

OK, my fix for this (unconfirmed but looks good.)
image

  1. I restored to a point before the issue.

  2. Installed MariaDB manually from their repository.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

sudo add-apt-repository ‘deb [arch=amd64,arm64,ppc64el] Index of /mariadb/repo/10.3/ubuntu bionic main’

sudo apt update

sudo apt install mariadb-server

==== Check version was Ver 15.1 Distrib 10.3.28-MariaDB

mysql -V

  1. Rebooted
  2. Ran ./daily.sh

image

5.Result (although will be back to confirm or ask for more help!)

just noticed this is version 10.3 and 10.5 is out.
So i have now also (but i guess you could skip to this)

sudo curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
sudo apt update
sudo apt install mariadb-server

image

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