./validate.php error

Hello,

Can anyone help, I’m with the system out of service for a few days because it doesn’t poll, I’ve already made several recovery attempts with the options given in the community, but none of them work. On the other hand, the librenms user error in the files below is never resolved, even after running the recommended command several times, the error returns with each validation.

Thanks

librenms@ubuntu:~$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 22.12.0-17-g239e648ac (2023-01-17T09:17:43+01:00)
DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP       | 8.1.10
Python    | 3.10.6
Database  | MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.5.1
[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]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[FAIL]  No active polling method detected
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[FAIL]  No active python wrapper pollers found
[OK]    Redis is unavailable
[OK]    rrdtool version ok
[OK]    Connected to rrdcached
[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/rrd/smokeping/__sortercache/data.FPing.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-0.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-1.storable

These seem to be indicating why your polling is not working. Looking at all other discussions around this it typically appears because there is an issue in the cronjob(s) that ensure the poller wrapper etc is started.

Hello,

Thanks @pjchilds, today without doing absolutely anything the errors disappeared, without any intervention! But user errors keep!
I wanted to understand what happened.
Now I’m getting a lot off 504 Gateway Time-out errors from the webserver

===========================================
Component | Version
--------- | -------
LibreNMS  | 22.12.0-17-g239e648ac (2023-01-17T09:17:43+01:00)
DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP       | 8.1.10
Python    | 3.10.6
Database  | MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.5.1
[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]
[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]    rrdtool version ok
[OK]    Connected to rrdcached
[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/rrd/smokeping/__sortercache/data.FPing.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-0.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-1.storable

after a few hours the error came back again. :exploding_head: :face_with_thermometer:

librenms@ubuntu:~$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 22.12.0-17-g239e648ac (2023-01-17T09:17:43+01:00)
DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP       | 8.1.10
Python    | 3.10.6
Database  | MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.5.1
[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]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[FAIL]  No active polling method detected
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[FAIL]  No active python wrapper pollers found
[OK]    Redis is unavailable
[OK]    rrdtool version ok
[OK]    Connected to rrdcached
[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/rrd/smokeping/__sortercache/data.FPing.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-0.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-1.storable

Time to check your cron files and cron logs and/or dispatcher logs?

Is the system under strain? Running out of memory or disk space?

My cron file


# Using this cron file requires an additional user on your system, please see install docs.

33   */6  * * *   librenms    /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
*/5  *    * * *   librenms    /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16

*    *    * * *   librenms    /opt/librenms/alerts.php >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/poll-billing.php >> /dev/null 2>&1
01   *    * * *   librenms    /opt/librenms/billing-calculate.php >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/check-services.php >> /dev/null 2>&1
*    *    * * *   librenms    cd /opt/librenms/ && php artisan schedule:run >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1
30   *    * * *   librenms    /opt/librenms/html/plugins/Speedtest/librenms-speedtest.sh run && /opt/librenms/html/plugins/Speedtest/librenms-speedtest.sh graph
05  00    * * *   root (echo "+ LibreNMS"; php -f /opt/librenms/scripts/gen_smokeping.php) > /etc/smokeping/config.d/librenms.conf && systemctl reload smokeping.service >> /dev/null 2>&1
*/30 *    * * *   librenms    /opt/speedtest/speedtest.sh && /opt/speedtest/update-graph.sh


# Daily maintenance script. DO NOT DISABLE!
# If you want to modify updates:
#  Switch to monthly stable release: https://docs.librenms.org/General/Releases/
#  Disable updates: https://docs.librenms.org/General/Updating/
15   0    * * *   librenms    /opt/librenms/daily.sh >> /dev/null 2>&1
*    *    * * *   librenms    /opt/librenms/ping.php >> /dev/null 2>&1

Screenshot_13

I have hardware available on my server, the low performance should not be hardware related

Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-58-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Jan 19 10:30:35 AM WAT 2023

  System load:  8.69580078125       Temperature:           60.0 C
  Usage of /:   27.8% of 195.80GB   Processes:             466
  Memory usage: 5%                  Users logged in:       0
  Swap usage:   0%                  IPv4 address for eno1: 10.6.1.230

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

0 updates can be applied immediately.


Last login: Wed Jan 18 09:45:36 2023

It sort of sounds like something strange is going on … if the cron jobs are running I would assume that the daily job would have updated your version and database schema.

Have you tried running ./daily.sh as librenms user?

Have you looked in your logs to see if cron is running, and if anything is broken?

Hi, i had the same errors for several days and then, it worked, please check at EVERY services’s logs, you should make sure each service works, especially redis, dispatcher, mariadb and librenms.

What i have done one day was also to go on the
WebUI → Parameters → Poller → Poller and… maybe you will find something here, please provide more informations about your installation so i we can look for a solution
(i don’t know how i resolved mine :nerd_face: )

I always update ./daily.sh, problems happen after an update.

Hi @Domingos_Varela

  • Have you got some error messages in /opt/librenms/logs/librenms.log ?
  • When you trigger
 /opt/librenms/poller-wrapper.py 16

manually, is this “working” at least for 1 polling cycle ?

I think so, please see the images!

today he decided to disappear the error, but the server is still slow and with many webserver timeouts

Hello,

Please!

the error returned, someone please to help solve this mystery!

 ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 23.1.0-14-g653da5a3f (2023-01-29T21:54:00+01:00)
DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP       | 8.1.10
Python    | 3.10.6
Database  | MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
===========================================

[OK]    Composer Version: 2.5.1
[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]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[FAIL]  No active polling method detected
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[FAIL]  No active python wrapper pollers found
[OK]    Redis is unavailable
[OK]    rrdtool version ok
[OK]    Connected to rrdcached
[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/rrd/smokeping/__sortercache/data.FPing.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-0.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-1.storable

What are your logs displaying ?
Show db, dispatcher if you have it and other services’s logs

which log files are you referring to?

My installation is on Docker so, regarding my installation, you should check mariadb logs and redis logs (usually on port 6379) if you have it installed, I see your poller seems to be working, so maybe the dispatcher service is working.
Do you know which services are running ?

And, check the redis.conf file (if you have redis installed), check your firewall if you have it enabled, maybe the services can’t communicate with each other properly.
Because most of my problems were due to the database.

The best thing to do is to restart LibreNMS and look at the first 20 lines of the log files, that’s always where I found the error messages.

Just make sure you have configured each configuration file correctly.

my installation is standalone, I have all the components on the same ubuntu server, and I don’t have the firewall active on the server.
The system always worked beautifully without any problems until after an update it started to have these problems and the system stopped working, I already did several reboots but it doesn’t work and other attempts suggested in the forum and without result. I’m going to start thinking about making a new installation and copying the database.

Yeah, i also turned into using stable versions

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