[FAIL] APP_KEY does not match key used to encrypt data. APP_KEY must be the same on all nodes

Hi, Guys.

Another problem.

Seems I’m getting ‘504 Gateway Time-out’ again on web access.

Running ./validate.php shows APP_KEY does not match key used to encrypt data. APP_KEY must be the same on all nodes.
[FIX]:
If you rotated APP_KEY, run lnms key:rotate to resolve.

I tried running the fix but then failed with Failed to decrypt validation.encryption.test, skipping
Failed to decrypt item(s). Set new key as APP_KEY and run this again with the old key as an argument.

Not sure where to go with this. Any ideas please?

Also - when i run ./validate.php it hangs at [OK] MySQL and PHP time match, and never progresses passed this, see output below:

librenms@localhost:~$ ./validate.php

Component Version
LibreNMS 24.5.0-14-gc777d5429 (2024-05-29T19:42:05+00:00)
DB Schema 2024_04_29_183605_custom_maps_drop_background_suffix_and_background_version (294)
PHP 8.1.2-1ubuntu2.17
Python 3.10.12
Database MariaDB 10.6.16-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.7.6
[OK] Dependencies up-to-date.
[FAIL] APP_KEY does not match key used to encrypt data. APP_KEY must be the same on all nodes.
[FIX]:
If you rotated APP_KEY, run lnms key:rotate to resolve.
[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
^C

I have to cancel the output as it never progresses past MySQL and PHP time match check. Any idea why this is?

Thanks,
James

Sorry this is not resolved.

Seems a reboot fixed it initially, but then the issue reappeared.

Thanks,
James

Please switch to librenms user, and run $ lnms key:rotate --generate-new-key --forgot-key, this fixed my problem

@Rick_Huang THANK YOU SO MUCH!

This has worked for me too!

Very much appreciate the response.

Thanks,
James

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