Hi Team,
Hope everyone of you and your family members are safe.
I have tried to run the ./daily.sh for an existing server that was installed in our PROD environment. Following are the errors that I see when I run the validate.php. I have tried to follow the links that were suggested for a fix but that didn’t seem to help me as it gave me another error as to why it could not be applied. I will send out the error messages that I got for each of the suggested fix in my next post.
If anyone else has come across such an issue, can you please help me with the deployment. I need to deploy a poller that speaks to this central server and offload some of the compute as this instance is almost at 80% utilization and an almost 100% memory.
librenms@dc5up-vlibrenms01:~$ ./validate.php
Component | Version |
---|---|
LibreNMS | 1.70.1 |
DB Schema | 2020_12_14_091314_create_port_group_port_table (199) |
PHP | 7.3.25-1+ubuntu18.04.1+deb.sury.org+1 |
Python | 3.6.9 |
MySQL | 10.5.12-MariaDB-1:10.5.12+maria~bionic |
RRDTool | 1.7.0 |
SNMP | NET-SNMP 5.7.3 |
OpenSSL |
====================================
[OK] Composer Version: 2.1.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[WARN] Your database schema has extra migrations (2020_06_24_155119_drop_ports_if_high_speed, 2020_09_18_230114_create_service_templates_device_group_table, 2020_09_18_230114_create_service_templates_device_table, 2020_09_18_230114_create_service_templates_table, 2020_09_18_230114_extend_services_table_for_service_templates_table, 2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table, 2020_09_19_230114_add_foreign_keys_to_service_templates_device_table, 2020_12_14_091314_create_port_group_port_table). 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.
[FAIL] MySQL tables collation is wrong:
[FIX]:
Check http://bit.ly/2lAG9H8 for info on how to fix.
Tables:
service_templates utf8mb4 utf8mb4_unicode_ci
[FAIL] MySQL column collation is wrong:
[FIX]:
Check https://t.libren.ms/-zdwk for info on how to fix.
Columns:
service_templates ip utf8mb4 utf8mb4_unicode_ci
service_templates type utf8mb4 utf8mb4_unicode_ci
service_templates dtype utf8mb4 utf8mb4_unicode_ci
service_templates drules utf8mb4 utf8mb4_unicode_ci
service_templates dgtype utf8mb4 utf8mb4_unicode_ci
service_templates dgrules utf8mb4 utf8mb4_unicode_ci
service_templates desc utf8mb4 utf8mb4_unicode_ci
service_templates param utf8mb4 utf8mb4_unicode_ci
service_templates name utf8mb4 utf8mb4_unicode_ci
[FAIL] Database: missing column (ports/ifHighSpeed)
[FAIL] Database: missing column (ports/ifHighSpeed_prev)
[FAIL] Database: extra table (service_templates)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd):
[FIX]:
Run the following SQL statements to fix.
SQL Statements:
ALTER TABLE ports
ADD ifHighSpeed
int NULL AFTER ifPromiscuousMode
;
ALTER TABLE ports
ADD ifHighSpeed_prev
int NULL AFTER ifHighSpeed
;
DROP TABLE service_templates
;
[INFO] Detected Python Wrapper
[FAIL] We could not get memcached stats, it is possible that we cannot connect to your memcached server, please check
[FAIL] Missing PHP extension: memcached
[FIX]:
Please install memcached
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
html/images/librenms_logo_blue.svg
html/images/librenms_logo_dark.svg
html/images/librenms_logo_light.svg
html/images/librenms_logo_mono.svg
rrd/.gitignore
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/.mysql_history
=============
Errors with the Fixes applied:
MariaDB [librenms]> ALTER TABLE ports ADD ifHighSpeed int NULL AFTER ifPromiscuousMode;
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
MariaDB [librenms]> ALTER TABLE ports ADD ifHighSpeed_prev int NULL AFTER ifHighSpeed;
ERROR 1054 (42S22): Unknown column ‘ifHighSpeed’ in ‘ports’
MariaDB [librenms]> DROP TABLE service_templates;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails
====================
This is the fix that was suggested for the following error:
[FAIL] MySQL tables collation is wrong:
[FIX]:
Check http://bit.ly/2lAG9H8 for info on how to fix.
Tables:
service_templates_device utf8mb4 utf8mb4_unicode_ci
service_templates_device_group utf8mb4 utf8mb4_unicode_ci
port_group_port utf8mb4 utf8mb4_unicode_ci
service_templates utf8mb4 utf8mb4_unicode_ci
port_groups utf8mb4 utf8mb4_unicode_ci
[FAIL] MySQL column collation is wrong:
[FIX]:
Check https://t.libren.ms/-zdwk for info on how to fix.
Columns:
service_templates ip utf8mb4 utf8mb4_unicode_ci
service_templates type utf8mb4 utf8mb4_unicode_ci
service_templates dtype utf8mb4 utf8mb4_unicode_ci
service_templates drules utf8mb4 utf8mb4_unicode_ci
service_templates dgtype utf8mb4 utf8mb4_unicode_ci
service_templates dgrules utf8mb4 utf8mb4_unicode_ci
service_templates desc utf8mb4 utf8mb4_unicode_ci
service_templates param utf8mb4 utf8mb4_unicode_ci
service_templates name utf8mb4 utf8mb4_unicode_ci
port_groups name utf8mb4 utf8mb4_unicode_ci
port_groups desc utf8mb4 utf8mb4_unicode_ci
But this is the error I got when I tried to apply the command, provided at the weblink:
root@dc5up-vlibrenms01:~# mysql -p -u librenms librenms < /opt/librenms/sql-schema/171.sql
Enter password:
ERROR 1146 (42S02) at line 2: Table ‘librenms.alert_map’ doesn’t exist
root@dc5up-vlibrenms01:~#
=====================